Amazon Connect Service

2026/10/28 - Amazon Connect Service - 3 updated api methods

Changes  Amazon Connect APIs - CreateTaskTemplate and UpdateTaskTemplate accept a new ContactHooks parameter called WrapUpFlowId to identify the flow module that runs when an agent attempts to disconnect from a task created with the template. Use this to verify an agent's work or update external case repos.

CreateTaskTemplate (updated) Link ¶
Changes (request)
{'ContactHooks': {'WrapUpFlowId': 'string'}}

Creates a new task template in the specified Connect Customer instance.

See also: AWS API Documentation

Request Syntax

client.create_task_template(
    InstanceId='string',
    Name='string',
    Description='string',
    ContactFlowId='string',
    SelfAssignFlowId='string',
    ContactHooks={
        'WrapUpFlowId': 'string'
    },
    Constraints={
        'RequiredFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'ReadOnlyFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'InvisibleFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ]
    },
    Defaults={
        'DefaultFieldValues': [
            {
                'Id': {
                    'Name': 'string'
                },
                'DefaultValue': 'string'
            },
        ]
    },
    Status='ACTIVE'|'INACTIVE',
    Fields=[
        {
            'Id': {
                'Name': 'string'
            },
            'Description': 'string',
            'Type': 'NAME'|'DESCRIPTION'|'SCHEDULED_TIME'|'QUICK_CONNECT'|'URL'|'NUMBER'|'TEXT'|'TEXT_AREA'|'DATE_TIME'|'BOOLEAN'|'SINGLE_SELECT'|'EMAIL'|'SELF_ASSIGN'|'EXPIRY_DURATION',
            'SingleSelectOptions': [
                'string',
            ]
        },
    ],
    ClientToken='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

type Name:

string

param Name:

[REQUIRED]

The name of the task template.

type Description:

string

param Description:

The description of the task template.

type ContactFlowId:

string

param ContactFlowId:

The identifier of the flow that runs by default when a task is created by referencing this template.

Although this parameter is marked as optional, the request must contain either a ContactFlowId or a field of type QUICK_CONNECT.

type SelfAssignFlowId:

string

param SelfAssignFlowId:

The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.

type ContactHooks:

dict

param ContactHooks:

The event hooks that are set on tasks created by using this template.

  • WrapUpFlowId (string) --

    The identifier of the flow module that runs when an agent attempts to disconnect from a task created by referencing this template. If no agent ever connects to the task, the flow module runs when the task is terminated.

type Constraints:

dict

param Constraints:

Constraints that are applicable to the fields listed. Although this parameter is marked as optional in the API model, the service requires it when calling CreateTaskTemplate or UpdateTaskTemplate. The RequiredFields array must contain at least one element, and the field of type NAME must be included in RequiredFields.

  • RequiredFields (list) --

    Lists the fields that are required to be filled by agents.

    • (dict) --

      Information about a required field.

      • Id (dict) --

        The unique identifier for the field.

        • Name (string) --

          The name of the task template field.

  • ReadOnlyFields (list) --

    Lists the fields that are read-only to agents, and cannot be edited.

    • (dict) --

      Indicates a field that is read-only to an agent.

      • Id (dict) --

        Identifier of the read-only field.

        • Name (string) --

          The name of the task template field.

  • InvisibleFields (list) --

    Lists the fields that are invisible to agents.

    • (dict) --

      A field that is invisible to an agent.

      • Id (dict) --

        Identifier of the invisible field.

        • Name (string) --

          The name of the task template field.

type Defaults:

dict

param Defaults:

The default values for fields when a task is created by referencing this template.

  • DefaultFieldValues (list) --

    Default value for the field.

    • (dict) --

      Describes a default field and its corresponding value.

      • Id (dict) --

        Identifier of a field.

        • Name (string) --

          The name of the task template field.

      • DefaultValue (string) --

        Default value for the field.

type Status:

string

param Status:

Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can only be created from ACTIVE templates. If a template is marked as INACTIVE, then a task that refers to this template cannot be created.

type Fields:

list

param Fields:

[REQUIRED]

Fields that are part of the template.

The request must contain exactly one field of type NAME. This field must also be listed in the RequiredFields array within the Constraints parameter.

  • (dict) --

    Describes a single task template field.

    • Id (dict) -- [REQUIRED]

      The unique identifier for the field.

      • Name (string) --

        The name of the task template field.

    • Description (string) --

      The description of the field.

    • Type (string) --

      Indicates the type of field.

    • SingleSelectOptions (list) --

      A list of options for a single select field.

      • (string) --

type ClientToken:

string

param ClientToken:

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.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'Id': 'string',
    'Arn': 'string'
}

Response Structure

  • (dict) --

    • Id (string) --

      The identifier of the task template resource.

    • Arn (string) --

      The Amazon Resource Name (ARN) for the task template resource.

GetTaskTemplate (updated) Link ¶
Changes (response)
{'ContactHooks': {'WrapUpFlowId': 'string'}}

Gets details about a specific task template in the specified Connect Customer instance.

See also: AWS API Documentation

Request Syntax

client.get_task_template(
    InstanceId='string',
    TaskTemplateId='string',
    SnapshotVersion='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

type TaskTemplateId:

string

param TaskTemplateId:

[REQUIRED]

A unique identifier for the task template.

type SnapshotVersion:

string

param SnapshotVersion:

The system generated version of a task template that is associated with a task, when the task is created.

rtype:

dict

returns:

Response Syntax

{
    'InstanceId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ContactFlowId': 'string',
    'SelfAssignFlowId': 'string',
    'ContactHooks': {
        'WrapUpFlowId': 'string'
    },
    'Constraints': {
        'RequiredFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'ReadOnlyFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'InvisibleFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ]
    },
    'Defaults': {
        'DefaultFieldValues': [
            {
                'Id': {
                    'Name': 'string'
                },
                'DefaultValue': 'string'
            },
        ]
    },
    'Fields': [
        {
            'Id': {
                'Name': 'string'
            },
            'Description': 'string',
            'Type': 'NAME'|'DESCRIPTION'|'SCHEDULED_TIME'|'QUICK_CONNECT'|'URL'|'NUMBER'|'TEXT'|'TEXT_AREA'|'DATE_TIME'|'BOOLEAN'|'SINGLE_SELECT'|'EMAIL'|'SELF_ASSIGN'|'EXPIRY_DURATION',
            'SingleSelectOptions': [
                'string',
            ]
        },
    ],
    'Status': 'ACTIVE'|'INACTIVE',
    'LastModifiedTime': datetime(2015, 1, 1),
    'CreatedTime': datetime(2015, 1, 1),
    'Tags': {
        'string': 'string'
    }
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

    • Id (string) --

      A unique identifier for the task template.

    • Arn (string) --

      The Amazon Resource Name (ARN).

    • Name (string) --

      The name of the task template.

    • Description (string) --

      The description of the task template.

    • ContactFlowId (string) --

      The identifier of the flow that runs by default when a task is created by referencing this template.

    • SelfAssignFlowId (string) --

      The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.

    • ContactHooks (dict) --

      The event hooks that are set on tasks created by using this template.

      • WrapUpFlowId (string) --

        The identifier of the flow module that runs when an agent attempts to disconnect from a task created by referencing this template. If no agent ever connects to the task, the flow module runs when the task is terminated.

    • Constraints (dict) --

      Constraints that are applicable to the fields listed. Although this parameter is marked as optional in the API model, the service requires it when calling CreateTaskTemplate or UpdateTaskTemplate. The RequiredFields array must contain at least one element, and the field of type NAME must be included in RequiredFields.

      • RequiredFields (list) --

        Lists the fields that are required to be filled by agents.

        • (dict) --

          Information about a required field.

          • Id (dict) --

            The unique identifier for the field.

            • Name (string) --

              The name of the task template field.

      • ReadOnlyFields (list) --

        Lists the fields that are read-only to agents, and cannot be edited.

        • (dict) --

          Indicates a field that is read-only to an agent.

          • Id (dict) --

            Identifier of the read-only field.

            • Name (string) --

              The name of the task template field.

      • InvisibleFields (list) --

        Lists the fields that are invisible to agents.

        • (dict) --

          A field that is invisible to an agent.

          • Id (dict) --

            Identifier of the invisible field.

            • Name (string) --

              The name of the task template field.

    • Defaults (dict) --

      The default values for fields when a task is created by referencing this template.

      • DefaultFieldValues (list) --

        Default value for the field.

        • (dict) --

          Describes a default field and its corresponding value.

          • Id (dict) --

            Identifier of a field.

            • Name (string) --

              The name of the task template field.

          • DefaultValue (string) --

            Default value for the field.

    • Fields (list) --

      Fields that are part of the template.

      • (dict) --

        Describes a single task template field.

        • Id (dict) --

          The unique identifier for the field.

          • Name (string) --

            The name of the task template field.

        • Description (string) --

          The description of the field.

        • Type (string) --

          Indicates the type of field.

        • SingleSelectOptions (list) --

          A list of options for a single select field.

          • (string) --

    • Status (string) --

      Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can only be created from ACTIVE templates. If a template is marked as INACTIVE, then a task that refers to this template cannot be created.

    • LastModifiedTime (datetime) --

      The timestamp when the task template was last modified.

    • CreatedTime (datetime) --

      The timestamp when the task template was created.

    • Tags (dict) --

      The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

      • (string) --

        • (string) --

UpdateTaskTemplate (updated) Link ¶
Changes (both)
{'ContactHooks': {'WrapUpFlowId': 'string'}}

Updates details about a specific task template in the specified Connect Customer instance. This operation does not support partial updates. Instead it does a full update of template content.

See also: AWS API Documentation

Request Syntax

client.update_task_template(
    TaskTemplateId='string',
    InstanceId='string',
    Name='string',
    Description='string',
    ContactFlowId='string',
    SelfAssignFlowId='string',
    ContactHooks={
        'WrapUpFlowId': 'string'
    },
    Constraints={
        'RequiredFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'ReadOnlyFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'InvisibleFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ]
    },
    Defaults={
        'DefaultFieldValues': [
            {
                'Id': {
                    'Name': 'string'
                },
                'DefaultValue': 'string'
            },
        ]
    },
    Status='ACTIVE'|'INACTIVE',
    Fields=[
        {
            'Id': {
                'Name': 'string'
            },
            'Description': 'string',
            'Type': 'NAME'|'DESCRIPTION'|'SCHEDULED_TIME'|'QUICK_CONNECT'|'URL'|'NUMBER'|'TEXT'|'TEXT_AREA'|'DATE_TIME'|'BOOLEAN'|'SINGLE_SELECT'|'EMAIL'|'SELF_ASSIGN'|'EXPIRY_DURATION',
            'SingleSelectOptions': [
                'string',
            ]
        },
    ]
)
type TaskTemplateId:

string

param TaskTemplateId:

[REQUIRED]

A unique identifier for the task template.

type InstanceId:

string

param InstanceId:

[REQUIRED]

The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

type Name:

string

param Name:

The name of the task template.

type Description:

string

param Description:

The description of the task template.

type ContactFlowId:

string

param ContactFlowId:

The identifier of the flow that runs by default when a task is created by referencing this template.

Although this parameter is marked as optional, the request must contain either a ContactFlowId or a field of type QUICK_CONNECT.

type SelfAssignFlowId:

string

param SelfAssignFlowId:

The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.

type ContactHooks:

dict

param ContactHooks:

The event hooks that are set on tasks created by using this template.

  • WrapUpFlowId (string) --

    The identifier of the flow module that runs when an agent attempts to disconnect from a task created by referencing this template. If no agent ever connects to the task, the flow module runs when the task is terminated.

type Constraints:

dict

param Constraints:

Constraints that are applicable to the fields listed. Although this parameter is marked as optional in the API model, the service requires it when calling CreateTaskTemplate or UpdateTaskTemplate. The RequiredFields array must contain at least one element, and the field of type NAME must be included in RequiredFields.

  • RequiredFields (list) --

    Lists the fields that are required to be filled by agents.

    • (dict) --

      Information about a required field.

      • Id (dict) --

        The unique identifier for the field.

        • Name (string) --

          The name of the task template field.

  • ReadOnlyFields (list) --

    Lists the fields that are read-only to agents, and cannot be edited.

    • (dict) --

      Indicates a field that is read-only to an agent.

      • Id (dict) --

        Identifier of the read-only field.

        • Name (string) --

          The name of the task template field.

  • InvisibleFields (list) --

    Lists the fields that are invisible to agents.

    • (dict) --

      A field that is invisible to an agent.

      • Id (dict) --

        Identifier of the invisible field.

        • Name (string) --

          The name of the task template field.

type Defaults:

dict

param Defaults:

The default values for fields when a task is created by referencing this template.

  • DefaultFieldValues (list) --

    Default value for the field.

    • (dict) --

      Describes a default field and its corresponding value.

      • Id (dict) --

        Identifier of a field.

        • Name (string) --

          The name of the task template field.

      • DefaultValue (string) --

        Default value for the field.

type Status:

string

param Status:

Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can only be created from ACTIVE templates. If a template is marked as INACTIVE, then a task that refers to this template cannot be created.

Although this parameter is marked as optional, the service requires it when calling UpdateTaskTemplate.

type Fields:

list

param Fields:

Fields that are part of the template.

The request must contain exactly one field of type NAME. This field must also be listed in the RequiredFields array within the Constraints parameter.

  • (dict) --

    Describes a single task template field.

    • Id (dict) -- [REQUIRED]

      The unique identifier for the field.

      • Name (string) --

        The name of the task template field.

    • Description (string) --

      The description of the field.

    • Type (string) --

      Indicates the type of field.

    • SingleSelectOptions (list) --

      A list of options for a single select field.

      • (string) --

rtype:

dict

returns:

Response Syntax

{
    'InstanceId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ContactFlowId': 'string',
    'SelfAssignFlowId': 'string',
    'ContactHooks': {
        'WrapUpFlowId': 'string'
    },
    'Constraints': {
        'RequiredFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'ReadOnlyFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'InvisibleFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ]
    },
    'Defaults': {
        'DefaultFieldValues': [
            {
                'Id': {
                    'Name': 'string'
                },
                'DefaultValue': 'string'
            },
        ]
    },
    'Fields': [
        {
            'Id': {
                'Name': 'string'
            },
            'Description': 'string',
            'Type': 'NAME'|'DESCRIPTION'|'SCHEDULED_TIME'|'QUICK_CONNECT'|'URL'|'NUMBER'|'TEXT'|'TEXT_AREA'|'DATE_TIME'|'BOOLEAN'|'SINGLE_SELECT'|'EMAIL'|'SELF_ASSIGN'|'EXPIRY_DURATION',
            'SingleSelectOptions': [
                'string',
            ]
        },
    ],
    'Status': 'ACTIVE'|'INACTIVE',
    'LastModifiedTime': datetime(2015, 1, 1),
    'CreatedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • InstanceId (string) --

      The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

    • Id (string) --

      The identifier of the task template resource.

    • Arn (string) --

      The Amazon Resource Name (ARN) for the task template resource.

    • Name (string) --

      The name of the task template.

    • Description (string) --

      The description of the task template.

    • ContactFlowId (string) --

      The identifier of the flow that runs by default when a task is created by referencing this template.

    • SelfAssignFlowId (string) --

      The ContactFlowId for the flow that will be run if this template is used to create a self-assigned task.

    • ContactHooks (dict) --

      The event hooks that are set on tasks created by using this template.

      • WrapUpFlowId (string) --

        The identifier of the flow module that runs when an agent attempts to disconnect from a task created by referencing this template. If no agent ever connects to the task, the flow module runs when the task is terminated.

    • Constraints (dict) --

      Constraints that are applicable to the fields listed. Although this parameter is marked as optional in the API model, the service requires it when calling CreateTaskTemplate or UpdateTaskTemplate. The RequiredFields array must contain at least one element, and the field of type NAME must be included in RequiredFields.

      • RequiredFields (list) --

        Lists the fields that are required to be filled by agents.

        • (dict) --

          Information about a required field.

          • Id (dict) --

            The unique identifier for the field.

            • Name (string) --

              The name of the task template field.

      • ReadOnlyFields (list) --

        Lists the fields that are read-only to agents, and cannot be edited.

        • (dict) --

          Indicates a field that is read-only to an agent.

          • Id (dict) --

            Identifier of the read-only field.

            • Name (string) --

              The name of the task template field.

      • InvisibleFields (list) --

        Lists the fields that are invisible to agents.

        • (dict) --

          A field that is invisible to an agent.

          • Id (dict) --

            Identifier of the invisible field.

            • Name (string) --

              The name of the task template field.

    • Defaults (dict) --

      The default values for fields when a task is created by referencing this template.

      • DefaultFieldValues (list) --

        Default value for the field.

        • (dict) --

          Describes a default field and its corresponding value.

          • Id (dict) --

            Identifier of a field.

            • Name (string) --

              The name of the task template field.

          • DefaultValue (string) --

            Default value for the field.

    • Fields (list) --

      Fields that are part of the template.

      • (dict) --

        Describes a single task template field.

        • Id (dict) --

          The unique identifier for the field.

          • Name (string) --

            The name of the task template field.

        • Description (string) --

          The description of the field.

        • Type (string) --

          Indicates the type of field.

        • SingleSelectOptions (list) --

          A list of options for a single select field.

          • (string) --

    • Status (string) --

      Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can only be created from ACTIVE templates. If a template is marked as INACTIVE, then a task that refers to this template cannot be created.

    • LastModifiedTime (datetime) --

      The timestamp when the task template was last modified.

    • CreatedTime (datetime) --

      The timestamp when the task template was created.