Skip to main content
Clerk → SalesforceIntegration guide

Connecting Clerk to Salesforce

Clerk handles both authentication and organisation membership, which matters for B2B products where the paying entity is a company and the signing-up entity is a person. Sending conversions into Salesforce rather than out of it is how marketing data reaches the place sales actually works. The join between them succeeds or fails on one thing: whether the Lead or Contact identity reaches the Clerk user and organisation before the conversion happens, because Salesforce can only match a conversion it can tie back to a click it recognizes.

Free30 minutesNo obligation

Specific to this pair

Clerk users and orgs into Salesforce Accounts and Contacts

Map each Clerk organization to a Salesforce Account, upserted on a custom Clerk org ID external ID, each member to a Contact, and the first paid subscription to a Closed Won Opportunity. Store the creator's click IDs and UTMs on the Account and Opportunity. Create Leads only for users without an organization.

For a B2B product on Clerk, Salesforce is where self-serve sign-ups meet sales, and the mapping is clean: a Clerk organization becomes an Account, each member becomes a Contact on it, and the first paid subscription becomes a Closed Won Opportunity on that Account. The ad click IDs and UTMs stored on the creating user belong in custom fields on the Account and are copied to the Opportunity, so pipeline reports split by source.

The default failure is creating a Lead per Clerk user. Five colleagues become five Leads, sometimes routed to five reps, and lead-to-customer rates stop meaning anything. Upsert on the organization first, using a custom field holding the Clerk org ID as an external ID, and create a standalone Lead only for users with no organization yet. If your app allows personal workspaces, decide whether those users become Leads or Person Accounts before any data arrives.

Send membership changes as well: when someone leaves an organization in Clerk, mark the Contact inactive rather than deleting it, or the Account loses history. Check whether a maintained connector exists; most teams route Clerk webhooks through their own backend or an iPaaS. Validation rules that require fields like Industry will reject Account creation from a sign-up that only has an email domain, so default or relax them for this source and watch the error log.

Clerk → Salesforce · what breaks

Why this join usually fails — Clerk → Salesforce

  1. 01

    The Lead or Contact identity never reaches Clerk

    Several people from one company sign up separately, each carrying a different acquisition source.

  2. 02

    Counting seats instead of customers

    Five colleagues signing up from one company is one paying customer and five conversions if attribution sits on the user. Cost per acquisition then reads as a fifth of reality.

  3. 03

    Writes that succeed and change nothing

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  4. 04

    Nothing reconciles afterwards

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Clerk → Salesforce · the fix

What working looks like — Clerk → Salesforce

  • The Lead or Contact identity on every account

  • Conversions arriving in Salesforce

    The marketing context appears on the record and flows into the opportunity, where sales and reporting can both use it.

  • Reconciled against the source

Clerk → Salesforce · architecture

How Clerk and Salesforce actually connect

  1. 1

    Clerk holds the truth

    In B2B SaaS the subscription belongs to an organisation and several users belong to it. Attributing revenue per user counts one customer several times.

  2. 2

    Salesforce needs a click to match

    Salesforce needs a resolvable record and a custom field to write to. Field-level security and validation rules can silently reject writes, which is a Salesforce-specific failure that returns success at the API level and changes nothing.

  3. 3

    The identifier is the bridge

    The Lead or Contact identity, captured at the visit and carried into the Clerk user and organisation.

  4. 4

    The event source decides reliability

    Send paid conversions per organisation, deduplicated across its users.

  5. 5

    Deduplication at the destination

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

Clerk → Salesforce · normal or broken

Working vs. broken, side by side — Clerk → Salesforce

Normal, not a fault

  • The Lead or Contact identity present on the account

  • Sent from your billing system, keyed on the organisation

  • Deduplicated correctly

    Salesforce deduplicates according to whatever matching rules your org has configured, which vary enormously between instances. Duplicate Leads are the standard failure and merging them afterwards is manual work.

  • Reconciles with the source

Actually broken

  • The Lead or Contact identity missing on most records

    Several people from one company sign up separately, each carrying a different acquisition source.

  • Sent from the browser

    Five colleagues signing up from one company is one paying customer and five conversions if attribution sits on the user. Cost per acquisition then reads as a fifth of reality.

  • Counted twice, or not at all

    Field-level security, validation rules and required-field constraints can reject a write while the API reports success. Open the record and look rather than trusting the response.

  • Nobody has reconciled it

Clerk → Salesforce · diagnose

Diagnostic order — Clerk → Salesforce

  1. 01

    Count accounts carrying the Lead or Contact identity

  2. 02

    Follow one real conversion end to end

  3. 03

    Compare user signups against paying organisations

    The ratio is the size of the overcount, and in B2B products it is rarely close to one.

  4. 04

    Write a test value and open the record in the UI

    The API saying it worked and the field actually holding the value are different things in Salesforce more than anywhere else.

  5. 05

    Read the match rate, not the success message

    Check the record in Salesforce itself, not the API response. Then confirm the value survives Lead conversion onto the Contact, Account and Opportunity — the mapping is separate and is usually the thing that was missed.

Clerk → Salesforce · prove

How it gets proven — Clerk → Salesforce

Source of truth

Your billing system, joined to the Clerk organisation rather than the user.

  • The Lead or Contact identity confirmed present on a live account.
  • A test value confirmed present on the record in the UI, and confirmed to survive Lead conversion.
  • Paid conversions reconciled per organisation against imported conversions, deduplicated across users.

Clerk → Salesforce · free audit

What we check in the free audit

  • Count accounts carrying the Lead or Contact identity
  • Follow one real conversion end to end
  • Compare user signups against paying organisations
  • Write a test value and open the record in the UI
  • Read the match rate, not the success message

Checked against

Your billing system, joined to the Clerk organisation rather than the user.

Get my free conversion tracking audit

Free30 minutesNo obligation

Clerk → Salesforce · when not to buy

When you don't need this — Clerk → Salesforce

  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the Lead or Contact identity.
  • Consumer products where one user is one customer do not have this distinction.
  • If your Salesforce org is administered by a team you cannot get time with, scope their availability before starting — this build is usually blocked on admin access rather than on the work.

Clerk → Salesforce · what we deliver

What gets built — Clerk → Salesforce

  • Identifier capture into Clerk

    Store the identifier on the user and attribute at the organisation, using the first user's source with the others recorded as supporting.

  • Event source: your billing system, keyed on the organisation

    Send paid conversions per organisation, deduplicated across its users.

  • Dispatch to Salesforce

    API writes to the Lead or Contact record, or a platform event, carrying the marketing context as custom field values.

  • Reversals where they exist

    Cancellations reverse against the organisation.

Written guarantee

95%+ tracking accuracy

Measured against Your billing system, joined to the Clerk organisation rather than the user.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Clerk → Salesforce questions, answered

If the user belongs to a Clerk organization, upsert the Account by org ID and add the user as a Contact; create Leads only for users with no organization.

Free · 30 min

Get Clerk and Salesforce joined properly

Free30 minutesNo obligation