libZSservicesZSamazonka-connectZSamazonka-connect
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Connect.StartChatContact

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

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

Synopsis

Creating a Request

data StartChatContact Source #

See: newStartChatContact smart constructor.

Constructors

StartChatContact' 

Fields

  • clientToken :: Maybe Text

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

  • attributes :: Maybe (HashMap Text Text)

    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.

  • initialMessage :: Maybe ChatMessage

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

  • instanceId :: Text

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

  • contactFlowId :: Text

    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

  • participantDetails :: ParticipantDetails

    Information identifying the participant.

Instances

Instances details
Eq StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Read StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Show StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Generic StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Associated Types

type Rep StartChatContact :: Type -> Type #

NFData StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Methods

rnf :: StartChatContact -> () #

Hashable StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

ToJSON StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

AWSRequest StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Associated Types

type AWSResponse StartChatContact #

ToHeaders StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

ToPath StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

ToQuery StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

type Rep StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

type Rep StartChatContact = D1 ('MetaData "StartChatContact" "Amazonka.Connect.StartChatContact" "libZSservicesZSamazonka-connectZSamazonka-connect" 'False) (C1 ('MetaCons "StartChatContact'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "initialMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ChatMessage)))) :*: (S1 ('MetaSel ('Just "instanceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "contactFlowId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "participantDetails") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ParticipantDetails)))))
type AWSResponse StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

newStartChatContact Source #

Create a value of StartChatContact with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:clientToken:StartChatContact', startChatContact_clientToken - A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

$sel:attributes:StartChatContact', startChatContact_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.

$sel:initialMessage:StartChatContact', startChatContact_initialMessage - The initial message to be sent to the newly created chat.

$sel:instanceId:StartChatContact', startChatContact_instanceId - The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.

$sel:contactFlowId:StartChatContact', startChatContact_contactFlowId - 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

$sel:participantDetails:StartChatContact', startChatContact_participantDetails - Information identifying the participant.

Request Lenses

startChatContact_clientToken :: Lens' StartChatContact (Maybe Text) Source #

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

startChatContact_attributes :: Lens' StartChatContact (Maybe (HashMap Text Text)) Source #

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.

startChatContact_initialMessage :: Lens' StartChatContact (Maybe ChatMessage) Source #

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

startChatContact_instanceId :: Lens' StartChatContact Text Source #

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

startChatContact_contactFlowId :: Lens' StartChatContact Text Source #

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

Destructuring the Response

data StartChatContactResponse Source #

See: newStartChatContactResponse smart constructor.

Constructors

StartChatContactResponse' 

Fields

Instances

Instances details
Eq StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Read StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Show StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Generic StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Associated Types

type Rep StartChatContactResponse :: Type -> Type #

NFData StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

type Rep StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

type Rep StartChatContactResponse = D1 ('MetaData "StartChatContactResponse" "Amazonka.Connect.StartChatContact" "libZSservicesZSamazonka-connectZSamazonka-connect" 'False) (C1 ('MetaCons "StartChatContactResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "participantToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "participantId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "contactId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newStartChatContactResponse Source #

Create a value of StartChatContactResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:participantToken:StartChatContactResponse', startChatContactResponse_participantToken - The token used by the chat participant to call CreateParticipantConnection. The participant token is valid for the lifetime of a chat participant.

$sel:participantId:StartChatContactResponse', startChatContactResponse_participantId - The identifier for a chat participant. The participantId for a chat participant is the same throughout the chat lifecycle.

$sel:contactId:StartChatContactResponse', startChatContactResponse_contactId - The identifier of this contact within the Amazon Connect instance.

$sel:httpStatus:StartChatContactResponse', startChatContactResponse_httpStatus - The response's http status code.

Response Lenses

startChatContactResponse_participantToken :: Lens' StartChatContactResponse (Maybe Text) Source #

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

startChatContactResponse_participantId :: Lens' StartChatContactResponse (Maybe Text) Source #

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

startChatContactResponse_contactId :: Lens' StartChatContactResponse (Maybe Text) Source #

The identifier of this contact within the Amazon Connect instance.