Enable post-chat survey - Amazon Connect

Enable post-chat survey

Post-chat survey enables you to collect end customer feedback immediately after a chat conversation ends. With the DisconnectOnCustomerExit parameter in the StartChatContact API, you can configure automatic agent disconnection when end customer disconnects, ensuring that disconnect flow is triggered consistently regardless of which participant disconnects first.

Implementation options

There are two ways to enable post-chat survey:

For Custom Chat Widget

If you're using a custom chat implementation:

  1. Upgrade to the latest version of amazon-connect-chatjs.

  2. Add the DisconnectOnCustomerExit parameter to your StartChatContact API request:

    { "DisconnectOnCustomerExit": ["AGENT"], // ... other StartChatContact parameters }

For Amazon Connect Communication Widget

If you're using the Amazon Connect Communication Widget:

  1. Open the Amazon Connect console and navigate to Communication widgets.

  2. Enable the post-chat survey setting through the Communication Widgets page.

    The Communication Widget settings page showing the post-chat survey option.

Update contact flow to add post-chat survey as a disconnect flow

To enable post-chat survey, you'll need to update the disconnect flow that's connected to your chat solution. Once configured, the survey will automatically trigger when customers end their chat sessions.

For information about creating a disconnect flow, see Example chat scenario.

There are two ways to implement a survey in your disconnect flow:

Note

For supervisor barge-in scenarios, ensure you add a Flow block in Amazon Connect: Set working queue block before Transfer to Queue. Omitting it will cause chat contacts to terminate rather than transfer for this feature.

A flow diagram showing the Set Working Queue block before Transfer to Queue for supervisor barge-in scenarios.
Contact Trace Records

When a customer ends a chat session, Amazon Connect sets disconnectReason to CUSTOMER_DISCONNECT in the ContactTraceRecord. When DisconnectOnCustomerExit is configured, the system generates a new contact ID (nextContactId) and initiates the configured disconnect flow.

Example:

{ "contactId": "104c05e3-abscdfre", "nextContactId": "4cbae06d-ca5b-1234567", "channel": "CHAT", "initiationMethod": "DISCONNECT", "disconnectReason": "CUSTOMER_DISCONNECT" }

How contact attributes work in Amazon Connect will update in Contact Search and Contact Details.

Contact details showing the contact attributes for a post-chat survey.

Additional resources