Use Voice IVR data in an Omni Flow

I wrote a post recently about how to set up routing for Service Cloud Voice, which now uses Flows in Salesforce to decide what queue to route to. One of the questions I got back was how to leverage data captured from the IVR to drive the routing decision. It’s a great use-case, as it allows us to take the power of an AWS LEX Voice Bot and combine it with both the CRM data in Salesforce and the end Routing decisions, to enhance the customer and the agent experience.

One simple approach is to set fields on the Voice Call record, but it’s actually possible to pass any field from an Amazon Contact Flow into a variable in Salesforce with just two simple steps laid out below.

Step 1: Map the Variables

To get IVR data (or any other inputs) from Amazon Connect into a Salesforce Flow, we just need to pass in the parameters when the Omni routing flow gets invoked.

To do this, we can define input parameters to the Invoke AWS Lambda Function action where we’re running the executeOmniFlow method. For those of us using the default Subflow ‘Sample SCV Inbound Subflow’ this is just the first node.

The input parameter in AWS should have the destination key value of flowInput-[variableName], where variableName is the name of the variable in the Omni Flow.

In the below example, imagine that we had our AWS IVR configured to ask the customer what product they were calling about, and want to pass it into the Omni Flow. We stored the customer’s answer in a variable on the AWS Contact flow called productAnswer, and then we pass it into an equivalent variable in the Omni Flow called customerProduct. Make sure that the Flow variable is set to be Available for Input.

Step 2: Use the IVR data to do powerful stuff in the Omni Flow

Once we’ve got the IVR data into Salesforce, the opportunities are endless for us to use it both to lookup/update Salesforce data, and then to combine the two in defining the routing behaviour.

In the example below, I did a few things:

  1. Grabbed the contact from the phone number
  2. Looked to see if there’s an Asset linked to the contact with the name that the customer gave in the IVR
  3. Created a Case with the Contact and Asset details
  4. Marked all three to Screen-pop when the agent accepts the call
  5. Checked the Product Type field on the Asset to route the call to the correct team

There are many, many, more things that could be done. This is just one example, and hopefully it is helpful, but I’ll look forward to seeing what exciting use-cases others come up with.