Starts a chat contact with an AI agent¶
Description¶
Starts a chat contact with an AI agent.
Use the returned ParticipantToken with the CreateParticipantConnection operation.
For more information about chat, see the following topics in the Connect Customer Administrator Guide:
- Concepts: Web and mobile messaging capabilities in Connect Customer
- Connect Customer Chat security best practices
Usage¶
connect_start_assistant_contact(InstanceId, AiAgent, ParticipantDetails,
InitialMessage, Attributes, ClientToken, PersistentChat,
RelatedContactId)
Arguments¶
InstanceId
[required] The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
AiAgent
[required] The AI agent configuration for this contact.
ParticipantDetails
[required] The display name and other details that identify the chat participant.
InitialMessage
The initial message to send to the newly created chat.
Attributes
A map of key-value pairs to associate with the contact. We make these attributes available to flows as standard contact attributes.
You can provide up to 32,768 UTF-8 bytes across all key-value pairs for each contact.
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.
PersistentChat
The configuration that enables persistent chat. For more information about persistent chat and its use cases, see Enable persistent chat.
RelatedContactId
The identifier of an Connect Customer contact related to the new assistant contact.
You cannot provide both RelatedContactId and PersistentChat.
Value¶
A list with the following syntax:
list(
ContactId = "string",
ParticipantId = "string",
ParticipantToken = "string",
ContinuedFromContactId = "string"
)
Request syntax¶
svc$start_assistant_contact(
InstanceId = "string",
AiAgent = list(
AiAgentId = "string"
),
ParticipantDetails = list(
DisplayName = "string"
),
InitialMessage = list(
ContentType = "string",
Content = "string"
),
Attributes = list(
"string"
),
ClientToken = "string",
PersistentChat = list(
RehydrationType = "ENTIRE_PAST_SESSION"|"FROM_SEGMENT",
SourceContactId = "string"
),
RelatedContactId = "string"
)