Send caller details to Salesforce
In this tutorial you build a support line for Acme India that works with Salesforce. When a customer calls, the agent finds them by their number and greets them by name. If they report a problem, it opens a Case and reads out the case number. After the call, it logs the call on their record.
You practise on a Salesforce sandbox, so nothing touches your real customers.
You need:
- A workspace role of Admin or Owner to connect Salesforce (step 1). Builder or higher is enough for the rest.
- A Salesforce sandbox, and an integration user in it with the API Enabled permission, create access to Cases, Events, Tasks and Leads, and read access to Contacts. See Connect Salesforce.
- A phone number in your workspace, and your own mobile phone to call it.
1. Connect your sandbox
Section titled “1. Connect your sandbox”-
In the sidebar, open Integrations. Under Salesforce, choose Sign in with Salesforce.
-
Under Salesforce environment, choose Sandbox, then click Connect Salesforce.
-
Salesforce opens. Sign in as your integration user and allow access. You come back to Integrations, and the card says Connected.
-
Click Test connection. You should see that Salesforce answered and the user can create Events, Tasks and Leads and find Contacts.
If What to fix in Salesforce lists anything, fix it in the sandbox and click Test connection again.
2. Add a test customer in Salesforce
Section titled “2. Add a test customer in Salesforce”The agent recognises callers by their number. So that it recognises you, add yourself as a customer in the sandbox.
-
In the sandbox, create an Account, for example Sharma Traders.
-
Create a Contact on it, for example Priya Sharma. In Phone or Mobile, enter your own mobile number, for example +91 98765 43210.
Make sure no other Contact in the sandbox has the same number. When several people share a number, the agent doesn’t guess who’s calling: it asks.
3. Create the agent
Section titled “3. Create the agent”-
In the sidebar, open Agents and click New agent.
-
Choose Start from a template and pick Support assistant.
-
Name it Acme India support and click Create and open.
-
Open Prompt. At the end of the Instructions, add:
If the caller has a problem you can’t solve on the call, open a case for it and tell them the case number.
-
Change the Greeting to:
Hello {{caller_first_name}}, thanks for calling Acme India support. How can I help?
{{caller_first_name}} is filled in from Salesforce. When the agent doesn’t find the caller, the
name is simply left out: Hello, thanks for calling Acme India support.
4. Turn on Salesforce for the agent
Section titled “4. Turn on Salesforce for the agent”-
In the agent, open More settings and choose Salesforce.
-
Turn on Use Salesforce on this agent’s calls. It says which Salesforce user it’s connected as.
-
Under While the phone rings, keep Look up the caller on.
-
Under During the call, turn on Create a Case. Its field map appears.
-
In the
Subjectrow, change the value toPhone: {{args.subject}}. The agent fills in{{args.subject}}; Phone: is fixed text, so your team can spot cases from calls. -
Under After the call, keep Log the call as a Task on.
The other rows of the map stay as they are: Description and Priority come from what the caller
said, and Origin is Phone. The Case is linked to the caller’s Contact and Account on its own.
Read more in Map the fields.
5. Publish and call it
Section titled “5. Publish and call it”Real phone calls use a published version, never the draft.
-
Click Publish at the top right, add a release note such as Salesforce cases, and click Publish.
-
Open Numbers. In the number’s ⋯ menu, choose Change agent. Pick Acme India support, choose Test line, and click Save.
-
Call the number from the mobile you saved on Priya’s Contact.
-
The agent greets you by name. Say something like My order from last week still hasn’t arrived. Answer its questions.
-
The agent opens a Case and reads out its number. Say goodbye and hang up.
6. Check Salesforce
Section titled “6. Check Salesforce”-
In the sandbox, open Priya’s Contact. Under Cases you find the new Case, with the subject Phone: …, origin Phone and the description of your problem.
-
Under the Contact’s activity, find a completed Task called AI call — and the outcome, for example AI call — callback. Its description has the call’s summary, outcome, length and 360 call id. It arrives a minute or two after you hang up, once the call has been analysed.
-
In 360, open Integrations. Under Call logs sent to Salesforce, your call shows Logged.
-
Open Calls and click your call to see its summary, recording and transcript. See Review calls.
If the Task shows Failed under Call logs sent to Salesforce, the reason is next to it. Fix it in the sandbox and click Retry.
7. Try an unknown caller
Section titled “7. Try an unknown caller”Call the number from a phone that isn’t in Salesforce. The agent greets you without a name. If you report a problem, it still opens a Case, but the Case isn’t linked to a Contact. To save new callers as well, turn on Create a Lead in the agent’s Salesforce settings, and publish again.
8. Go live
Section titled “8. Go live”When the agent works well on the sandbox:
-
In Integrations, click Disconnect, then connect again with Production. A workspace has one Salesforce connection at a time.
-
Click Test connection and fix anything under What to fix in Salesforce.
-
In Numbers, point the number at the agent’s Live line, so real callers reach it.
The agent keeps its Salesforce settings when you switch orgs. Custom fields you added to a field map must exist in production too.