/AWS1/IF_LXB=>GETUTTERANCESVIEW()¶
About GetUtterancesView¶
Use the GetUtterancesView operation to get information
about the utterances that your users have made to your bot. You can use
this list to tune the utterances that your bot responds to.
For example, say that you have created a bot to order flowers.
After your users have used your bot for a while, use the
GetUtterancesView operation to see the requests that they
have made and whether they have been successful. You might find that the
utterance "I want flowers" is not being recognized. You could add this
utterance to the OrderFlowers intent so that your bot
recognizes that utterance.
After you publish a new version of a bot, you can get information about the old version and the new so that you can compare the performance across the two versions.
Utterance statistics are generated once a day. Data is available for the last 15 days. You can request information for up to 5 versions of your bot in each request. Amazon Lex returns the most frequent utterances received by the bot in the last 15 days. The response contains information about a maximum of 100 utterances for each version.
If you set childDirected field to true when you
created your bot, if you are using slot obfuscation with one or more
slots, or if you opted out of participating in improving Amazon Lex, utterances
are not available.
This operation requires permissions for the
lex:GetUtterancesView action.
Method Signature¶
METHODS /AWS1/IF_LXB~GETUTTERANCESVIEW
IMPORTING
!IV_BOTNAME TYPE /AWS1/LXBBOTNAME OPTIONAL
!IT_BOTVERSIONS TYPE /AWS1/CL_LXBBOTVERSIONS_W=>TT_BOTVERSIONS OPTIONAL
!IV_STATUSTYPE TYPE /AWS1/LXBSTATUSTYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_lxbgetutterancesvie01
RAISING
/AWS1/CX_LXBBADREQUESTEX
/AWS1/CX_LXBINTERNALFAILUREEX
/AWS1/CX_LXBLIMITEXCEEDEDEX
/AWS1/CX_LXBCLIENTEXC
/AWS1/CX_LXBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_botname TYPE /AWS1/LXBBOTNAME /AWS1/LXBBOTNAME¶
The name of the bot for which utterance information should be returned.
it_botversions TYPE /AWS1/CL_LXBBOTVERSIONS_W=>TT_BOTVERSIONS TT_BOTVERSIONS¶
An array of bot versions for which utterance information should be returned. The limit is 5 versions per request.
iv_statustype TYPE /AWS1/LXBSTATUSTYPE /AWS1/LXBSTATUSTYPE¶
To return utterances that were recognized and handled, use
Detected. To return utterances that were not recognized, useMissed.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_lxbgetutterancesvie01 /AWS1/CL_LXBGETUTTERANCESVIE01¶
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->getutterancesview(
it_botversions = VALUE /aws1/cl_lxbbotversions_w=>tt_botversions(
( new /aws1/cl_lxbbotversions_w( |string| ) )
)
iv_botname = |string|
iv_statustype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_botname = lo_result->get_botname( ).
LOOP AT lo_result->get_utterances( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_version = lo_row_1->get_botversion( ).
LOOP AT lo_row_1->get_utterances( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_utterancestring = lo_row_3->get_utterancestring( ).
lv_count = lo_row_3->get_count( ).
lv_count = lo_row_3->get_distinctusers( ).
lv_timestamp = lo_row_3->get_firstuttereddate( ).
lv_timestamp = lo_row_3->get_lastuttereddate( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.