
- ClickFlare → Salesforce: ClickFlare passes its click ID to your page, and your form saves it in a custom field on the lead.
- Salesforce → ClickFlare: when the lead or opportunity reaches the stage you choose, a flow with an HTTP Callout action sends the conversion to ClickFlare with that click ID.
At a glance
To set up Salesforce with ClickFlare:- Create conversions, campaign and offer.
- Add a click ID field and save it.
- Create a Named Credential.
- Create the record-triggered flow.
- Add the HTTP Callout.
How the data flows
What you’ll need
- A ClickFlare account with your own tracking domain, ideally with SSL. See Tracking domains.
- A Salesforce org where you can create custom fields, Named Credentials and flows in Flow Builder. Which editions include HTTP callouts from Flow isn’t covered here: check with your Salesforce admin or Salesforce’s documentation for your edition.
- A form that creates leads in Salesforce, such as Web-to-Lead or a form tool connected to Salesforce, and that can include a hidden field.
Setup
Set up your own tracking domain
trk.yourdomain.com, under Tracking domains. The Named Credential points at it, so changing it later means updating Salesforce too.Create a custom conversion for each stage
ct value the flow sends. It must match exactly. See Custom conversions.Create the campaign and add your page as the offer
Add a click ID field to the lead
Save the click ID from your form
cf_click_id from the page URL and writes it into the custom field.- Web-to-Lead: include the custom field when you generate the form HTML, change that input to a hidden one, and fill its value from the
cf_click_idURL parameter with a short script on the page. The generated HTML names custom fields by their field ID, so check it rather than guessing the name. - A form tool connected to Salesforce: add a hidden field that reads the URL parameter, and map it to the custom lead field.
Create a Named Credential for your tracking domain
https://trk.yourdomain.com. The HTTP callout uses it as its base URL.ClickFlare’s postback needs no authentication. How you set that up depends on whether your org uses legacy Named Credentials or the newer type with an External Credential, so follow Salesforce’s steps for your org.Create the record-triggered flow
- Object: Opportunity. Condition: Stage equals Closed Won, only when the record is updated to meet the condition.
- For the
qualifiedstage, build a second flow on Lead with your qualified status as the condition.
Add the HTTP Callout
- Name the external service and select your Named Credential. Click Next.
- Set Method to GET and Set URL Path to
/cf/cv. - Add query parameter keys
click_id,ct,payoutandtxid. - For the sample response, enter an example instead of connecting, since ClickFlare’s postback doesn’t return data you need. Save.
ct.Option: JSON POST callout
HTTP callouts can also send POST requests. Instead of query parameter keys, you give a sample request body, and Flow Builder creates a data structure from it that you fill with an Assignment before the callout. Use this sample:cf_click_id, won to ct, the Amount to payout and the opportunity record ID to txid. ClickFlare accepts this JSON at the same /cf/cv endpoint.
Both callouts carry the same values, txid included. The GET callout is simpler to build. Use POST when your org’s policy requires request bodies over query strings.
Stages, payout and duplicates
One stage, onect. A conversion with a different ct on the same click is added as a new conversion. A lead that qualifies and later closes shows once under lead, once under qualified and once under won.
Payout from the amount. Map payout to the opportunity Amount on the won callout. Send 0, or leave payout out, on earlier stages so revenue isn’t counted twice.
Use txid for repeat business. With the opportunity ID as txid, a second closed opportunity on the same click counts as its own conversion. If a flow fires twice for the same opportunity, the same txid means ClickFlare keeps one conversion.
Choose what the ad platform sees. Each custom conversion is mapped to the traffic source postback separately, so you can send only qualified or won to the ad platform to optimize on.
Bulk updates. A record-triggered flow runs once per record. A mass update of opportunities to Closed Won fires one callout per record, which is what you want, but avoid test mass updates on live data.
Verify the setup
Click through the campaign
cf_click_id= and a real click ID.Submit the form
Run the flow
Check ClickFlare
ct, payout and txid. A conversion only registers when click_id holds a real ClickFlare click ID.Send ClickFlare conversions to Salesforce (optional)
To go the other way, for example to update a Salesforce record when ClickFlare records a sale from your store, use the Custom Webhook integration. Go to Integrations → Conversion API → New integration, choose Webhooks, map the event, choose POST and put macros such as{cf_click_id} and {payout} in the body.
Salesforce has to find the record by the click ID before it can update it. A relay such as Zapier, Make or n8n can receive the webhook, search for the lead by the click ID field and update it, without code in your org.
Troubleshooting
The click ID field is empty on new leads
The click ID field is empty on new leads
- The page URL has
{cf_click_id}as text, or no parameter at all. Traffic must come through the ClickFlare campaign URL, and a lander’s CTA must use the ClickFlare click URL. - The hidden input’s name doesn’t match the custom field’s ID in the Web-to-Lead HTML.
- The script that copies the URL parameter runs after the form is submitted, or not at all.
- The campaign uses direct tracking, so the click ID isn’t in the URL. See Direct tracking.
Opportunities have no click ID
Opportunities have no click ID
The flow fails at the callout
The flow fails at the callout
- The callout is on the immediate path. Move it to the asynchronous path.
- The Named Credential URL isn’t your tracking domain, or includes the path. The path
/cf/cvgoes in the callout, not the credential. - The flow has no fault path, so a timeout fails the whole interview. Add a fault path that records the error.
The callout ran but no conversion shows
The callout ran but no conversion shows
- GET uses
click_id, JSON usescf_click_id. Check you used the right one. - The
ctvalue doesn’t match a custom conversion’s parameter exactly.
FAQ
Does ClickFlare integrate with Salesforce?
Does ClickFlare integrate with Salesforce?
Can I track the form fill without a flow?
Can I track the form fill without a flow?
ct=lead and use flows only for later stages.Can I avoid flows altogether?
Can I avoid flows altogether?
Can I send more fields, like the product or the sales rep?
Can I send more fields, like the product or the sales rep?
param1 to param20 as extra query parameter keys and map them to fields. ClickFlare stores them with the conversion.Does the currency matter?
Does the currency matter?
payout is a plain number. Send it in the currency your ClickFlare reports use, or convert it in the flow first.