/AWS1/IF_QQC=>SENDMESSAGE()¶
About SendMessage¶
Submits a message to the Amazon Q in Connect session.
Method Signature¶
METHODS /AWS1/IF_QQC~SENDMESSAGE
IMPORTING
!IV_ASSISTANTID TYPE /AWS1/QQCUUIDORARN OPTIONAL
!IV_SESSIONID TYPE /AWS1/QQCUUIDORARN OPTIONAL
!IV_TYPE TYPE /AWS1/QQCMESSAGETYPE OPTIONAL
!IO_MESSAGE TYPE REF TO /AWS1/CL_QQCMESSAGEINPUT OPTIONAL
!IO_CONVERSATIONCONTEXT TYPE REF TO /AWS1/CL_QQCCONVERSATIONCTX OPTIONAL
!IO_CONFIGURATION TYPE REF TO /AWS1/CL_QQCMESSAGECONF OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/QQCCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_qqcsendmessagersp
RAISING
/AWS1/CX_QQCACCESSDENIEDEX
/AWS1/CX_QQCCONFLICTEXCEPTION
/AWS1/CX_QQCREQUESTTIMEOUTEX
/AWS1/CX_QQCRESOURCENOTFOUNDEX
/AWS1/CX_QQCTHROTTLINGEX
/AWS1/CX_QQCVALIDATIONEX
/AWS1/CX_QQCCLIENTEXC
/AWS1/CX_QQCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_assistantid TYPE /AWS1/QQCUUIDORARN /AWS1/QQCUUIDORARN¶
The identifier of the Amazon Q in Connect assistant.
iv_sessionid TYPE /AWS1/QQCUUIDORARN /AWS1/QQCUUIDORARN¶
The identifier of the Amazon Q in Connect session.
iv_type TYPE /AWS1/QQCMESSAGETYPE /AWS1/QQCMESSAGETYPE¶
The message type.
io_message TYPE REF TO /AWS1/CL_QQCMESSAGEINPUT /AWS1/CL_QQCMESSAGEINPUT¶
The message data to submit to the Amazon Q in Connect session.
Optional arguments:¶
io_conversationcontext TYPE REF TO /AWS1/CL_QQCCONVERSATIONCTX /AWS1/CL_QQCCONVERSATIONCTX¶
The conversation context before the Amazon Q in Connect session.
io_configuration TYPE REF TO /AWS1/CL_QQCMESSAGECONF /AWS1/CL_QQCMESSAGECONF¶
The configuration of the SendMessage request.
iv_clienttoken TYPE /AWS1/QQCCLIENTTOKEN /AWS1/QQCCLIENTTOKEN¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the AWS SDK populates this field.For more information about idempotency, see Making retries safe with idempotent APIs.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_qqcsendmessagersp /AWS1/CL_QQCSENDMESSAGERSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->sendmessage(
io_configuration = new /aws1/cl_qqcmessageconf( ABAP_TRUE )
io_conversationcontext = new /aws1/cl_qqcconversationctx(
it_selfsvcconversationhist00 = VALUE /aws1/cl_qqcselfsvcconversat00=>tt_selfsvcconversationhistor00(
(
new /aws1/cl_qqcselfsvcconversat00(
iv_botresponse = |string|
iv_inputtranscript = |string|
iv_turnnumber = 123
)
)
)
)
io_message = new /aws1/cl_qqcmessageinput( new /aws1/cl_qqcmessagedata( new /aws1/cl_qqctextmessage( |string| ) ) )
iv_assistantid = |string|
iv_clienttoken = |string|
iv_sessionid = |string|
iv_type = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_uuid = lo_result->get_requestmessageid( ).
lo_messageconfiguration = lo_result->get_configuration( ).
IF lo_messageconfiguration IS NOT INITIAL.
lv_boolean = lo_messageconfiguration->get_generatefillermessage( ).
ENDIF.
lv_nexttoken = lo_result->get_nextmessagetoken( ).
ENDIF.