Connect / Client / start_task_contact



Initiates a flow to start a new task.

See also: AWS API Documentation

Request Syntax

response = client.start_task_contact(
        'string': 'string'
        'string': {
            'Value': 'string',
            'Type': 'URL'|'ATTACHMENT'|'NUMBER'|'STRING'|'DATE'|'EMAIL'
    ScheduledTime=datetime(2015, 1, 1),
  • InstanceId (string) –


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

  • PreviousContactId (string) – The identifier of the previous chat, voice, or task contact.

  • ContactFlowId (string) –

    The identifier of the flow for initiating the tasks. To see the ContactFlowId in the Amazon Connect console user interface, on the navigation menu go to Routing, Contact Flows. Choose the flow. On the flow page, under the name of the flow, choose Show additional flow information. The ContactFlowId is the last part of the ARN, shown here in bold:


  • Attributes (dict) –

    A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in flows just like any other contact attributes.

    There can be up to 32,768 UTF-8 bytes across all key-value pairs per contact. Attribute keys can include only alphanumeric, dash, and underscore characters.

    • (string) –

      • (string) –

  • Name (string) –


    The name of a task that is shown to an agent in the Contact Control Panel (CCP).

  • References (dict) –

    A formatted URL that is shown to an agent in the Contact Control Panel (CCP).

    • (string) –

      • (dict) –

        Well-formed data on a contact, used by agents to complete a contact request. You can have up to 4,096 UTF-8 bytes across all references for a contact.

        • Value (string) – [REQUIRED]

          A valid value for the reference. For example, for a URL reference, a formatted URL that is displayed to an agent in the Contact Control Panel (CCP).

        • Type (string) – [REQUIRED]

          The type of the reference. DATE must be of type Epoch timestamp.

  • Description (string) – A description of the task that is shown to an agent in the Contact Control Panel (CCP).

  • ClientToken (string) –

    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.

  • ScheduledTime (datetime) – The timestamp, in Unix Epoch seconds format, at which to start running the inbound flow. The scheduled time cannot be in the past. It must be within up to 6 days in future.

  • TaskTemplateId (string) – A unique identifier for the task template.

  • QuickConnectId (string) – The identifier for the quick connect.

  • RelatedContactId (string) – The contactId that is related to this contact.

Return type:



Response Syntax

    'ContactId': 'string'

Response Structure

  • (dict) –

    • ContactId (string) –

      The identifier of this contact within the Amazon Connect instance.


  • Connect.Client.exceptions.InvalidRequestException

  • Connect.Client.exceptions.InvalidParameterException

  • Connect.Client.exceptions.ResourceNotFoundException

  • Connect.Client.exceptions.ThrottlingException

  • Connect.Client.exceptions.ServiceQuotaExceededException

  • Connect.Client.exceptions.InternalServiceException