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
How to Sync AI Conversations Back to Salesforce
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.Read full definition → 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.Read full definition → 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.
What You'll Need
A Thoughtly workspace with at least one deployed voice agent (inbound or outbound).
A Salesforce org — Sales Cloud, Service Cloud, or Financial Services Cloud. Sandbox access is recommended for testing before promoting to production.
Admin or sufficient permissions in Salesforce to authorize an OAuth connection and to create or modify fields on Lead, Contact, and Opportunity objects.
Familiarity with Thoughtly's Agent Builder (nodes, variables, and outcomes) and the Automations module.
Step 1: Connect Salesforce to Thoughtly via OAuth
Thoughtly authenticates to Salesforce using OAuth 2.0. The connection is scoped — Thoughtly only accesses the objects and fields you grant.
Open your Thoughtly workspace and navigate to Tools → Automations. Create a new automation or open an existing one.
Add a Salesforce action step (for example, Create Object or Update Object). If no Salesforce account is connected, the Account tab will prompt you to authenticate.
Click Connect Salesforce. You will be redirected to the Salesforce login page. Log in with an admin or integration-user account.
Authorize Thoughtly when prompted. Salesforce issues an access token and refresh token. These are stored securely in Thoughtly — you will not need to re-authenticate unless you revoke the token in Salesforce Setup.
If you want to test before touching live data, connect a Salesforce Sandbox first. Once verified, promote to Production with a separate OAuth connection.
After connecting, return to Thoughtly and confirm the Salesforce account appears in the Account dropdown on any Salesforce action step.
Step 2: Plan Your Field Mapping
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.
Inbound mapping (Salesforce → Thoughtly)
If you are using CRMCRMThe system of record for leads, contacts, deals, and activity. Thoughtly reads from and writes to your CRM continuously.Read full definition → sync 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
Outbound mapping (Thoughtly → Salesforce)
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.
Step 3: Configure Agent Variables to Capture Conversation Data
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.
Key variables for Salesforce sync
In the Agent Builder, open Settings → Variables for your agent and ensure the following are defined:
disposition — The call outcome. Example values: Qualified, Not Interested, Appointment Booked, Callback Requested, Voicemail Left. Define this as a variable and set it via outcomes or an end-node prompt.
intent_score — A 1–10 numeric score representing how ready the lead is. Extract it from a prompt-based speak node that evaluates urgency and fit signals.
qualifying_answers — A text summary of what the lead said about their need, urgency, location, eligibility, and preferred next step. Use a prompt node to summarize at the end of the qualification flow.
appointment_time — If the agent books via Calendly, Cal.com, or Acuity, capture the confirmed time from the scheduling action response.
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.Read full definition → 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.Read full definition →, call duration, caller phone number, and call ID. These do not need manual configuration.
Step 4: Build a Post-Call Automation with On Call Completed
Thoughtly's On Call Completed trigger 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.
Go to Tools → Automations and click Create Automation.
Select the On Call Completed trigger.
Under Trigger Scope, choose Specific Agents and select the agent (or agents) whose calls you want to sync. Or choose All Agents for organization-wide Salesforce logging.
Click the Output tab and review the sample payload. You will see fields like transcript (a structured array with speaker, text, and timestamps), call duration, variables captured during the call, and the outcome. Copy the field paths you need for downstream steps.
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.
Step 5: Add Salesforce Actions to Your Automation
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.
Look up the existing Lead or Contact
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.
Update Lead or Contact with call data
Add a Salesforce Update Object step. In the Account tab, select your connected Salesforce account. Configure it:
Object Type: Lead (or Contact, depending on your lifecycle model)
Record ID: Map to the Id returned by the SOQL query — for example, {{ steps.soql_query.records[0].Id }}
Fields to update: Map Thoughtly variables to Salesforce fields. For instance, set Call_Disposition__c to {{ trigger.variables.disposition }}, Intent_Score__c to {{ trigger.variables.intent_score }}, and Qualification_Notes__c to {{ trigger.variables.qualifying_answers }}.
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.
Log a Task with transcript and recording
Add a Salesforce Create Object step to create a Task on the Lead or Contact record:
Object Type: Task
Subject: "Thoughtly AI Call — {{ trigger.variables.disposition }}"
WhoId: The Lead or Contact Id from the SOQL step
Description: Map to the AI-generated call summary or full transcript
Status: Completed
Recording_URL__c: Map to the call recording URL if your org tracks recording links on Tasks
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.
Add conditional logic
Use a Conditions step (If/Else or Switch) to route based on call outcomes. Common patterns:
If disposition = Qualified: Update Lead Status to 'Working', create an Opportunity with pre-filled fields, and assign the Lead owner based on your routing rules.
If disposition = Appointment Booked: Update Lead Status to 'Demo Scheduled', create a Task for the AE with the appointment time and context.
If disposition = Not Interested: Update Lead Status to 'Disqualified' with reason populated, and optionally add the Lead to a nurture Campaign.
If no matching record found: Use Create Object to create a new Lead with the captured phone number, name, and qualifying data from the call.
Step 6: Test the Sync in Sandbox Before Going Live
Never push an untested automation directly to your production Salesforce org. Thoughtly supports Salesforce Sandbox connections specifically for this purpose.
Connect a Salesforce Sandbox account in Thoughtly (separate OAuth from production).
Keep the automation in Draft mode. Fire a test call using the Test Agent or Call Me feature in the Agent Builder.
After the call completes, check the Automation run log in Thoughtly. Verify each step shows a success status.
Open the matching Lead in Salesforce Sandbox. Confirm the fields updated correctly, the Task appeared in the activity timeline, and the transcript and recording link are present.
If anything is wrong — mismatched fields, missing data, SOQL returning no results — fix it in the automation and re-test. Draft mode is safe: no real Salesforce data is touched.
Once verified, switch to your production Salesforce OAuth connection and activate the automation.
Step 7: Enable Bidirectional Sync for Ongoing Lead Imports
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:
Navigate to the Integrations section and open Salesforce.
Choose the Salesforce object (Lead, Contact, or a custom object) and configure field mapping — map FirstName, Phone, LeadSource, and any custom fields to Thoughtly contact attributes.
Set sync criteria or filters. For example, sync only Leads where Status = 'New' and LeadSource = 'Web Form'.
Run a test sync and verify imported contacts appear in Audiences with the correct attributes.
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.
Common Mistakes
Skipping the SOQL lookup and guessing the record ID. Always query for the Lead or Contact by phone number or external ID before updating. Without the record Id, the Update Object action has nothing to target.
Mapping to the wrong object type. If your org uses Person Accounts instead of separate Lead and Contact objects, your SOQL and field mappings need to target Person Account fields. Verify your object model before building.
Ignoring Salesforce API rate limits. High-volume outbound campaigns can hit Salesforce's daily API allocation. If actions fail because of rate limiting, reduce concurrency, batch updates where possible, or retry after the limit window resets.
Forgetting to activate the automation. Draft automations never execute, even when calls complete. After sandbox testing, click Activate to go live.
Not defining variables on the agent. If the agent does not capture disposition, intent_score, or qualifying_answers as variables, the On Call Completed trigger will not include them in the payload. Define variables in Settings → Variables before testing.
Using the wrong API name for custom fields. Salesforce custom fields end in __c. If you reference the label instead of the API name, the update will silently fail. Check Setup → Object Manager for the correct API name.
Leaving the automation on All Agents when only one agent needs sync. Scope the trigger to the specific agent whose calls you want in Salesforce. Otherwise unrelated test agents and internal calls will create noise in your CRM.
Measuring Success
After the sync has been running for a few days, check these metrics to confirm it is working and delivering value:
Automation success rate: In Thoughtly's Automation run log, check the percentage of completed runs vs. failed runs. Target 95%+ success rate. Failures usually indicate auth expiry, field mismatch, or API limits.
Time from call end to Salesforce update: Thoughtly writes back in near-real-time — typically under 10 seconds. If you see multi-minute delays, check whether a Delay step was added accidentally or if Salesforce API throttling is causing retries.
Lead Status coverage: What percentage of AI-called Leads have an updated Status vs. remaining in 'New' or 'Open'? Every call should result in a status move.
Task logging rate: Confirm that every completed call generates a Task on the Salesforce record. Filter by Subject containing 'Thoughtly AI Call' to see coverage.
Rep adoption: Are reps actually referencing the AI-generated summaries and qualification notes? Ask your team if the data is useful. If reps are ignoring it, the field mapping may need adjustment — too much data in the wrong fields is as bad as no data.
Frequently Asked Questions
Does syncing to Salesforce count against my API call limit?
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.
Can I sync conversations from both inbound and outbound calls?
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.
What happens if the Lead does not exist in Salesforce yet?
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.
Does the transcript appear on the Salesforce record?
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.
Does this work with Salesforce Financial Services Cloud?
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.