AWS Contact Center

Analyze customer satisfaction scores with post-contact surveys using Amazon Connect Tasks

Customer satisfaction (CSAT) is one of the top metrics used to measure the customer’s perceptions after an interaction in your contact center. CSAT post-call surveys are important as a diagnostic tool to fine-tune the experience and service delivered in a contact center. They not only assess perceptions of experiences, but also help an organization understand customer motivations and intentions following the experience.

Amazon Connect is an omnichannel contact center offering voice, chat, and tasks. Amazon Connect Tasks allow you to create activities and integrate with external applications or services to prioritize, assign, and track agent tasks to completion. Using Amazon Connect Tasks can ensure that customer issues are quickly resolved, leading to increased customer satisfaction.

In this blog post, you will learn how to configure a post contact survey for your Amazon Connect contact center, assign a task with the survey results to a supervisor queue, and administer your surveys with a secure web application. Contact center managers can then identify customer issues in nearly real-time, and act in a timely manner to improve customer satisfaction.

Overview of solution


The architecture and flow diagram of this solution shows the offering of a post-call survey to a customer, and sharing the survey results using a Task to a supervisor:

  1. Amazon S3 stores and serves the frontend static content through Amazon CloudFront and restricted by Amazon Cognito for user management
  2. The required Contact Flow Module is deployed in the Amazon Connect instance
  3. Administrators use the web application to define contact surveys according to their needs
  4. The configuration of the surveys is stored in Amazon DynamoDB
  5. When required, the Contact Flow Module is invoked for a contact, with a contact attribute set to identify the survey to be offered
  6. The Contact Flow Module retrieves the configuration of the survey for the contact.
  7. The contact is offered the survey, and the survey is answered
  8. Results are stored in an Amazon DynamoDB table for the individual contact and if required, an Amazon Connect Task is created

Post contact surveys can be played reactively after a customer contact (inbound voice, outbound voice), or proactively, in combination with the StartOutboundContact API.

The source code of this solution can be found on GitHub: Contact Surveys for Amazon Connect.


For this blog post, you should have knowledge or and access to the following AWS Services and features:

Setting up the solution

  1. Click on the “Launch Stack” button to deploy the solution in your preferred Region. This will be the same Region that was used to deploy your Amazon Connect instance.launch stack
  2. Provide the required parameters:
    Stack name
    Email address for the initial user of the solution
    ARN of the Amazon Connect instance you want to use with this solution
    Alias of the Amazon Connect instance you want to use with this solution
    Id of the Contact Flow to which tasks created by this solution will be sentNote: If you are unsure about which Contact Flow to choose to process the tasks generated by the solution, use the ID of the Sample inbound flow (first contact experience) available by default in your Amazon Connect instance.cloudformation
  3. Choose Next.
  4. Proceed with the stack creation steps, and choose Next.
  5. Review your stack summary. Select “I acknowledge that AWS CloudFormation might create IAM resources”.
  6. Choose Submit.
    Note: It will take approximately 5 minutes for the stack to complete the deployment. You will receive an email containing your username and a temporary password.cloudformation deploy
  7. Once the stack is deployed, in the Output tab, note the value of the AdminUser and the URL of the application.cloudformation output
  8. Navigate the URL noted previously from the Output tab. Log in to the application with the AdminUser collected previously, and the password received via email during the stack deployment.
  9. Choose Login.
    Note: You will be required to change your password at first login.login screen
  10. If you see the following screen, the solution has been successfully deployed.application

Test your Solution

The following examples will help you understand how you can use this solution for typical use cases.

Basic post contact survey, with low score flagged for review

In this example, you will learn to implement a basic post-contact survey that alerts a supervisor through an Amazon Connect Task every time a customer replies to a given question with a low score.

  1. Create a new survey using the Contact Surveys for Amazon Connect application deployed with the solution:Survey Configuration
  2. Add a couple of questions to your survey:survey questions
  3. For one of these questions, select Additional settings.
  4. Select Flag for review, and define the threshold:adding question flag
    Any contact that inputs a score lower than the defined threshold to that question will initiate a task in Amazon Connect. This task will be routed through the Contact Flow defined when the solution was deployed.
  5. Choose Save.
  6. Refresh the list, and note the Id of your new survey.survey id
    Note: The Id of your survey will be different than the one on the screenshot.
  7. In your Amazon Connect instance, create a new Contact Flow.
  8. Import the Survey Example Disconnect flow.
  9. Before publishing, make sure that the Invoke module block is pointing to the Contact Survey module available in your Amazon Connect instance.survey module
  10. Repeat the previous three steps to import the Simple Survey with flag flow. Do not publish it yet, you must first make some configuration adjustments.
  11. Locate the Set Disconnect Flow block. Configure this block to set the disconnect flow to the Survey Example Disconnect flow imported previously.Disconnect Flow
  12. Locate the Set Contact Attributes block. This block sets a single surveyId contact attribute.
  13. Paste the id of your survey (noted previously) in the Value field of the surveyId contact attribute.survey id
    Note: By setting a surveyId statically, the choice of survey will be static. Alternatively, you could also set this attribute dynamically based on, for example, a value stored in a contact attribute.
  14. Choose Save.
  15. Publish the flow.Note: Contacts processed by this flow will be queued on the BasicQueue, which is available in your Amazon Connect instance. If you want to run the test with a different queue, adjust the Set working queue block accordingly.
  16. Associate the Simple Survey Example contact flow to any available DID for testing.
  17. Call the number that you have selected for testing. Make sure you have an agent available in the queue where the call is going to be directed.
  18. While the customer stays on the line, the agent must disconnect the call. The customer will be directed to the survey.
  19. The customer hears the first survey question, and must answer 3 (a score lower or equal to the threshold defined previously).
  20. For the second question, the customer enters any digit between 0 and 5.
  21. Since the customer has given a low score to the first question, a task is created for a supervisor to review. This task is processed by the Contact Flow defined during the deployment of the solution.
  22. The task is received by a supervisor and contains the details of the interaction that was poorly rated.task

Visualizing survey results

You can visualize the aggregated results for your survey using the Contact Surveys for Amazon Connect application.

  1. Navigate to the URL noted when the solution was deployed and login using the username and password defined earlier.
  2. To view a survey’s results, select it from the list, and select the Results tab:results
    The aggregated results for each question will be available in a pie chart. These can be filtered by date range if necessary.aggregated results
  3. To export the individual results for a survey, click the Export button to generate a csv file containing the individual results for each survey offered to customers, along with the contactId of the interaction.

Cleaning up

  1. Navigate to CloudFormation, and select the stack you created when deploying the solution
  2. Select Delete
  3. If a new DID was claimed to test the solution, release the DID in Amazon Connect to avoid future charges


Post call survey is one of the most important metrics to measure customer satisfaction (CSAT) in a contact center, as it gathers feedback from a customer immediately after their interaction with your contact center. It is critical to present the post call survey immediately after the customer interaction in order to capture the customer experience while it is still fresh. Also, incorporating Amazon Tasks allows you to present in nearly real time the results of a post-call survey to a supervisor to take immediate action on the customer experience. In this blog, we have presented a solution to create a post-call survey and alert on negative responses in near real-time. To find other AWS solutions that will help you deliver better customer experiences, subscribe today to the following GitHub repositories:

Aurelien Plancque is a Solutions Architect, specialising in Amazon Connect / Customer Experience at AWS, with over 12 years of experience in designing and building software for contact center solutions.
Enid Zambrano is an Amazon Connect Specialist Solution Architect at AWS. Enid is based in Canada with over 25 years optimizing and building contact centers.