Skip to content

/AWS1/CL_WIS=>CREATEQUICKRESPONSE()

About CreateQuickResponse

Creates a Wisdom quick response.

Method Signature

IMPORTING

Required arguments:

iv_knowledgebaseid TYPE /AWS1/WISUUIDORARN /AWS1/WISUUIDORARN

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

iv_name TYPE /AWS1/WISQUICKRESPONSENAME /AWS1/WISQUICKRESPONSENAME

The name of the quick response.

io_content TYPE REF TO /AWS1/CL_WISQUICKRSPDATAPVDR /AWS1/CL_WISQUICKRSPDATAPVDR

The content of the quick response.

Optional arguments:

iv_contenttype TYPE /AWS1/WISQUICKRESPONSETYPE /AWS1/WISQUICKRESPONSETYPE

The media type of the quick response content.

  • Use application/x.quickresponse;format=plain for a quick response written in plain text.

  • Use application/x.quickresponse;format=markdown for a quick response written in richtext.

io_groupingconfiguration TYPE REF TO /AWS1/CL_WISGROUPINGCONF /AWS1/CL_WISGROUPINGCONF

The configuration information of the user groups that the quick response is accessible to.

iv_description TYPE /AWS1/WISQUICKRESPONSEDESC /AWS1/WISQUICKRESPONSEDESC

The description of the quick response.

iv_shortcutkey TYPE /AWS1/WISSHORTCUTKEY /AWS1/WISSHORTCUTKEY

The shortcut key of the quick response. The value should be unique across the knowledge base.

iv_isactive TYPE /AWS1/WISBOOLEAN /AWS1/WISBOOLEAN

Whether the quick response is active.

it_channels TYPE /AWS1/CL_WISCHANNELS_W=>TT_CHANNELS TT_CHANNELS

The Amazon Connect channels this quick response applies to.

iv_language TYPE /AWS1/WISLANGUAGECODE /AWS1/WISLANGUAGECODE

The language code value for the language in which the quick response is written. The supported language codes include de_DE, en_US, es_ES, fr_FR, id_ID, it_IT, ja_JP, ko_KR, pt_BR, zh_CN, zh_TW

iv_clienttoken TYPE /AWS1/WISNONEMPTYSTRING /AWS1/WISNONEMPTYSTRING

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

it_tags TYPE /AWS1/CL_WISTAGS_W=>TT_TAGS TT_TAGS

The tags used to organize, track, or control access for this resource.

RETURNING

oo_output TYPE REF TO /aws1/cl_wiscreatequickrsprsp /AWS1/CL_WISCREATEQUICKRSPRSP

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->/aws1/if_wis~createquickresponse(
  io_content = new /aws1/cl_wisquickrspdatapvdr( |string| )
  io_groupingconfiguration = new /aws1/cl_wisgroupingconf(
    it_values = VALUE /aws1/cl_wisgroupingvalues_w=>tt_groupingvalues(
      ( new /aws1/cl_wisgroupingvalues_w( |string| ) )
    )
    iv_criteria = |string|
  )
  it_channels = VALUE /aws1/cl_wischannels_w=>tt_channels(
    ( new /aws1/cl_wischannels_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_wistags_w=>tt_tags(
    (
      VALUE /aws1/cl_wistags_w=>ts_tags_maprow(
        key = |string|
        value = new /aws1/cl_wistags_w( |string| )
      )
    )
  )
  iv_clienttoken = |string|
  iv_contenttype = |string|
  iv_description = |string|
  iv_isactive = ABAP_TRUE
  iv_knowledgebaseid = |string|
  iv_language = |string|
  iv_name = |string|
  iv_shortcutkey = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_quickresponsedata = lo_result->get_quickresponse( ).
  IF lo_quickresponsedata IS NOT INITIAL.
    lv_arn = lo_quickresponsedata->get_quickresponsearn( ).
    lv_uuid = lo_quickresponsedata->get_quickresponseid( ).
    lv_arn = lo_quickresponsedata->get_knowledgebasearn( ).
    lv_uuid = lo_quickresponsedata->get_knowledgebaseid( ).
    lv_quickresponsename = lo_quickresponsedata->get_name( ).
    lv_quickresponsetype = lo_quickresponsedata->get_contenttype( ).
    lv_quickresponsestatus = lo_quickresponsedata->get_status( ).
    lv_timestamp = lo_quickresponsedata->get_createdtime( ).
    lv_timestamp = lo_quickresponsedata->get_lastmodifiedtime( ).
    lo_quickresponsecontents = lo_quickresponsedata->get_contents( ).
    IF lo_quickresponsecontents IS NOT INITIAL.
      lo_quickresponsecontentpro = lo_quickresponsecontents->get_plaintext( ).
      IF lo_quickresponsecontentpro IS NOT INITIAL.
        lv_quickresponsecontent = lo_quickresponsecontentpro->get_content( ).
      ENDIF.
      lo_quickresponsecontentpro = lo_quickresponsecontents->get_markdown( ).
      IF lo_quickresponsecontentpro IS NOT INITIAL.
        lv_quickresponsecontent = lo_quickresponsecontentpro->get_content( ).
      ENDIF.
    ENDIF.
    lv_quickresponsedescriptio = lo_quickresponsedata->get_description( ).
    lo_groupingconfiguration = lo_quickresponsedata->get_groupingconfiguration( ).
    IF lo_groupingconfiguration IS NOT INITIAL.
      lv_groupingcriteria = lo_groupingconfiguration->get_criteria( ).
      LOOP AT lo_groupingconfiguration->get_values( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_groupingvalue = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_shortcutkey = lo_quickresponsedata->get_shortcutkey( ).
    lv_genericarn = lo_quickresponsedata->get_lastmodifiedby( ).
    lv_boolean = lo_quickresponsedata->get_isactive( ).
    LOOP AT lo_quickresponsedata->get_channels( ) into lo_row_2.
      lo_row_3 = lo_row_2.
      IF lo_row_3 IS NOT INITIAL.
        lv_channel = lo_row_3->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_languagecode = lo_quickresponsedata->get_language( ).
    LOOP AT lo_quickresponsedata->get_tags( ) into ls_row_4.
      lv_key = ls_row_4-key.
      lo_value = ls_row_4-value.
      IF lo_value IS NOT INITIAL.
        lv_tagvalue = lo_value->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDIF.