Setup Integration with ElevenLabs

4 min read

This setup guides you through the integration of your voice bot in ElevenLabs with Salted CX so your voice agent can handle inbound calls and escalate them to a human agent if it does not know how to handle the conversation.

This guide assumes you already have a voice agent created in ElevenLabs.

Setup Webhooks

This section enables ElevenLabs to inform Salted CX about calls it handled.

  1. Go to Settings in the navigation on the left https://elevenlabs.io/app/agents/settings
  1. Scroll to Post-Call Webhook section
  1. Press Select Webhook button
  1. Into the Enter a valid display name for the webhook field enter the Salted CX endpoint
  1. Into Enter a valid callback URL field enter https://api.eu.salted.cx/api/v1/live/webhooks/elevenlabs/post-call
  1. Press Create button
  1. Click Copy to Clipboard to copy the value from Webhook Secret field
  1. Share the copied token securely with Salted CX (using OnePassword or other tools of your choice)

Setup Authentication

Authentication ensures that Salted CX accepts only calls from your ElevenLabs bot and nobody else can control your conversations in Salted CX.

  1. In Settings scroll to Auth Connections section
  1. Press Add Auth button
  1. Press Bearer Token menu item
  1. Enter Salted CX EU as Name (or use name of your choice)
  1. In Auth Type select Bearer Token
  1. Enter Salted CX as Provider (or use name of your choice)
  1. Paste the token you received from Salted CX to Token field
  1. Press Create auth connection button
  1. Make sure Transcript, Audio, and Call Initiation Failures are checked

Import Phone Number

This settings makes sure that we can forward the phone call to ElevenLabs.

  1. Go to Phone Number from the navigation on the left https://elevenlabs.io/app/agents/phone-numbers
  1. Press the Import number button
  1. Click From SIM Trunk menu item
  1. Into the Label field fill in your name for the phone number. For example Customer Support Europe
  1. Into the Phone number filed fill the international format of the phone number without spaces, dashes and brackets. The phone number should look like +1234567890
  1. In the SIP Trunk Username fill a value provided by Salted CX. Ask the Salted CX team if you do not have it.
  1. In the SIP Trunk Password field fill the password provided by Salted CX. Ask the Salted CX team if you do not have it.
  1. In the Agent section click on the menu showing No agent value
  1. Choose your voice agent from the menu
  1. Optionally choose branch from which to take the agent.

Now you have a SIP phone number connected to your agent, so inbound calls are routed to that agent.

Enable Escalations

This setup creates a tool that can be used by

  1. Go to Tools from the navigation on the left https://elevenlabs.io/app/agents/tools
  1. Click Add webhook tool button
  1. Into the Name field fill a self-describing name such as escalate_to_human_agent
  1. Into Description field describe under which circumstances the tools should be used by the agent. For example:
Transfer the call to a human agent. Use when the customer asks for a human, when you cannot resolve their question, or when the conversation requires capabilities you don't have (booking, refund, account changes, etc.). Always tell the customer you'll connect them to a person.

Always escalate when rebooking or making changes to a trip that is coming in less than 7 days.
  1. In Method menu select POST value
  1. In the URL field fill the value https://api.eu.salted.cx/api/v1/live/webhooks/elevenlabs/escalate
  1. In Authentication menu pick the authentication you have created previously
  1. In Body parameters section ⏵ Properties add conversation_pid
  1. Into description fill wharever you want for example ID of the conversation
  1. Set Data type to String
  1. Into Identifier field fill conversation_pid value
  1. Make sure Required is check
  1. Set Value Type to Dynamic Value
  1. Into Variable Name field fill sip_conversation_pid
  1. Press Add tool button

Now you have an escalation tool that your voice agent can use to forward the calls to the agents.

Add Escalation Tool to the Agent

In this section, we will link the escalation tool so your voice agent can forward customers to its human colleagues.

  1. In the navigation on the left slick on the voice agent you want to use for your agent
  1. Press Add tool button
  1. Press the tool you have created in the previous section. The name we have used in this guide is escalate_to_human_agent

Congratulations. Your ElevenLabs setup should now be complete. Try calling your phone number to check if everything works as expected.

Was this page helpful?