Webhook tool

Salesforce AI voice agents that create leads and cases

The agent finds the lead, qualifies the caller, and creates the lead or case through a service you run that holds the Salesforce connection.

Sales intake agent

Qualifies callers and creates the Salesforce record.

Instructions

Find the caller. If new, qualify and create a lead. If an existing customer has a problem, create a case. Transfer to the account owner if the caller asks.

Handoff
Account owner

Connected tools

  • Find lead or contactWebhook
  • Create leadWebhook
  • Create caseWebhook
  • Transfer to ownerTransfer

What a Salesforce AI voice agent can do

Open one to watch a call. The grey lines are the tools the agent calls mid-sentence.

New callers become Salesforce leads with their reason for calling, so your team follows up from the record.

Tool definitions

Webhook tools go to POST /v1/agents/tools. Transfers are a system tool on the agent. Replace the placeholder values in capitals with your own.

Webhook

Find lead or contact

Looks up a record by phone.

Show the JSON definition
find_lead_or_contact
{
  "type": "webhook",
  "name": "find_lead_or_contact",
  "description": "Finds a lead or contact by the caller's phone number. Your service returns the record and the owner's phone as owner_phone.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-company.com/salesforce/lookup",
    "method": "GET",
    "query_params_schema": {
      "properties": {
        "phone": {
          "type": "string",
          "dynamic_variable": "system__caller_id"
        }
      }
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  },
  "assignments": [
    {
      "dynamic_variable": "owner_number",
      "value_path": "owner_phone"
    }
  ]
}

Webhook

Create lead

Creates a lead with qualification fields.

Show the JSON definition
create_lead
{
  "type": "webhook",
  "name": "create_lead",
  "description": "Creates a lead from the call.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-company.com/salesforce/leads",
    "method": "POST",
    "request_body_schema": {
      "type": "object",
      "properties": {
        "last_name": {
          "type": "string",
          "description": "Caller's last name."
        },
        "company": {
          "type": "string",
          "description": "Caller's company."
        },
        "need": {
          "type": "string",
          "description": "What the caller is looking for."
        }
      },
      "required": [
        "last_name",
        "company",
        "need"
      ]
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  }
}

Webhook

Create case

Creates a case for an existing customer.

Show the JSON definition
create_case
{
  "type": "webhook",
  "name": "create_case",
  "description": "Creates a case for an existing contact who reports a problem.",
  "pre_tool_speech": "auto",
  "execution_mode": "immediate",
  "response_timeout_secs": 20,
  "api_schema": {
    "url": "https://api.your-company.com/salesforce/cases",
    "method": "POST",
    "request_body_schema": {
      "type": "object",
      "properties": {
        "phone": {
          "type": "string",
          "dynamic_variable": "system__caller_id"
        },
        "subject": {
          "type": "string",
          "description": "One line on the problem."
        },
        "description": {
          "type": "string",
          "description": "What the caller reported, in two or three sentences."
        }
      },
      "required": [
        "subject",
        "description"
      ]
    },
    "authentication": {
      "mode": "bearer",
      "token": {
        "type": "secret",
        "secret_value": "YOUR_SERVICE_TOKEN"
      }
    }
  }
}

Transfer

Transfer to owner

Transfers to the number in a dynamic variable.

Show the JSON definition
transfer_to_owner
{
  "config": {
    "system_tools": {
      "transfer_to_number": {
        "description": null,
        "pre_tool_speech": "auto",
        "transfers": [
          {
            "destination": {
              "type": "phone",
              "phone_number": "{{owner_number}}"
            },
            "condition": "The caller is qualified and asks to speak with their account owner."
          }
        ]
      }
    }
  }
}

Set it up

No native connector. You configure webhook tools that call a service of yours, which signs in to Salesforce with your external client app. Vendor details read in October 2026.

  1. Create an external client app

    In Salesforce Setup, create an external client app for your service. Salesforce disables new connected apps by default from Spring '26.

  2. Run the lookup and create endpoints

    Your service calls Salesforce's REST API, refreshes the session, and returns small answers.

  3. Register the webhook tools

    Use your service URL and a bearer secret. Add the transfer with {{owner_number}}, which the lookup tool saves from owner_phone.

  4. Optional: post-call webhook

    Register an endpoint in Cartesia to receive call events and write the transcript to the record.

Before you build

Why not call Salesforce directly

Salesforce access tokens expire. A webhook tool sends the header you stored, so the tool would fail when the token lapses. Your service refreshes it.

Dynamic variables

The lookup tool saves owner_phone from your service's response as owner_number. It must be valid E.164 when the transfer runs.

Enterprise-grade security

  • HIPAA compliant badge

    HIPAA compliant

  • SOC 2 Type 2 badge

    SOC 2 Type 2

  • GDPR badge

    GDPR

Salesforce AI voice agent FAQs

Does Salesforce have an AI voice agent?

Yes. Salesforce sells Agentforce Voice. The agent on this page is a different setup. It runs on Cartesia, answers the numbers you already have, and reads and writes Salesforce records through a service you run.

Should I use Agentforce Voice or a Cartesia agent with Salesforce?

Agentforce Voice suits teams that already build agents inside Salesforce and want the phone channel there too. A Cartesia agent suits teams that want to pick the voice and the LLM, keep their carrier, and control exactly which Salesforce objects the agent touches, because every read and write goes through endpoints you write.

How do I connect Salesforce to an AI voice agent?

Create an external client app in Salesforce, then run a small service that signs in with it and exposes lookup, create-lead and create-case endpoints. Register those endpoints as webhook tools in Cartesia. The service refreshes the Salesforce session, which a webhook tool can't do, since it sends the same stored header on every call.

Can the agent update a Salesforce opportunity?

Only through a tool you define. Start with leads and cases, then add opportunity fields your sales ops team approves, with your service checking each write before it reaches Salesforce.

Can the agent transfer a caller to their Salesforce account owner?

Yes. The lookup tool saves the owner's number as owner_number, and it must be E.164 when the transfer runs. The transfer is cold, so have the agent create the lead or case first. Transfers need a Twilio or SIP trunk number, per Cartesia's docs.

Who bills the phone minutes on a Salesforce voice agent?

Cartesia bills the agent at $0.03/min, plus LLM usage and telephony. Phone minutes depend on the number. Cartesia-provisioned numbers are US only and carry Cartesia's telephony fee. Numbers from your Twilio account or a SIP trunk pay your carrier's rates instead.

Get started today

Talk to an expert.

Connect with a member of our team and learn how Cartesia can help you build world-class voice experiences.

Contact Sales

Start building.

Access our models via API and bring a voice agent into production in minutes.

Try Cartesia