InvokeTelephonyIntegrationApiFunction Lambda Function
Configuration: This function is available to Service Cloud Voice customers who are using an Amazon Connect instance that’s provided by Salesforce. No additional configuration is necessary. See a sample version of the invokeTelephonyIntegrationApi Lambda function in GitHub.
Description: Use this Lambda function to create a VoiceCall record or execute an Omni-Channel flow. Creating a VoiceCall is essential to get the call working, which is why this function is typically one of the first blocks in your contact flow for an inbound call. This Lambda is invoked to perform the following actions:
- Create a VoiceCall for an inbound call. This action occurs when a customer calls into the call center.
- Create a VoiceCall for a call transfer. This action occurs when a rep transfers to another rep or queue.
- Execute an Omni-Channel flow. This action occurs when work is ready to be routed.
- Cancel an Omni-Channel flow. This action occurs when an existing flow needs to be canceled.
Sample Contact Flows That Use This Function: Sample SCV Transfer Flow for Agent Transfers Sample SCV Transfer Flow for Queue Transfers, Sample SCV Inbound Flow. To download these flows, visit our Sample Contact Flows folder in GitHub.
Usage: Place this Lambda within one of the relevant contact flows (either for an inbound call or a transfer). This Lambda takes a “methodName” attribute as an argument. This attribute indicates the specific action that the Lambda must perform.
Action | Attribute Key | Attribute Value |
---|---|---|
Create a voice call for an inbound call | methodName | createVoiceCall |
Create a voice call for a transfer | methodName | createTransferVC |
Request routing instructions from an Omni-Channel flow and create a PendingServiceRequest. Optionally, provide these inputs:
By default, Service Cloud 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 the Omni-Channel flow or fallback queue in these input parameters. The fallback queue is used only if the specified flow doesn’t exist or one isn’t specified. |
methodName | executeOmniFlow |
Cancels an Omni-Channel flow that was previously executed. This method also calls the Clear Routing REST API to clear the PendingServiceRouting (PSR) record. | methodName | cancelOmniFlowExecution |
When creating a voice call record, you can also specify custom data to be added to fields on the VoiceCall record. To add custom date, create a “Set contact attributes” block before the Lambda 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 an example, see Pass Data from the Interactive Voice Response (IVR) System.
Output Attribute Name | Description |
---|---|
voiceCallId | ID of the voice call. |
Output Attribute Name | Description |
---|---|
agent | The rep to route the call to |
queue | The queue to route the call to |
errors | List of errors why the call couldn’t be routed |