Using the Telephony Integration API
The Telephony Integration API allows you to programmatically manage a voice call. The provided Amazon Connect Lambda functions automatically use these endpoints to perform telephony functions, but you can also use these APIs separate from the provided Lambda functions.
-
Telephony Integration REST API Authorization
The Telephony Integration REST API requires JWT authorization. Usually, the provisioning process already sets up this authorization for you. This content simply provides instructions in case you must manually set up this authorization.
-
Telephony Integration REST API Authorization for Agentforce Voice
Partners integrating with Agentforce Voice over SIP or Dynamic Routing authorize Telephony Integration REST API requests with a partner-signed JSON Web Token (JWT).
-
Creates a voice call (
VoiceCall) record containing the participants (that is, the caller and recipient) in the call. -
Updates a voice call (
VoiceCall) record. -
Creates a transcribed version of a voice call in real time.
-
Creates transcripts in bulk across multiple voice calls in real time. These voice calls can include inbound calls, transfer calls, outbound calls, callback calls, and consult calls.
-
Executes the Omni-Channel flow to route voice calls. It passes the call ID (Salesforce VoiceCallId or telephony vendor ContactId) as parameters to the flow and returns the rep or queue routing instructions to the contact flow. By default, Salesforce Voice uses the Omni-Channel flow (or fallback queue) specified for the phone channel that matches the dialed number. If the dialed number doesn’t match an existing phone channel, you can optionally set a new dialed number, Omni-Channel flow, and fallback queue as input parameters to this API call.
-
Routes a voice call to a rep, agent, queue, or flow if Omni-Channel Unified Routing is enabled.
-
Creates a callback request for a voice call if Omni-Channel Unified Routing is enabled.
-
Send a Real-Time Conversation Event
Send real-time conversation events generated from intelligence sources to the rep console.
-
Store a Post-Call Conversation Event
Store post-call conversation events generated from intelligence sources, such as Amazon Connect Contact Lens, into the conversation data store. Users can also specify the target objects (for example, VoiceCall, ConversationEntry) related to the specific event.
-
Reroutes a voice call through Omni-Channel if Unified Routing with Omni-Channel is enabled.
-
Reserves a routable phone number for dynamic PSTN call forwarding to Agentforce Voice.
-
Allocates a server-minted contextID handle for a voice call transfer to Agentforce Voice.
-
Deletes the PendingServiceRouting (PSR) record for a voice call. This API doesn’t need to be called for most scenarios; the PSR record is automatically deleted when the call is no longer being routed. However, there are some scenarios, like for missed or abandoned calls when using partner telephony systems (excluding Amazon Connect), where you must explicitly call this API to clear the PSR record.
-
Telephony Integration REST API Sample Code
The following JavaScript code sample performs the authorization process and then invokes the Voice API.