/AWS1/IF_CNT=>GETTASKTEMPLATE()¶
About GetTaskTemplate¶
Gets details about a specific task template in the specified Amazon Connect instance.
Method Signature¶
METHODS /AWS1/IF_CNT~GETTASKTEMPLATE
IMPORTING
!IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
!IV_TASKTEMPLATEID TYPE /AWS1/CNTTASKTEMPLATEID OPTIONAL
!IV_SNAPSHOTVERSION TYPE /AWS1/CNTSNAPSHOTVERSION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntgettasktmplrsp
RAISING
/AWS1/CX_CNTINTERNALSERVICEEX
/AWS1/CX_CNTINVALIDPARAMETEREX
/AWS1/CX_CNTINVALIDREQUESTEX
/AWS1/CX_CNTRESOURCENOTFOUNDEX
/AWS1/CX_CNTTHROTTLINGEX
/AWS1/CX_CNTCLIENTEXC
/AWS1/CX_CNTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_instanceid TYPE /AWS1/CNTINSTANCEID /AWS1/CNTINSTANCEID¶
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
iv_tasktemplateid TYPE /AWS1/CNTTASKTEMPLATEID /AWS1/CNTTASKTEMPLATEID¶
A unique identifier for the task template.
Optional arguments:¶
iv_snapshotversion TYPE /AWS1/CNTSNAPSHOTVERSION /AWS1/CNTSNAPSHOTVERSION¶
The system generated version of a task template that is associated with a task, when the task is created.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cntgettasktmplrsp /AWS1/CL_CNTGETTASKTMPLRSP¶
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->gettasktemplate(
iv_instanceid = |string|
iv_snapshotversion = |string|
iv_tasktemplateid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_instanceid = lo_result->get_instanceid( ).
lv_tasktemplateid = lo_result->get_id( ).
lv_tasktemplatearn = lo_result->get_arn( ).
lv_tasktemplatename = lo_result->get_name( ).
lv_tasktemplatedescription = lo_result->get_description( ).
lv_contactflowid = lo_result->get_contactflowid( ).
lv_contactflowid = lo_result->get_selfassignflowid( ).
lo_tasktemplateconstraints = lo_result->get_constraints( ).
IF lo_tasktemplateconstraints IS NOT INITIAL.
LOOP AT lo_tasktemplateconstraints->get_requiredfields( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_tasktemplatefieldidenti = lo_row_1->get_id( ).
IF lo_tasktemplatefieldidenti IS NOT INITIAL.
lv_tasktemplatefieldname = lo_tasktemplatefieldidenti->get_name( ).
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT lo_tasktemplateconstraints->get_readonlyfields( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lo_tasktemplatefieldidenti = lo_row_3->get_id( ).
IF lo_tasktemplatefieldidenti IS NOT INITIAL.
lv_tasktemplatefieldname = lo_tasktemplatefieldidenti->get_name( ).
ENDIF.
ENDIF.
ENDLOOP.
LOOP AT lo_tasktemplateconstraints->get_invisiblefields( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lo_tasktemplatefieldidenti = lo_row_5->get_id( ).
IF lo_tasktemplatefieldidenti IS NOT INITIAL.
lv_tasktemplatefieldname = lo_tasktemplatefieldidenti->get_name( ).
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
lo_tasktemplatedefaults = lo_result->get_defaults( ).
IF lo_tasktemplatedefaults IS NOT INITIAL.
LOOP AT lo_tasktemplatedefaults->get_defaultfieldvalues( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lo_tasktemplatefieldidenti = lo_row_7->get_id( ).
IF lo_tasktemplatefieldidenti IS NOT INITIAL.
lv_tasktemplatefieldname = lo_tasktemplatefieldidenti->get_name( ).
ENDIF.
lv_tasktemplatefieldvalue = lo_row_7->get_defaultvalue( ).
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_result->get_fields( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lo_tasktemplatefieldidenti = lo_row_9->get_id( ).
IF lo_tasktemplatefieldidenti IS NOT INITIAL.
lv_tasktemplatefieldname = lo_tasktemplatefieldidenti->get_name( ).
ENDIF.
lv_tasktemplatefielddescri = lo_row_9->get_description( ).
lv_tasktemplatefieldtype = lo_row_9->get_type( ).
LOOP AT lo_row_9->get_singleselectoptions( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_tasktemplatesingleselec = lo_row_11->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_tasktemplatestatus = lo_result->get_status( ).
lv_timestamp = lo_result->get_lastmodifiedtime( ).
lv_timestamp = lo_result->get_createdtime( ).
LOOP AT lo_result->get_tags( ) into ls_row_12.
lv_key = ls_row_12-key.
lo_value = ls_row_12-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.