[ aws . connect ]

start-chat-contact

Description

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

See ‘aws help’ for descriptions of global parameters.

Synopsis

  start-chat-contact
--instance-id <value>
--contact-flow-id <value>
[--attributes <value>]
--participant-details <value>
[--initial-message <value>]
[--client-token <value>]
[--chat-duration-in-minutes <value>]
[--supported-messaging-content-types <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--instance-id (string)

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

--contact-flow-id (string)

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

--attributes (map)

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.

key -> (string)

value -> (string)

Shorthand Syntax:

KeyName1=string,KeyName2=string

JSON Syntax:

{"string": "string"
  ...}

--participant-details (structure)

Information identifying the participant.

DisplayName -> (string)

Display name of the participant.

Shorthand Syntax:

DisplayName=string

JSON Syntax:

{
  "DisplayName": "string"
}

--initial-message (structure)

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

ContentType -> (string)

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

Content -> (string)

The content of the chat message.

Shorthand Syntax:

ContentType=string,Content=string

JSON Syntax:

{
  "ContentType": "string",
  "Content": "string"
}

--client-token (string)

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

--chat-duration-in-minutes (integer)

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).

--supported-messaging-content-types (list)

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

(string)

Syntax:

"string" "string" ...

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.

See ‘aws help’ for descriptions of global parameters.

Output

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.