amazon-connect / amazon-connect-salesforce-scv

This repository contains resources, examples, and projects to help Service Cloud Voice customers address some common requirements as they deploy Service Cloud Voice.
Apache License 2.0
52 stars 53 forks source link

What event is thrown if customer disconnect the call within contact flow . #148

Closed Nithishsubramaiyan closed 1 year ago

Nithishsubramaiyan commented 1 year ago

I need to do an insert operation in database with lambda after a call is disconnected by the customer in IVR (Contact Flows). I don't know where to call lambda function after call is disconnected

Nithishsubramaiyan commented 1 year ago

I have checked the amazon connect event bus , as per the docs DISCONNECTED event is thrown only if the call is disconnected by the agent or flow action but need to know weather event is thrown if the customer disconnects the call.

dougjaso commented 1 year ago

There are two ways, and it just depends on how fast you need it. The easiest way to do this is to create a Lambda Function to do the insert, then use the Contact Record Kinesis stream as the trigger. Filter for records that have no agent, and no enqueue time. That would be calls that ended in IVR. You'll then have ALL the data about the call, however it will also take 1-2 minutes for the contact record to be emitted. If that doesn't meet your requirements, you can do the same thing except process the contact event stream. That will be much faster, and give you some baseline info about a call, but nearly as much.