Amazon Connect Service

2022/03/11 - Amazon Connect Service - 1 updated api methods

Changes  This release adds support for enabling Rich Messaging when starting a new chat session via the StartChatContact API. Rich Messaging enables the following formatting options: bold, italics, hyperlinks, bulleted lists, and numbered lists.

StartChatContact (updated) Link ¶
Changes (request)
{'SupportedMessagingContentTypes': ['string']}

Initiates a contact flow to start a new chat for the customer. Response of this API provides a token required to obtain credentials from the CreateParticipantConnection API in the Amazon Connect Participant Service.

When a new chat contact is successfully created, clients must subscribe to the participant’s connection for the created chat within 5 minutes. This is achieved by invoking CreateParticipantConnection with WEBSOCKET and CONNECTION_CREDENTIALS.

A 429 error occurs in the following situations:

  • API rate limit is exceeded. API TPS throttling returns a TooManyRequests exception.

  • The quota for concurrent active chats is exceeded. Active chat throttling returns a LimitExceededException .

If you use the ChatDurationInMinutes parameter and receive a 400 error, your account may not support the ability to configure custom chat durations. For more information, contact Amazon Web Services Support.

For more information about chat, see Chat in the Amazon Connect Administrator Guide .

See also: AWS API Documentation

Request Syntax

client.start_chat_contact(
    InstanceId='string',
    ContactFlowId='string',
    Attributes={
        'string': 'string'
    },
    ParticipantDetails={
        'DisplayName': 'string'
    },
    InitialMessage={
        'ContentType': 'string',
        'Content': 'string'
    },
    ClientToken='string',
    ChatDurationInMinutes=123,
    SupportedMessagingContentTypes=[
        'string',
    ]
)
type InstanceId

string

param InstanceId

[REQUIRED]

The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

type ContactFlowId

string

param ContactFlowId

[REQUIRED]

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

arn:aws:connect:us-west-2:xxxxxxxxxxxx:instance/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/contact-flow/846ec553-a005-41c0-8341-xxxxxxxxxxxx

type Attributes

dict

param Attributes

A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes. They can be accessed in contact 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) --

type ParticipantDetails

dict

param ParticipantDetails

[REQUIRED]

Information identifying the participant.

  • DisplayName (string) -- [REQUIRED]

    Display name of the participant.

type InitialMessage

dict

param InitialMessage

The initial message to be sent to the newly created chat.

  • ContentType (string) -- [REQUIRED]

    The type of the content. Supported types are text/plain .

  • Content (string) -- [REQUIRED]

    The content of the chat message.

type ClientToken

string

param ClientToken

A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

This field is autopopulated if not provided.

type ChatDurationInMinutes

integer

param ChatDurationInMinutes

The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minumum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).

type SupportedMessagingContentTypes

list

param SupportedMessagingContentTypes

The supported chat message content types. Content types can be text/plain or both text/plain and text/markdown.

  • (string) --

rtype

dict

returns

Response Syntax

{
    'ContactId': 'string',
    'ParticipantId': 'string',
    'ParticipantToken': 'string'
}

Response Structure

  • (dict) --

    • ContactId (string) --

      The identifier of this contact within the Amazon Connect instance.

    • ParticipantId (string) --

      The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.

    • ParticipantToken (string) --

      The token used by the chat participant to call CreateParticipantConnection . The participant token is valid for the lifetime of a chat participant.