How to Implement Persistent Chat in Amazon Connect Flows Using "Create Persistent Contact Association" Block

0

Hello AWS Community,

I’m working on enabling persistent chat in Amazon Connect to allow customers to resume previous chat sessions with full conversation history. I’ve followed the AWS documentation here: https://docs.aws.amazon.com/connect/latest/adminguide/chat-persistence.html , but I need clarification on some implementation details.

What I’ve Done:

  • Created a new contact flow in Amazon Connect and added the "Create persistent contact association" block after the chat contact is initiated.
  • Configured the block to use a user-defined attribute for the source contact ID, which I’m attempting to retrieve from system Initial Contact id.
  • Selected the ENTIRE_PAST_SESSION rehydration mode to resume the full chat history.

Challenges/Questions:

  • How do I correctly retrieve and pass the source contact ID to the "Create persistent contact association" block? Should I use a Lambda function or another block like "Get customer data"?
  • Is there a way to test the persistent chat functionality to confirm that transcripts and context are rehydrated correctly?
  • Are there specific S3 bucket permissions or configurations I need to ensure transcripts are accessible for persistent chat?
  • Can you share any best practices or example flows for implementing persistent chat?

Additional Details:

  • My Amazon Connect instance is configured for chat and voice, and I’m using an inbound chat flow.
  • I’m not using the StartChatContact API; I’m relying solely on the flow-based method.

I’m working on an Amazon Connect setup where customers initiate chats through a Communications Widget embedded on our website, and I need help tracking event logs from when the customer starts the chat to when it lands on and progresses through a contact flow. My goal is to monitor events like chat initiation, contact creation, and the execution of flow blocks in real-time or historically, using CloudWatch Logs or other tools. I’ve reviewed the AWS documentation on Amazon Connect flow logs and contact events, but I’m unclear on the exact steps to track these events for chat interactions.

Any guidance, examples, or confirmation of my approach would be greatly appreciated. Thank you in advance for your help!

1 Answer
0

To implement persistent chat in Amazon Connect flows using the "Create Persistent Contact Association" block, follow these steps and best practices:

  1. Retrieving and passing the source contact ID:

    • You can use the "Set contact attributes" block before the "Create persistent contact association" block to set a user-defined attribute with the source contact ID.
    • The source contact ID can be retrieved from your customer database or CRM system. You may need to use a Lambda function to fetch this information if it's not readily available in the flow.
  2. Testing persistent chat functionality:

    • To test, initiate a chat session and end it.
    • Start a new chat session for the same customer and verify that the previous chat history is rehydrated.
    • Check if the chat transcript from the previous session is displayed in the new session.
  3. S3 bucket configurations:

    • Ensure that your Amazon Connect instance has the necessary permissions to access the S3 bucket where chat transcripts are stored.
    • Verify that the S3 bucket retention policy aligns with your persistent chat requirements.
  4. Best practices and flow implementation:

    • Place the "Create persistent contact association" block early in your flow, typically after initial contact creation and any necessary customer identification steps.
    • Use the ENTIRE_PAST_SESSION rehydration type to resume the full chat history, as you've already configured.
    • Consider adding error handling branches to manage cases where the persistent chat association fails.
    • Implement logic to handle scenarios where a previous chat session doesn't exist for a customer.
  5. Additional considerations:

    • Remember that you can only enable persistence of a SourceContactID on a new chat once.
    • The "Create persistent contact association" block is recommended when using the Amazon Connect chat widget or Apple Messages for Business.
    • Ensure that your flow logic accounts for both new and returning customers, providing appropriate experiences for each.

By following these guidelines and properly configuring the "Create persistent contact association" block in your flow, you should be able to successfully implement persistent chat in Amazon Connect, allowing customers to resume previous conversations with full context and history.
Sources
Enable customers to resume chat conversations in Amazon Connect - Amazon Connect
Flow block in Amazon Connect: Create persistent contact association - Amazon Connect
PersistentChat - Amazon Connect
Release notes for Amazon Connect - Amazon Connect

profile picture
answered 6 days ago
  • I’m working on an Amazon Connect setup where customers initiate chats through a Communications Widget embedded on our website, and I need help tracking event logs from when the customer starts the chat to when it lands on and progresses through a contact flow. My goal is to monitor events like chat initiation, contact creation, and the execution of flow blocks in real-time or historically, using CloudWatch Logs or other tools. I’ve reviewed the AWS documentation on Amazon Connect flow logs and contact events, but I’m unclear on the exact steps to track these events for chat interactions.

  • The provided information to implement persistent chat in Amazon Connect flows is correct.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions