Run Lambda when a caller disconnects

0

I have a contact flow that transfers customers to an external number. There is a lambda that should execute after the call disconnects. I’m using the transfer to phone number block under terminate/transfer with resume flow enabled. If the agent disconnects first, the flow continues and executes the lambda. If the caller disconnects first, the lambda never executes.

Is it possible to trigger a lambda in the event a user disconnects? The only way I could see looking at documentation is to set up a firehose and responding to contract trace events. Am I overlooking something?

This seems unnecessarily complicated. Adding support for a Caller Hang-Up event in the transfer block seems like a really convenient solve to this problem.

asked 2 years ago205 views
1 Answer
1
Accepted Answer

Hi there!

One solution for this requirement would be to utilize EventBridge to monitor for DISCONNECTED contact events, and configure your EventBridge rule to trigger the Lambda.

You can read more around the contact events data model in the administrator guide for Amazon Connect: https://docs.aws.amazon.com/connect/latest/adminguide/contact-events.html#ContactEvent

AWS
gthomas
answered 2 years ago
  • Thank you gthomas. This is exactly what I ended up doing, but you beat me to reporting my solution, thank you very much for taking the time to respond. I had to relate the contactId to a record so I could correlate the disconnect event, but it worked great.

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