Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data StartChatContact = StartChatContact' {}
- newStartChatContact :: Text -> Text -> ParticipantDetails -> StartChatContact
- startChatContact_attributes :: Lens' StartChatContact (Maybe (HashMap Text Text))
- startChatContact_chatDurationInMinutes :: Lens' StartChatContact (Maybe Natural)
- startChatContact_clientToken :: Lens' StartChatContact (Maybe Text)
- startChatContact_initialMessage :: Lens' StartChatContact (Maybe ChatMessage)
- startChatContact_supportedMessagingContentTypes :: Lens' StartChatContact (Maybe [Text])
- startChatContact_instanceId :: Lens' StartChatContact Text
- startChatContact_contactFlowId :: Lens' StartChatContact Text
- startChatContact_participantDetails :: Lens' StartChatContact ParticipantDetails
- data StartChatContactResponse = StartChatContactResponse' {}
- newStartChatContactResponse :: Int -> StartChatContactResponse
- startChatContactResponse_contactId :: Lens' StartChatContactResponse (Maybe Text)
- startChatContactResponse_participantId :: Lens' StartChatContactResponse (Maybe Text)
- startChatContactResponse_participantToken :: Lens' StartChatContactResponse (Maybe Text)
- startChatContactResponse_httpStatus :: Lens' StartChatContactResponse Int
Creating a Request
data StartChatContact Source #
See: newStartChatContact
smart constructor.
StartChatContact' | |
|
Instances
:: Text | |
-> Text | |
-> ParticipantDetails | |
-> StartChatContact |
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
startChatContact_participantDetails :: Lens' StartChatContact ParticipantDetails Source #
Information identifying the participant.
Destructuring the Response
data StartChatContactResponse Source #
See: newStartChatContactResponse
smart constructor.
StartChatContactResponse' | |
|
Instances
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.
startChatContactResponse_httpStatus :: Lens' StartChatContactResponse Int Source #
The response's http status code.