Guides
Step-by-step guide to syncing AI voice agent conversations, transcripts, and lead qualification data back to Salesforce using Thoughtly's native integration and post-call automations.
Last updated
When an AI voiceAI voiceAn artificially generated, natural-sounding voice produced by a TTS model. Thoughtly supports a library of AI voices and brand-specific cloning. agent qualifies a lead, books a meeting, or captures an objection, that information needs to end up in Salesforce — automatically, on the right record, without anyone copying notes from one screen to another. Otherwise the call happened in a vacuum and your reps are flying blind.
This guide walks through connecting Thoughtly to Salesforce so that every voice and SMS conversation writes structured data back to Leads, Contacts, and Opportunities in real time. You will configure the OAuthOAuthAn authentication standard that lets Thoughtly connect to your CRM or app without storing your password. connection, map fields, build a post-call automation, and verify that transcripts, dispositions, and captured variables land exactly where your reps expect them.
By the end you will have a working post-call sync that pushes conversation data from Thoughtly into Salesforce without a single line of code or a Zapier step in between.
Thoughtly authenticates to Salesforce using OAuth 2.0. The connection is scoped — Thoughtly only accesses the objects and fields you grant.
After connecting, return to Thoughtly and confirm the Salesforce account appears in the Account dropdown on any Salesforce action step.
Before building the automation, decide which Thoughtly data maps to which Salesforce fields. This prevents half-built sync jobs that dump everything into a single notes field.
If you are using CRM syncCRM syncCRM sync is the two-way flow of lead records, conversation notes, outcomes, and next steps between an AI agent platform and a CRM so human teams inherit current pipeline instead of manual updates. or Salesforce triggers to pull Lead data into Thoughtly before a call, map these fields so your agent has context:
| Salesforce Field | Thoughtly Field | Purpose |
|---|---|---|
| FirstName | first_name | Personalize greeting |
| Phone | phone | Dial or match contact |
| LeadSource | lead_source | Agent can reference how the lead found you |
| State / PostalCode | location | Service-area routing and compliance |
| Custom: Inquiry_Type__c | inquiry_type | Pre-load intent for qualification branching |
After a call, Thoughtly can write these captured values back to Salesforce records:
| Thoughtly Variable | Salesforce Field | Object |
|---|---|---|
| disposition | Call_Disposition__c (custom picklist) | Lead / Contact |
| intent_score | Intent_Score__c (custom number) | Lead |
| call_summary | Task: Description | Task (activity) |
| transcript | Task: Transcript__c (long text) | Task |
| appointment_time | Appointment_Date__c | Lead / Opportunity |
| qualifying_answers | Qualification_Notes__c (long text) | Lead |
| recording_url | Task: Recording_URL__c | Task |
If these custom fields do not exist in your Salesforce org yet, create them in Setup → Object Manager before proceeding. Use the API names exactly as your org defines them — Thoughtly will reference them when you configure the Update Object action.
Thoughtly variables are the bridge between what happens on the call and what gets written to Salesforce. Variables are extracted from the conversation and can be referenced by automations, actions, and outcomes.
In the Agent Builder, open Settings → Variables for your agent and ensure the following are defined:
Each variableVariableA named value the voice agent stores during a conversation — caller name, intent, qualifying answers — and uses to drive routing and post-call actions. should have a descriptive name and clear extraction instructions. For example, the disposition variable might use a prompt like: "Based on the conversation, classify this call as one of: Qualified, Not Interested, Appointment Booked, Callback Requested, or No Answer."
System variables are also available automatically, including the call transcriptTranscriptThe text record of a voice conversation, used for review, training, compliance audit, and search., call duration, caller phone number, and call ID. These do not need manual configuration.
Thoughtly's On Call Completed triggerTriggerThe event or condition that starts an automated workflow, such as a new lead, missed call, CRM status change, calendar booking, or completed call. fires after every call ends. This is the recommended entry point for Salesforce sync — it replaces the legacy post-call settings, which are being phased out.
The On Call Completed trigger provides the full call record. From here you will add Salesforce actions to write the right data to the right object.
With the trigger in place, add steps that push data to Salesforce. A typical post-call Salesforce sync includes three or four steps: look up the existing record, update it with call data, log a Task, and optionally create or update an Opportunity.
Add a Salesforce Execute SOQL Query step. Write a query that matches the caller's phone number to a Salesforce record:
SELECT Id, FirstName, LastName, Status FROM Lead WHERE Phone = '{{ trigger.caller_number }}'This returns the Salesforce record ID you need for the update step. If no record is returned, you can branch with a Conditions step to either create a new Lead or skip the sync.
Add a Salesforce Update Object step. In the Account tab, select your connected Salesforce account. Configure it:
Provide the Salesforce record Id for the object you want to update. The action uses this ID to update the existing record rather than creating or searching for one. If you do not have the ID yet, always add a SOQL lookup step first.
Add a Salesforce Create Object step to create a Task on the Lead or Contact record:
This creates a completed activity that surfaces in the Salesforce activity timeline. Reps see the AI-generated summary, the full transcript, and a recording link — all without leaving Salesforce.
Use a Conditions step (If/Else or Switch) to route based on call outcomes. Common patterns:
Never push an untested automation directly to your production Salesforce org. Thoughtly supports Salesforce Sandbox connections specifically for this purpose.
Once verified, switch to your production Salesforce OAuth connection and activate the automation.
So far this guide has covered writing data from Thoughtly back to Salesforce after calls. But the most valuable setups also pull data from Salesforce into Thoughtly before calls happen — so your agents have context the moment they dial.
Thoughtly's CRM sync feature can import Leads and Contacts from Salesforce into Thoughtly Audiences on a recurring basis. To set it up:
With bidirectional sync running, the full loop is closed: new Leads enter Thoughtly from Salesforce, agents call them with full context, and call outcomes write back to the same Salesforce records automatically.
After the sync has been running for a few days, check these metrics to confirm it is working and delivering value:
Yes. Each Thoughtly automation step that calls Salesforce (Execute SOQL Query, Create Object, Update Object) consumes one Salesforce API call. Most Salesforce editions include generous daily API limits (Enterprise: 100,000+). High-volume outbound campaigns should be designed with this in mind — batch where possible and monitor usage in Salesforce Setup → System Overview.
Yes. The On Call Completed trigger fires after any call, regardless of direction. You can use a Conditions step to branch on call direction (inbound vs. outbound) and route to different Salesforce update logic if needed.
If your SOQL query returns zero results, add a Conditions step that checks for an empty result set. In the 'no match' branch, use a Create Object step to create a new Lead with the caller's phone number, name, and any variables captured during the call. Thoughtly respects your Salesforce Duplicate Management rules, so existing duplicate-matching logic will still apply.
The transcript is written wherever you map it in the automation. Most teams create a Task with the transcript in the Description or a custom long-text field. The transcript from the On Call Completed payload is a structured array — you can map it directly or use an AI step to summarize it first.
Yes. Thoughtly's Salesforce integration is org-agnostic. It supports Sales Cloud, Service Cloud, Marketing Cloud Account Engagement (Pardot), Financial Services Cloud, Health Cloud, and any org with custom objects. Permission and field maps are configured per object.