2022-01-10

Troubleshooting flows in Amazon Connect

 I would like to share several methods that I use to troubleshoot contact flows in Amazon Connect.


1) Enable Amazon CloudWatch Logs

Official Amazon Connect documentation explains how to enable CloudWatch logs for Amazon Connect.

https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-logs.html

IMPORTANT - By default logs will not be collected. You have to manually enable logs for each contact flow or module.


2) Contact search

https://docs.aws.amazon.com/connect/latest/adminguide/contact-search.html

Contact search is the built-in interface of Amazon Connect that allows searching for contacts.
Contact search only shows contacts that were answered by an agent.
Contacts appear in the contact search several minutes after the call was disconnected.

What could be helpful for troubleshooting - when you use Set contact attributes block in your flow - this information will be also available in the Contact search. 

Example:


And in Contact search:





3) Lambda Logger function 

Another method that I use for troubleshooting is a very simple custom made Lambda function - logger (written in Python 3.9)


Source code on my GitHub:


It is very simple:

1) You add Invoke AWS Lambda function block anywhere in your contact flow.  This block will execute logger function.

You can place this block as many times as you need in all the places of your flow that you want to troubleshoot/debug.

2) Optionally you can add any number of input parameters that you would like to be added to the log for debugging.

Example:


3) Then you make a test call.

4) Now you can go to CloudWatch  and see logs generated by this function:



5) As you can see in my example in the log you can see all the contact details including the input parameter that you entered previously.



This function can be helpful when you want to see all the contact details at a certain place of your contact flow.


No comments:

Post a Comment