persistent-chat-feature.md
July 16, 2025 · View on GitHub
Enabling Persistent Chat
No changes are need are needed to ChatJS for enabling Persistent Chat. You'll need to update your backend making the StartChatContact request, or the sample startChatContactAPI lambda if you deployed the boilerplate CloudFormation template.
Overview
For latest documentation, please follow instructions in "Admin guide: Enable persistent chat"
Persistent chats enable customers to resume previous conversations with the context, metadata, and transcripts carried over, eliminating the need for customers to repeat themselves and allowing agents to provide personalized service with access to the entire conversation history. To set up persistent chat experiences, simply provide a previous contact id when calling the StartChatContact API to create a new chat contact.
Learn more about persistent chat: https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html
Reference
- Initial release date: 1/20/2023
- Admin Guide Documentation
- Launch Annoucement
Configuration
⚠️ Only chat sessions that have ended are allowed to rehydrate onto a new chat session.
Chat transcripts are pulled from previous chat contacts, and displayed to the customer and agent.
To enable persistent chat, provide the previous contactId in the SourceContactId parameter of StartChatContact API.
PUT /contact/chat HTTP/1.1
Content-type: application/json
{
"Attributes": {
"string" : "string"
},
"ContactFlowId": "string",
"InitialMessage": {
"Content": "string",
"ContentType": "string"
},
"InstanceId": "string",
... // other chat fields
// NEW Attribute for persistent chat
"PersistentChat" : {
"SourceContactId": "2222222-aaaa-bbbb-2222-222222222222222"
"RehydrationType": "FROM_SEGMENT" // ENTIRE_PAST_SESSION | FROM_SEGMENT
}
}