Salesforce offline conversions to Google Ads, Meta, TikTok and LinkedIn
Your ads never see what happens after the form. This page shows how to make a Salesforce Flow, Apex trigger or outbound message post each stage change to the DataCops sales webhook, so Google Ads, Meta, TikTok and LinkedIn learn which clicks became customers.

Trusted by agencies and brands running paid media










How do Salesforce offline conversions work?
Offline conversions are sales, or steps toward a sale, that happen away from your website and are sent back to the ad platform that brought the customer. In Salesforce that means a lead that became qualified, or an opportunity that reached Closed Won.
DataCops has no native Salesforce app, and we will not pretend otherwise. What it has is a private sales webhook. Salesforce posts a small message when a stage changes, DataCops matches the person to the ad click it kept on your own domain, and sends the result to every platform you connected.
DataCops has no native Salesforce app. A Salesforce Flow, Apex trigger or outbound message posts each stage change to a private webhook, and DataCops sends it to Google Ads, Meta, TikTok and LinkedIn.
What your ads learn from
Why send Salesforce stages to your ads
Ad platforms optimize for what they are told. If the only signal is the form fill, they find more people who fill in forms, including the ones who never answer the phone. A Closed Won event with a value tells them what a good click looks like.
The catch is timing. Salesforce closes a deal weeks after the click. Safari caps browser-script cookies at 7 days, and iOS 17 Link Tracking Protection strips gclid and fbclid from links. By the time the deal closes, the ad click is often gone from the browser. DataCops keeps the click on your own domain for up to 90 days, so the match still works on the day Salesforce reports the sale.
How to connect Salesforce to the DataCops webhook
You need the private sales webhook URL from your DataCops dashboard. Treat it like a password and keep it out of shared documents. From Salesforce, there are three ways to call it.
- Salesforce Flow: a record-triggered flow on Lead or Opportunity, fired when the stage changes, with an HTTP callout action that posts the JSON below. This needs no code and is the easiest to maintain.
- Apex: a trigger or queueable class that makes an HTTP callout when the stage field changes. Use it when you need logic a Flow cannot express, and register the webhook host as a remote site or named credential.
- Outbound message or middleware: an outbound message, or Zapier, Make or n8n listening to Salesforce and posting to the webhook. Use it when your team already runs one of these.
Direct posting is one less thing to break. A middleware tool adds a step that can fail, and a task count you may pay for, but it is quicker to set up if nobody on your team writes Flows.
Example payload from a Closed Won opportunity
This is an example, with made-up values. Field names are the real ones the webhook reads.
Example JSON body posted when an opportunity reaches Closed Won
{
"event": "won",
"email": "[email protected]",
"phone": "+14155550137",
"value": 4800,
"currency": "USD",
"order_id": "006XX00000ABC123",
"gclid": "Cj0KCQjw-example",
"fbclid": "IwAR-example",
"lead_id": "00QXX00000LEAD01",
"test": false
}The event is required. The stage names to use for lead, booked, showed, won and paid are in the offline conversions docs. Email or phone must be present, and phone should carry the country code. Send value and currency on won events so Google Ads, Meta, TikTok and LinkedIn can optimize for revenue. The click IDs are optional and worth sending when you store them on the Lead or Contact.
Five Salesforce pitfalls to plan for
Most failed Salesforce setups break in the same handful of places.
- Lead conversion changes the record. When a Lead converts, Salesforce creates a Contact, an Account and often an Opportunity, and the field values you mapped on the Lead do not always copy across. Map your email, phone and click ID fields on both the Lead and the Contact, and check the conversion field mapping before you go live.
- One contact, several opportunities. A customer who buys twice should count twice, but a customer whose opportunity is edited three times should count once. Use the opportunity ID as order_id. The same order_id sent twice is counted once.
- Stage renaming. Flows and Apex usually match on the stage name. If someone renames Negotiation to Contract Sent, your automation silently stops firing. Match on a stable field such as IsWon, or keep a short list of allowed stage names and review it whenever the pipeline changes.
- Sandbox versus production. A sandbox full of test data will happily post to a live webhook. Send the test flag as true from every sandbox and test record. Test rows are logged, and you can confirm the mapping without a fake sale reaching your ads.
- Ownership. Automation runs as a user. If that user is deactivated, the callout stops. Run flows as a system or integration user, and give that user access to the fields you send.
What DataCops does and does not do
DataCops matches each posted sale to the ad click it kept, by click ID or by hashed email and phone, and sends it to Google Ads, Meta, TikTok and LinkedIn. Each row in the delivery log shows as sent, held, skipped or failed, with the reason. Pixel and server events are deduplicated by event_id.
It does not read Salesforce for you, so nothing arrives until Salesforce posts it. It does not reverse refunds on Meta or TikTok. It does not read back per-row Google Ads rejections yet. Microsoft Ads is not supported. LinkedIn matches on hashed email, li_fat_id or name with company, and not on phone, so send email when you can.
Filter fake leads before you send
A bot that fills in your form becomes a lead your ads try to find more of. DataCops checks every visit for bots and datacenter traffic, and for VPNs and proxies if you choose. Switch on Real people only for a platform and flagged visits never reach it.
Sales that come from your CRM are sent as your CRM reports them, with no bot check, so qualify them there before you send.
How DataCops spots botsSet up Salesforce offline conversions
About 5 minutes for the site, plus the Flow on the Salesforce side.
- Step 1code
Add the DataCops script
One script and one DNS record keep every ad click on your own domain. - Step 2ads_click
Connect your ad platforms
Sign in to Google Ads, Meta, TikTok or LinkedIn and pick the account. - Step 3hub
Post from Salesforce
Point a Flow, Apex callout or outbound message at your private sales webhook.
FAQ
No. There is no native Salesforce or Pipedrive app. Salesforce sends stage changes to your private DataCops sales webhook, using a Flow, an Apex callout or an outbound message, or through Zapier, Make or n8n.
Works with the rest of DataCops
Conversion API
Server-side conversions to Meta, Google Ads and TikTok, no code.
See Conversion APIAds Warmup
Feed your customer list to the ad platforms before you spend.
See Ads WarmupLeadCops
Verified leads, and conversions only once a lead qualifies.
See LeadCopsOffline Conversions
CRM, store and CSV sales matched back to the ad click.
See Offline ConversionsLet your ads learn from Closed Won
Start free, add the script, and post your first Salesforce sale in an afternoon.
Setup in 5 minutes. No credit card.