Skip to content

/AWS1/IF_CNT=>UPDATECONTACTTASKTEMPLATE()

About UpdateContactTaskTemplate

Updates the task template association on an existing task contact. You can update the task template on a contact before assignment to support tasks that are created without a template (for example Rules or disconnect flows) or change the agent interaction form to represent the latest task data (for example an initial request that was submitted as a refund gets updated to an account cancellation and requires a new template).

This operation can only be used with task contacts that are in progress and not connected to an agent. A task template can be updated a maximum of 5 times per contact.

The task's references must be compatible with the fields of the target task template. If the target template has a required field, the task must have a corresponding reference with a matching name and compatible type. The following task template field types map to reference types:

  • TEXT, TEXT_AREA, BOOLEAN, and SINGLE_SELECT map to references of type STRING.

  • NUMBER maps to references of type NUMBER.

  • DATE_TIME maps to references of type DATE.

  • URL maps to references of type URL.

  • EMAIL maps to references of type EMAIL.

References corresponding to TEXT fields must be fewer than 512 characters. TEXT_AREA fields must be fewer than 4,096 characters. BOOLEAN fields must have a value of true or false.

An InvalidRequestException occurs when UpdateContactTaskTemplate is called on a connected or terminated task, when it is called on non-task contacts, and when the task contact already uses the provided task template. A PropertyValidationException occurs when the task's references conflict with the task template's fields, for example if the task is missing a reference that matches a required field, or if the task has a reference that matches a required field's name but not its datatype.

Method Signature

METHODS /AWS1/IF_CNT~UPDATECONTACTTASKTEMPLATE
  IMPORTING
    !IV_INSTANCEID TYPE /AWS1/CNTINSTANCEID OPTIONAL
    !IV_TASKTEMPLATEID TYPE /AWS1/CNTTASKTEMPLATEID OPTIONAL
    !IV_CONTACTID TYPE /AWS1/CNTCONTACTID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cntupdconttasktmplrsp
  RAISING
    /AWS1/CX_CNTACCESSDENIEDEX
    /AWS1/CX_CNTINTERNALSERVICEEX
    /AWS1/CX_CNTINVALIDREQUESTEX
    /AWS1/CX_CNTLIMITEXCEEDEDEX
    /AWS1/CX_CNTPRPVALIDATIONEX
    /AWS1/CX_CNTRESOURCENOTFOUNDEX
    /AWS1/CX_CNTSERVICEQUOTAEXCDEX
    /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 Connect Customer 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. For more information about task templates, see Task templates in the Connect Customer Administrator Guide.

iv_contactid TYPE /AWS1/CNTCONTACTID /AWS1/CNTCONTACTID

The identifier of the contact in this instance of Connect Customer.

RETURNING

oo_output TYPE REF TO /aws1/cl_cntupdconttasktmplrsp /AWS1/CL_CNTUPDCONTTASKTMPLRSP

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->updatecontacttasktemplate(
  iv_contactid = |string|
  iv_instanceid = |string|
  iv_tasktemplateid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.