public class StartChatContactRequest
extends com.amazonaws.AmazonWebServiceRequest
implements java.io.Serializable
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.
| Constructor and Description |
|---|
StartChatContactRequest() |
| Modifier and Type | Method and Description |
|---|---|
StartChatContactRequest |
addAttributesEntry(java.lang.String key,
java.lang.String value)
A custom key-value pair using an attribute map.
|
StartChatContactRequest |
clearAttributesEntries()
Removes all the entries added into Attributes.
|
boolean |
equals(java.lang.Object obj) |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
A custom key-value pair using an attribute map.
|
java.lang.Integer |
getChatDurationInMinutes()
The total duration of the newly started chat session.
|
java.lang.String |
getClientToken()
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
|
java.lang.String |
getContactFlowId()
The identifier of the flow for initiating the chat.
|
ChatMessage |
getInitialMessage()
The initial message to be sent to the newly created chat.
|
java.lang.String |
getInstanceId()
The identifier of the Amazon Connect instance.
|
ParticipantDetails |
getParticipantDetails()
Information identifying the participant.
|
PersistentChat |
getPersistentChat()
Enable persistent chats.
|
java.lang.String |
getRelatedContactId()
The unique identifier for an Amazon Connect contact.
|
java.util.List<java.lang.String> |
getSupportedMessagingContentTypes()
The supported chat message content types.
|
int |
hashCode() |
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
A custom key-value pair using an attribute map.
|
void |
setChatDurationInMinutes(java.lang.Integer chatDurationInMinutes)
The total duration of the newly started chat session.
|
void |
setClientToken(java.lang.String clientToken)
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
|
void |
setContactFlowId(java.lang.String contactFlowId)
The identifier of the flow for initiating the chat.
|
void |
setInitialMessage(ChatMessage initialMessage)
The initial message to be sent to the newly created chat.
|
void |
setInstanceId(java.lang.String instanceId)
The identifier of the Amazon Connect instance.
|
void |
setParticipantDetails(ParticipantDetails participantDetails)
Information identifying the participant.
|
void |
setPersistentChat(PersistentChat persistentChat)
Enable persistent chats.
|
void |
setRelatedContactId(java.lang.String relatedContactId)
The unique identifier for an Amazon Connect contact.
|
void |
setSupportedMessagingContentTypes(java.util.Collection<java.lang.String> supportedMessagingContentTypes)
The supported chat message content types.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
StartChatContactRequest |
withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
A custom key-value pair using an attribute map.
|
StartChatContactRequest |
withChatDurationInMinutes(java.lang.Integer chatDurationInMinutes)
The total duration of the newly started chat session.
|
StartChatContactRequest |
withClientToken(java.lang.String clientToken)
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request.
|
StartChatContactRequest |
withContactFlowId(java.lang.String contactFlowId)
The identifier of the flow for initiating the chat.
|
StartChatContactRequest |
withInitialMessage(ChatMessage initialMessage)
The initial message to be sent to the newly created chat.
|
StartChatContactRequest |
withInstanceId(java.lang.String instanceId)
The identifier of the Amazon Connect instance.
|
StartChatContactRequest |
withParticipantDetails(ParticipantDetails participantDetails)
Information identifying the participant.
|
StartChatContactRequest |
withPersistentChat(PersistentChat persistentChat)
Enable persistent chats.
|
StartChatContactRequest |
withRelatedContactId(java.lang.String relatedContactId)
The unique identifier for an Amazon Connect contact.
|
StartChatContactRequest |
withSupportedMessagingContentTypes(java.util.Collection<java.lang.String> supportedMessagingContentTypes)
The supported chat message content types.
|
StartChatContactRequest |
withSupportedMessagingContentTypes(java.lang.String... supportedMessagingContentTypes)
The supported chat message content types.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic java.lang.String getInstanceId()
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Constraints:
Length: 1 - 100
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
public void setInstanceId(java.lang.String instanceId)
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Constraints:
Length: 1 - 100
instanceId - The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
public StartChatContactRequest withInstanceId(java.lang.String instanceId)
The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 100
instanceId - The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
public java.lang.String getContactFlowId()
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
Constraints:
Length: - 500
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
public void setContactFlowId(java.lang.String 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
Constraints:
Length: - 500
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
public StartChatContactRequest withContactFlowId(java.lang.String 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
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 500
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
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
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.
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.
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> 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.
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.
public StartChatContactRequest withAttributes(java.util.Map<java.lang.String,java.lang.String> 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.
Returns a reference to this object so that method calls can be chained together.
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.
public StartChatContactRequest addAttributesEntry(java.lang.String key, java.lang.String value)
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.
The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into Attributes.value - The corresponding value of the entry to be added into
Attributes.public StartChatContactRequest clearAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public ParticipantDetails getParticipantDetails()
Information identifying the participant.
Information identifying the participant.
public void setParticipantDetails(ParticipantDetails participantDetails)
Information identifying the participant.
participantDetails - Information identifying the participant.
public StartChatContactRequest withParticipantDetails(ParticipantDetails participantDetails)
Information identifying the participant.
Returns a reference to this object so that method calls can be chained together.
participantDetails - Information identifying the participant.
public ChatMessage getInitialMessage()
The initial message to be sent to the newly created chat.
The initial message to be sent to the newly created chat.
public void setInitialMessage(ChatMessage initialMessage)
The initial message to be sent to the newly created chat.
initialMessage - The initial message to be sent to the newly created chat.
public StartChatContactRequest withInitialMessage(ChatMessage initialMessage)
The initial message to be sent to the newly created chat.
Returns a reference to this object so that method calls can be chained together.
initialMessage - The initial message to be sent to the newly created chat.
public java.lang.String getClientToken()
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.
Constraints:
Length: - 500
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.
public void setClientToken(java.lang.String 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.
Constraints:
Length: - 500
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.
public StartChatContactRequest withClientToken(java.lang.String 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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: - 500
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.
public java.lang.Integer getChatDurationInMinutes()
The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
Constraints:
Range: 60 - 10080
The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
public void setChatDurationInMinutes(java.lang.Integer chatDurationInMinutes)
The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
Constraints:
Range: 60 - 10080
chatDurationInMinutes - The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
public StartChatContactRequest withChatDurationInMinutes(java.lang.Integer chatDurationInMinutes)
The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 60 - 10080
chatDurationInMinutes - The total duration of the newly started chat session. If not specified, the chat session duration defaults to 25 hour. The minimum configurable time is 60 minutes. The maximum configurable time is 10,080 minutes (7 days).
public java.util.List<java.lang.String> getSupportedMessagingContentTypes()
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive is
required to use the Show view flow block.
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive
, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive
is required to use the Show view flow block.
public void setSupportedMessagingContentTypes(java.util.Collection<java.lang.String> supportedMessagingContentTypes)
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive is
required to use the Show view flow block.
supportedMessagingContentTypes -
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive
, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive
is required to use the Show view flow block.
public StartChatContactRequest withSupportedMessagingContentTypes(java.lang.String... supportedMessagingContentTypes)
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive is
required to use the Show view flow block.
Returns a reference to this object so that method calls can be chained together.
supportedMessagingContentTypes -
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive
, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive
is required to use the Show view flow block.
public StartChatContactRequest withSupportedMessagingContentTypes(java.util.Collection<java.lang.String> supportedMessagingContentTypes)
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive is
required to use the Show view flow block.
Returns a reference to this object so that method calls can be chained together.
supportedMessagingContentTypes -
The supported chat message content types. Supported types are
text/plain, text/markdown,
application/json,
application/vnd.amazonaws.connect.message.interactive
, and
application/vnd.amazonaws.connect.message.interactive.response
.
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, application/vnd.amazonaws.connect.message.interactive.response]
.
The type
application/vnd.amazonaws.connect.message.interactive
is required to use the Show view flow block.
public PersistentChat getPersistentChat()
Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.
Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.
public void setPersistentChat(PersistentChat persistentChat)
Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.
persistentChat - Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.
public StartChatContactRequest withPersistentChat(PersistentChat persistentChat)
Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.
Returns a reference to this object so that method calls can be chained together.
persistentChat - Enable persistent chats. For more information about enabling persistent chat, and for example use cases and how to configure for them, see Enable persistent chat.
public java.lang.String getRelatedContactId()
The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.
You cannot provide data for both RelatedContactId and PersistentChat.
Constraints:
Length: 1 - 256
The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.
You cannot provide data for both RelatedContactId and PersistentChat.
public void setRelatedContactId(java.lang.String relatedContactId)
The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.
You cannot provide data for both RelatedContactId and PersistentChat.
Constraints:
Length: 1 - 256
relatedContactId - The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.
You cannot provide data for both RelatedContactId and PersistentChat.
public StartChatContactRequest withRelatedContactId(java.lang.String relatedContactId)
The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.
You cannot provide data for both RelatedContactId and PersistentChat.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
relatedContactId - The unique identifier for an Amazon Connect contact. This identifier is related to the chat starting.
You cannot provide data for both RelatedContactId and PersistentChat.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object