Newer Version Available
Send Voicemails to Reps
When your customer chooses to leave a voicemail through your telephony system, use the Telephony API to create or update a VoiceCall record. When calling the API, set the callOrigin parameter to Voicemail. See Create a Voice Call Record and Update a Voice Call Record in the Telephony API documentation. This call record can contain both the recording and the transcription.
Setup for Routing Voicemails
Voicemails are routed through Omni-Channel using an Omni-Channel flow. An admin can create a flow that routes voicemails to a particular queue. You can create a queue in setup and add a routing configuration to the queue (by using a routing other than External Routing).
You can also define a single flow that routes both voice calls and voicemails, and then branch your routing by using the callOrigin field of the VoiceCall record.
Voicemail routing can be defined for any inbound phone number in the contact center channels section.

Sample Sequence of Operations
- The customer calls the Contact Center number.
- The partner system creates a VoiceCall using the Create a Voice Call Record Telephony API.
- If no reps are available, the customer chooses to leave a voicemail.
- The customer records a voice message.
- The partner system updates the VoiceCall using the Update a Voice Call Record Telephony API. With this API call, isActiveCall is set to true to ensure that the conversation isn’t closed, as we have more updates ahead. Also, callOrigin is set to "Voicemail" to ensure that the call is tagged as a voicemail message. (Alternatively, the partner can set the callOrigin when creating the call earlier if they know this information when the call record is first created.)
- The partner system creates a transcription using the Create a Transcript Telephony API.
- The partner system executes an Omni-Channel Flow using the Telephony API. With this API, the dialedNumber parameter contains the routing configuration that is defined in the Contact Center details page. (Make sure that callOrigin is updated to "Voicemail" before this API call so that the flow picks the voicemail routing instructions.)
- The partner system does a final update (using the Update a Voice Call Record Telephony API) so that the conversation is completed by setting isActiveCall to false, along with the recording details.
Example Code
For a complete example implementation, see the demo connector code.
A sample REST call to the Telephony API that includes the callOrigin parameter when creating a VoiceCall record:
1POST /telephony/v1/voiceCalls
2
3{
4 "callCenterApiName": "MyContactCenter",
5 "vendorCallKey": "5324881f-1e84-4367-8930-f69a74b30fff",
6 "to": "999999999",
7 "from": "999999999",
8 "initiationMethod": "Inbound",
9 "callOrigin": "Voicemail",
10 "startTime": "2022-08-02T17:32:28Z",
11 "participants": [
12 {
13 "participantKey": "999999999",
14 "type" : "END_USER"
15 }
16 ]
17}