amazonka-connect-2.0: Amazon Connect Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Connect.StartChatContact

Description

Initiates a 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.

Synopsis

Creating a Request

data StartChatContact Source #

See: newStartChatContact smart constructor.

Constructors

StartChatContact' 

Fields

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

  • chatDurationInMinutes :: Maybe Natural

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

  • clientToken :: Maybe Text

    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.

  • initialMessage :: Maybe ChatMessage

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

  • supportedMessagingContentTypes :: Maybe [Text]

    The supported chat message content types. Content types must always contain text/plain. You can then put any other supported type in the list. For example, all the following lists are valid because they contain text/plain: [text/plain, text/markdown, application/json], [text/markdown, text/plain], [text/plain, application/json].

  • 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 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 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:

    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
ToJSON StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.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

AWSRequest StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Associated Types

type AWSResponse StartChatContact #

Generic StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Associated Types

type Rep StartChatContact :: Type -> Type #

Read StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Show StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

NFData StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Methods

rnf :: StartChatContact -> () #

Eq StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Hashable StartChatContact Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

type AWSResponse 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" "amazonka-connect-2.0-IAACrecRcUS5AABe9BOFyN" 'False) (C1 ('MetaCons "StartChatContact'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: S1 ('MetaSel ('Just "chatDurationInMinutes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "initialMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ChatMessage)))) :*: ((S1 ('MetaSel ('Just "supportedMessagingContentTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: 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)))))

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: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 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:chatDurationInMinutes:StartChatContact', startChatContact_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).

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

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

$sel:supportedMessagingContentTypes:StartChatContact', startChatContact_supportedMessagingContentTypes - The supported chat message content types. Content types must always contain text/plain. You can then put any other supported type in the list. For example, all the following lists are valid because they contain text/plain: [text/plain, text/markdown, application/json], [text/markdown, text/plain], [text/plain, application/json].

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

StartChatContact, startChatContact_contactFlowId - The identifier of the 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 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:

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_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 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_chatDurationInMinutes :: Lens' StartChatContact (Maybe Natural) Source #

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

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

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.

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

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

startChatContact_supportedMessagingContentTypes :: Lens' StartChatContact (Maybe [Text]) Source #

The supported chat message content types. Content types must always contain text/plain. You can then put any other supported type in the list. For example, all the following lists are valid because they contain text/plain: [text/plain, text/markdown, application/json], [text/markdown, text/plain], [text/plain, application/json].

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 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 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:

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
Generic StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Associated Types

type Rep StartChatContactResponse :: Type -> Type #

Read StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Show StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

NFData StartChatContactResponse Source # 
Instance details

Defined in Amazonka.Connect.StartChatContact

Eq 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" "amazonka-connect-2.0-IAACrecRcUS5AABe9BOFyN" 'False) (C1 ('MetaCons "StartChatContactResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "contactId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "participantId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "participantToken") '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:

StartChatContactResponse, startChatContactResponse_contactId - The identifier of this contact within the Amazon Connect instance.

$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: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:httpStatus:StartChatContactResponse', startChatContactResponse_httpStatus - The response's http status code.

Response Lenses

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

The identifier of this contact within the Amazon Connect instance.

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