Skip to main content
Firebase Auth → SalesforceIntegration guide

Connecting Firebase Authentication to Salesforce

Firebase Auth is usually the identity layer in a mobile-first product, which means the user ID it issues is the only thing connecting a web visit to an in-app purchase. 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 Firebase user identity 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

Firebase sign-ups as Salesforce Leads, upserted on the uid

Create the Salesforce Lead from a Cloud Function when a real account is created or linked, upserting on the Firebase uid in an external ID field, with pre-sign-in click IDs as custom fields mapped through conversion. Send closed-won Opportunities to ad platforms. Skip anonymous users, and verify test records in the Salesforce UI because validation rules often block writes.

For a B2B product with Firebase sign-in, account creation is the moment marketing hands a person to sales. Create the Lead from a Cloud Function when a real account is created or an anonymous one is linked, with the Firebase uid in an external ID field and an upsert on it, so a retried function or a second trigger updates one record instead of creating a duplicate.

Carry the ad click IDs captured before sign-in onto that Lead as custom fields, and check that your Lead conversion mapping copies them onto Contact and Opportunity. The conversion ad platforms should learn from is the Opportunity reaching closed won, often weeks after signup. When the deal is self-serve rather than sales-led, the uid on the record is what ties the Opportunity back to the subscription in your billing system.

Do not create Leads for anonymous Firebase users: they have no email, and the queue fills with blank records sales cannot work. After a test signup, open the record in the Salesforce UI rather than trusting the function's log, because required fields and validation rules on Lead are where these writes most often stop, and nobody watches Cloud Function logs closely.

Firebase Auth → Salesforce · what breaks

Why this join usually fails — Firebase Auth → Salesforce

  1. 01

    The Lead or Contact identity never reaches Firebase Auth

    Anonymous authentication creates users before signup, and linking an anonymous account to a real one is a step teams frequently skip.

  2. 02

    Anonymous accounts never linked to real ones

    Firebase's anonymous auth is convenient and creates a separate user. If it is not linked at signup, the pre-signup activity and the paying customer are two different people in every downstream system.

  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.

Firebase Auth → Salesforce · the fix

What working looks like — Firebase Auth → 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

    Firebase Authentication's own records are the reference, not either dashboard.

Firebase Auth → Salesforce · architecture

How Firebase Auth and Salesforce actually connect

  1. 1

    Firebase Authentication holds the truth

    Firebase holds identity, not revenue. Its value to measurement is that it gives a stable key that survives the web-to-app transition where every cookie dies.

  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 Firebase user identity.

  4. 4

    The event source decides reliability

    Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, not revenue.

  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.

Firebase Auth → Salesforce · normal or broken

Working vs. broken, side by side — Firebase Auth → Salesforce

Normal, not a fault

  • The Lead or Contact identity present on the account

    Visible on the record itself in Firebase Authentication, not merely captured somewhere on the site.

  • Sent from your billing system, keyed on the user ID

  • 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

    Salesforce's count and Firebase Authentication's records agree within a few percent over a closed window.

Actually broken

  • The Lead or Contact identity missing on most records

    Anonymous authentication creates users before signup, and linking an anonymous account to a real one is a step teams frequently skip.

  • Sent from the browser

    Firebase's anonymous auth is convenient and creates a separate user. If it is not linked at signup, the pre-signup activity and the paying customer are two different people in every downstream system.

  • 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

    The dashboard shows a number and no one has compared it to Firebase Authentication.

Firebase Auth → Salesforce · diagnose

Diagnostic order — Firebase Auth → Salesforce

  1. 01

    Count accounts carrying the Lead or Contact identity

  2. 02

    Follow one real conversion end to end

  3. 03

    Check whether anonymous accounts are linked or orphaned at signup

    Orphaned anonymous users are the most common Firebase identity failure and they silently break every cross-signup funnel.

  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.

Firebase Auth → Salesforce · prove

How it gets proven — Firebase Auth → Salesforce

Against Firebase Authentication's own records, not against either platform's dashboard.

Source of truth

Your billing system, keyed on the Firebase user ID.

  • 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 linked user identity against imported conversions.

Firebase Auth → 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
  • Check whether anonymous accounts are linked or orphaned at signup
  • Write a test value and open the record in the UI
  • Read the match rate, not the success message

Checked against

Your billing system, keyed on the Firebase user ID.

Get my free conversion tracking audit

Free30 minutesNo obligation

Firebase Auth → Salesforce · when not to buy

When you don't need this — Firebase Auth → Salesforce

  • If Salesforce already reports conversions that reconcile against Firebase Authentication's records within a few percent, this join is working and there is nothing to buy.
  • Measure identifier coverage yourself first — pull your last hundred accounts and count how many carry the Lead or Contact identity.
  • If you do not use anonymous auth, the linking problem does not arise.
  • 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.

Firebase Auth → Salesforce · what we deliver

What gets built — Firebase Auth → Salesforce

  • Identifier capture into Firebase Auth

    Capture the identifier on the web, write it to custom claims or your own user document at first auth, and link anonymous accounts rather than creating duplicates.

  • Event source: your billing system, keyed on the user ID

    Send paid conversions keyed on the user identity. Signups and anonymous sessions are stages, not revenue.

  • 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 same identity.

Written guarantee

95%+ tracking accuracy

Measured against Your billing system, keyed on the Firebase user ID.. Miss it and we keep working at no cost.

Get my free conversion tracking audit

From $400 · See packages

FAQ

Firebase Auth → Salesforce questions, answered

Use a Cloud Function on account creation or linking that upserts a Lead on an external ID field holding the Firebase uid, with the captured click IDs as custom fields.

Free · 30 min

Get Firebase Auth and Salesforce joined properly

Free30 minutesNo obligation