Configure Inbound Call Transfers When Using Real-Time Streaming

To illustrate how to configure inbound call transfers that happen via Real-Time Streaming, this topic describes how to accomplish these tasks with Amazon Connect.

Tip
Tip If Salesforce Voice with Partner Telephony or Bring Your Own Channel for CCaaS is completely set up, use the createVoiceCall method in the Amazon Connect Lambda function or the createVoiceCall REST API to create a VoiceCall record. Specify the same AI agent version across all blocks within the flow.
  1. In Amazon Connect Flow Designer, create an Amazon Connect inbound flow. To quickly create an inbound flow, make a copy of the Sample SCV Inbound Flow.
    An inbound flow handles incoming calls to your organization’s Amazon Connect instance and routes the calls to their correct destination, such as a rep, a queue, or even an Agentforce agent. For information about how Voice with Telephony Providers uses these flows and to see sample flows, see Amazon Connect Flows and Sample Flows.
  2. Add the Set Logging Behavior block and turn on logging.
  3. To create a VoiceCall record in Salesforce, add an AWS Lambda Function block to the flow and call the createVoiceCall method.
    The Sample SCV Inbound Flow contains the AWS Lambda Function block already.
    The settings show how to call the method to create voice call records.
  4. Add the Connect assistant block. In the block, set to the Q in Connect assistant ARN and select the Amazon orchestrator AI agent that you previously created. Don’t use the orchestration agent ARN.
    This block opens the session and writes $.Wisdom.SessionArn on the contact. A successful Connect assistant block doesn’t start Lex and doesn’t hand the caller to Agentforce.
  5. To transfer the call to the Agentforce agent, add the Get customer input block.
    1. In the Amazon Lex tab of the Get customer input block, select the agent (Lex V2 bot) and alias.
    2. For the Select a Domain field, enter the assistant ARN.
    3. For the AI Agent - Self Service field, select Select AI Agent, and then enter the name and version of the orchestration AI agent.
    4. Set the session attribute x-amz-lex:q-in-connect:ai-agent-arn to the versioned ARN of the orchestration AI agent. For example, arn:aws:wisdom:<REGION>:<ACCOUNT_ID>:ai-agent/<ASSISTANT_ID>/<AI_AGENT_ID>:<version>.
  6. Optionally, configure the customer experience when you transfer to the agent. For example, play music or add text-to-speech that tells the customer that the call is being transferred to an agent.
    The settings show what the agent will say at this point in the flow.
  7. Click Save.
  8. Connect the inputs and outputs of the new blocks that you added to the flow.
    Completed Amazon Connect inbound contact flow
  9. Save and publish the Amazon Connect flow.
  10. In the Phone Numbers page, open the provisioned inbound phone number and assign the connect flow to it. If you don’t already have a provisioned inbound phone number, you can claim it in the Phone Numbers page.
    This page shows all claimed phone numbers for your Amazon Connect instance.
  11. To test that the call is transferred to the voice-enabled agent, call the inbound call phone number.
  12. Point the contact flow to the same version.

Next, it’s time to configure the telephony system to handle call escalations from the agent to a rep.