Ensure Correct Delivery of Voicemails
If you have voicemail enabled but voicemails aren’t being delivered to the reps, update your Voicemail subflow to ensure the callOrigin field in the VoiceCall record is updated in time. For voicemails, the value of the callOrigin field must be Voicemail. You can update the Voicemail subflow to add a block to invoke the Lambda to call the SF REST API to make sure that the callOrigin field is updated in time, and voicemails are correctly delivered to the reps.
| applies to these telephony models |
|---|
| Salesforce Voice with Amazon Connect |
| Salesforce Voice with Partner Telephony from Amazon Connect |
Before using the InvokeSalesforceRestApiFunction Lambda function, you must have OAuth authentication set up. To set up or modify authentication, see Salesforce Voice Authentication When Using InvokeSalesforceRestApiFunction.
To ensure voicemails are delivered to reps, add the InvokeSalesforceRestApiFunction Lambda function to the Voicemail subflow, and configure the Lambda function to include the callOrigin destination key. Once configured, every time the Voicemail subflow is triggered, it invokes the Lambda function, which updates the callOrigin field to Voicemail in the VoiceCall record.
Perform these steps only if the voicemails aren’t correctly delivered to the reps.
To configure the Voicemail subflow to ensure voicemails are delivered to reps:
-
In the sample SCV Voicemail Subflow, add the Invoke AWS Lambda function block to invoke the SF REST API. Add the Lambda block between the Play prompt and Set contact attributes blocks in your contact flow.

-
Configure the
InvokeSalesforceRestApiFunctionLambda Function to update the value of thecallOrigindestination key asVoicemail. Add a Set contact attributes flow block to the flow, making sure it appears before the Invoke AWS Lambda function block. -
Add the following attributes to the Set contact attributes flow block:
- Namespace:
External - Key:
voiceCallId
- Namespace:
-
Click Save.
This makes sure that every time the voicemail subflow is triggered, it invokes the Lambda function to update the callOrigin field to Voicemail in the VoiceCall record.
An example flow is available in the Github.