AWS Contact Center

Automate follow-up work with Amazon Connect Tasks and Contact Lens for Amazon Connect

At the end of an interaction with a customer, agents have to create follow-up work items with other teams in order to provide the best end to end customer experience. Some examples include customer requests to mail specific product or services brochures, mailing a physical copy of a maintenance contract the customer has agreed on over the phone, or a request to re-print and re-send an updated policy slip to the policy holder. Following up on these requests is a manual process that not only is prone to error, but also very time consuming.

Using real-time or post call rules in Contact Lens for Amazon Connect, you can automatically define filters based on information such as specific keywords and phrases extracted from the conversation between the customer and the agent, or custom contact attributes that are used to collect customer intent through IVR or different lines of business. Contact Lens automates the creation and routing of Amazon Connect Tasks and allows you to deliver high quality customer service while your agent productivity is improved.

Overview of solution

In this blog, we will use AnyCompany, a fictitious insurance provider as the example. In this example, a customer calls to report their intent to rent part of an existing insured property, and asks for more information about the renters insurance service. After the agent handles the customer inquiry, typically, as part of their post call work, they need to research the type of information brochure to send and place a request to the appropriate team. Instead, we will create a Contact Lens rule to be automatically triggered and set up all the actions to create a task and associate it with the appropriate contact flow. The contact flow will then leverage all the information available to route the task to the right work queue.


For this walkthrough, you should have the following prerequisites:

  • An AWS account with administrator access
  • An Amazon Connect Instance


Setup Contact flow

1. Navigate to the Amazon Connect admin console
2. Open the contact flows page, click Create contact flow
3. Update the contact flow name to Back office task flow
4. Use the Set logging behaviour block to enable logging
5. Use the Check contact attributes block to check the System, Name contains the string Send Package

6. Use the Set working queue block to the queue SendPackage

7. Use the Transfer to queue block to transfer the Task to the queue
8. Publish your contact flow

Setup Contact lens rules

1. Navigate to the Amazon Connect admin console
2. Open Rules

3. Click Create a rule, Contact lens

4. Select A Contact Lens post-call analytics is available

5. Enter Back-office-send-package as the category name

Choose the appropriate conditions for this rule to trigger. In this example we will use Words or phrases – Exact match. However, you can create more complex filters based on queues, agents, sentiment scores and many others.

6. Click Add condition, choose Words or phrases – Exact match
7. Enter the key phrase We will send you an information package and any other key phrases with similar meaning.

8. Click Next
9. Enter the category name Back-office-send-package
10. Click Add action, Create Task
11. Update Task Name to Action-Required – Send Package – [ContactId]
12. Add the Description Please send a package for this customer
13. Click Select a contact flow, Choose Back office task flow which you created in the previous section
14. Click Next

15. Click Save

Now if you call into your Amazon Connect instance and your agent says “We will send you an information package”, it will trigger the Contact Lens rule after the call has completed, create a task in the contact flow, and route it to the correct agent based on the routing profile.

Cleaning up

To avoid incurring future charges, delete the contact flow and the Contact Lens rule created in this blog.


In this blog, we showed you how to create a Contact Lens post call rule to automatically create a task based on the conditions of the rule. To get started, please visit your Amazon Connect admin console!