Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data StartChatContact = StartChatContact' {}
- newStartChatContact :: Text -> Text -> ParticipantDetails -> StartChatContact
- startChatContact_clientToken :: Lens' StartChatContact (Maybe Text)
- startChatContact_attributes :: Lens' StartChatContact (Maybe (HashMap Text Text))
- startChatContact_initialMessage :: Lens' StartChatContact (Maybe ChatMessage)
- startChatContact_instanceId :: Lens' StartChatContact Text
- startChatContact_contactFlowId :: Lens' StartChatContact Text
- startChatContact_participantDetails :: Lens' StartChatContact ParticipantDetails
- data StartChatContactResponse = StartChatContactResponse' {}
- newStartChatContactResponse :: Int -> StartChatContactResponse
- startChatContactResponse_participantToken :: Lens' StartChatContactResponse (Maybe Text)
- startChatContactResponse_participantId :: Lens' StartChatContactResponse (Maybe Text)
- startChatContactResponse_contactId :: 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: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
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:
$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.
startChatContactResponse_httpStatus :: Lens' StartChatContactResponse Int Source #
The response's http status code.