Pass Data from the Interactive Voice Response (IVR) System
Ease of Implementation | Easy |
Estimated Time to Implement | 20 minutes |
Prerequisites
If your contact center was created before the Spring ’21 release, download the Sample SCV Inbound Flow contact flow from the Service Cloud Voice repo on Github. Import it into Amazon Connect if it’s not already imported. Be sure to update the Invoke AWS Lambda function block so that it correctly points to the Lambda function in your Amazon Connect instance. If your contact center was created after the Spring ’21 release, this contact flow is already installed into Amazon Connect.
To implement this use case, you need either the AWS root user or AWS administrator credentials.
Step 1: Create a Custom Field on the VoiceCall Object
Create a custom field on the VoiceCall object in your Salesforce org that corresponds to the data that you want passed from the IVR.
- From Setup, at the top of the page, select Object Manager.
- In the Quick Find box, type Voice Call and select the Voice Call object.
- Select Fields & Relationships from the left pane.
- Select New to create a field.
- Follow the steps to create a custom field to hold the data. A text field is the most flexible, but you can use any type of supported field. Geolocation and read-only fields aren’t supported types for custom fields. To learn more about creating custom fields, see Create Custom Fields.
Step 2: Modify the Contact Flow
Add a “Set contact attributes” block in your contact flow to add custom field data.
- Log in to your Amazon Connect instance.
- Hover over Routing, then click Flows.
- Select the Sample SCV Inbound Flow contact flow (or whichever inbound flow you’re using).
- Create a “Set contact attributes” block before the InvokeTelephonyIntegrationApiFunction Lambda function call. For the destination attribute, specify the name of the custom
field with the “sfdc-” prefix added. The value of this attribute is the data to pass
into the custom field For example, MyField__c
would become sfdc-MyField__c. For the value, specify
whatever data you want stored in your VoiceCall record.
- Publish the updated contact flow.
Test This Example
To test this example, perform an inbound call and review the VoiceCall record that is created for that call. The field is set with the value from the Amazon Connect contact flow.