/AWS1/IF_CNT=>CREATETASKTEMPLATE()¶
About CreateTaskTemplate¶
Creates a new task template in the specified Amazon Connect instance.
Method Signature¶
METHODS /AWS1/IF_CNT~CREATETASKTEMPLATE
IMPORTING
!IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
!IV_NAME TYPE /AWS1/CNTTASKTEMPLATENAME OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/CNTTASKTEMPLATEDESC OPTIONAL
!IV_CONTACTFLOWID TYPE /AWS1/CNTCONTACTFLOWID OPTIONAL
!IV_SELFASSIGNFLOWID TYPE /AWS1/CNTCONTACTFLOWID OPTIONAL
!IO_CONSTRAINTS TYPE REF TO /AWS1/CL_CNTTASKTMPLCNSTRNTS OPTIONAL
!IO_DEFAULTS TYPE REF TO /AWS1/CL_CNTTASKTMPLDEFAULTS OPTIONAL
!IV_STATUS TYPE /AWS1/CNTTASKTEMPLATESTATUS OPTIONAL
!IT_FIELDS TYPE /AWS1/CL_CNTTASKTEMPLATEFIELD=>TT_TASKTEMPLATEFIELDS OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/CNTCLIENTTOKEN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntcreatetasktmplrsp
RAISING
/AWS1/CX_CNTINTERNALSERVICEEX
/AWS1/CX_CNTINVALIDPARAMETEREX
/AWS1/CX_CNTPRPVALIDATIONEX
/AWS1/CX_CNTRESOURCENOTFOUNDEX
/AWS1/CX_CNTSERVICEQUOTAEXCDEX
/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_name TYPE /AWS1/CNTTASKTEMPLATENAME /AWS1/CNTTASKTEMPLATENAME¶
The name of the task template.
it_fields TYPE /AWS1/CL_CNTTASKTEMPLATEFIELD=>TT_TASKTEMPLATEFIELDS TT_TASKTEMPLATEFIELDS¶
Fields that are part of the template.
Optional arguments:¶
iv_description TYPE /AWS1/CNTTASKTEMPLATEDESC /AWS1/CNTTASKTEMPLATEDESC¶
The description of the task template.
iv_contactflowid TYPE /AWS1/CNTCONTACTFLOWID /AWS1/CNTCONTACTFLOWID¶
The identifier of the flow that runs by default when a task is created by referencing this template.
iv_selfassignflowid TYPE /AWS1/CNTCONTACTFLOWID /AWS1/CNTCONTACTFLOWID¶
The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.
io_constraints TYPE REF TO /AWS1/CL_CNTTASKTMPLCNSTRNTS /AWS1/CL_CNTTASKTMPLCNSTRNTS¶
Constraints that are applicable to the fields listed.
io_defaults TYPE REF TO /AWS1/CL_CNTTASKTMPLDEFAULTS /AWS1/CL_CNTTASKTMPLDEFAULTS¶
The default values for fields when a task is created by referencing this template.
iv_status TYPE /AWS1/CNTTASKTEMPLATESTATUS /AWS1/CNTTASKTEMPLATESTATUS¶
Marks a template as
ACTIVEorINACTIVEfor a task to refer to it. Tasks can only be created fromACTIVEtemplates. If a template is marked asINACTIVE, then a task that refers to this template cannot be created.
iv_clienttoken TYPE /AWS1/CNTCLIENTTOKEN /AWS1/CNTCLIENTTOKEN¶
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.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cntcreatetasktmplrsp /AWS1/CL_CNTCREATETASKTMPLRSP¶
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->createtasktemplate(
io_constraints = new /aws1/cl_cnttasktmplcnstrnts(
it_invisiblefields = VALUE /aws1/cl_cntinvisiblefieldinfo=>tt_invisibletasktemplatefields(
( new /aws1/cl_cntinvisiblefieldinfo( new /aws1/cl_cnttasktmplfieldid( |string| ) ) )
)
it_readonlyfields = VALUE /aws1/cl_cntreadonlyfieldinfo=>tt_readonlytasktemplatefields(
( new /aws1/cl_cntreadonlyfieldinfo( new /aws1/cl_cnttasktmplfieldid( |string| ) ) )
)
it_requiredfields = VALUE /aws1/cl_cntrequiredfieldinfo=>tt_requiredtasktemplatefields(
( new /aws1/cl_cntrequiredfieldinfo( new /aws1/cl_cnttasktmplfieldid( |string| ) ) )
)
)
io_defaults = new /aws1/cl_cnttasktmpldefaults(
it_defaultfieldvalues = VALUE /aws1/cl_cnttsktmpldeffieldval=>tt_tasktmpldeffieldvaluelist(
(
new /aws1/cl_cnttsktmpldeffieldval(
io_id = new /aws1/cl_cnttasktmplfieldid( |string| )
iv_defaultvalue = |string|
)
)
)
)
it_fields = VALUE /aws1/cl_cnttasktemplatefield=>tt_tasktemplatefields(
(
new /aws1/cl_cnttasktemplatefield(
io_id = new /aws1/cl_cnttasktmplfieldid( |string| )
it_singleselectoptions = VALUE /aws1/cl_cntsingleselectopts_w=>tt_singleselectoptions(
( new /aws1/cl_cntsingleselectopts_w( |string| ) )
)
iv_description = |string|
iv_type = |string|
)
)
)
iv_clienttoken = |string|
iv_contactflowid = |string|
iv_description = |string|
iv_instanceid = |string|
iv_name = |string|
iv_selfassignflowid = |string|
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_tasktemplateid = lo_result->get_id( ).
lv_tasktemplatearn = lo_result->get_arn( ).
ENDIF.