Skip to content
SourceLoop
Salesforce

How to troubleshoot Salesforce sync issues with SourceLoop

Checklist for diagnosing Salesforce sync problems, OAuth errors, FLS restrictions, sandbox/production mix-ups, missing records, and how to disconnect cleanly.

On this page
  1. Before you start
  2. Step 1: Check the connection status
  3. Step 2: For ‘Token expired’ / ‘Disconnected’
  4. Step 3: For a stuck sync
  5. Step 4: For missing records
  6. Step 5: For ‘fields not writing’ (records sync in but properties stay blank)
  7. Step 6: For ‘auto-create of sourceloop_* fields failed’
  8. Step 7: For sandbox / production confusion
  9. Step 8: How to disconnect
  10. When to email support

Salesforce sync issues fall into a handful of buckets. This checklist runs through them in order so you can get from “something’s off” to a working sync in under fifteen minutes.

Before you start

Have these tabs open:

  • SourceLoop’s Salesforce card at Setup -> CRM -> Salesforce
  • Salesforce’s Connected Apps OAuth Usage page (Setup -> Connected Apps -> Connected Apps OAuth Usage)
  • The most recent Sync log entry on the Salesforce card (three-dot menu)

Step 1: Check the connection status

  1. Open Setup -> CRM -> Salesforce in SourceLoop.
  2. Look at the card:
    • Connected + recent Last sync → healthy
    • Connected + stale Last sync (>1 hour) → stuck
    • Token expired → reconnect needed
    • Disconnected → run connect flow

Step 2: For ‘Token expired’ / ‘Disconnected’

  1. Click Reconnect.
  2. Sign in to Salesforce (production or sandbox, matching the toggle on the card).
  3. Authorise the scopes.
  4. You’re returned to SourceLoop, card flips to Connected.

If reconnect fails:

  • “User not authorised” → the user authorising doesn’t have API access (Profile -> Administrative Permissions -> API Enabled).
  • “insufficient_access_or_readonly” → the user’s profile doesn’t have Modify All Data; either grant it or reconnect with a System Administrator.
  • “Session expired or invalid” → Salesforce session timeout. Sign in fresh and retry.

Step 3: For a stuck sync

  1. Open the Salesforce card’s three-dot menu and click Sync log.
  2. Common errors and fixes:
    • INVALID_SESSION_ID → token expired between cycles. Click Reconnect.
    • REQUEST_LIMIT_EXCEEDED → daily API call quota hit. SourceLoop backs off; the next day’s quota refreshes automatically. Mid-day fix: have a Salesforce admin check daily API usage at Setup -> System Overview, and look for other tools consuming the quota.
    • API_DISABLED_FOR_ORG → API access turned off org-wide. Re-enable in Setup -> Profiles or Permission Sets.
    • INVALID_FIELD_FOR_INSERT_UPDATE → a mapped field doesn’t exist or isn’t writable. See the FAQ above.
  3. To force a sync immediately, click Resync now.

Step 4: For missing records

If Leads, Contacts, or Opportunities aren’t appearing in SourceLoop:

  1. Email mismatch. SourceLoop matches by email. Confirm the record has an Email value and that it matches what SourceLoop captured.
  2. Pre-connection records. Initial sync only pulls records modified after the connection date. Run Initial sync from the three-dot menu to pull everything.
  3. Sharing rules / OWD. The connecting user must have Read access to the record. Test by viewing the record as that user; if they can’t see it, neither can SourceLoop. Either change OWD or grant the user broader sharing.
  4. Org-Wide Defaults. If your org sets Lead Public to Read-Only, the connecting user needs to be in the right role hierarchy. The fastest fix is connecting with a System Administrator user.

Step 5: For ‘fields not writing’ (records sync in but properties stay blank)

  1. Outbound sync is enabled on the Salesforce card.
  2. Field-Level Security. Open Salesforce Setup -> Profiles -> [user’s profile] -> Object Settings -> Lead, and confirm Edit access on every sourceloop_* field. Apply the same on Contact.
  3. Field Mapping tab has at least one outbound mapping; direction is outbound or bidirectional.
  4. Field exists. Use Salesforce’s Object Manager to confirm the target field (e.g., sourceloop_first_source__c) exists on the Lead object.
  5. Validation rules. If a validation rule is rejecting the write (e.g., requires a non-empty LeadSource first), the sync log will show it. Either adjust the validation rule or pre-populate the required field.

Step 6: For ‘auto-create of sourceloop_* fields failed’

If the initial sync runs but SourceLoop didn’t auto-create the custom fields:

  1. The connecting user needs Customize Application permission (in addition to Modify All Data). Without it, SourceLoop can’t deploy custom fields via the Metadata API.
  2. Either grant the permission temporarily, reconnect with a System Administrator, or create the fields manually:
    • In Salesforce: Setup -> Object Manager -> Lead -> Fields & Relationships -> New.
    • Pick Text(255) for source / medium / campaign / content / term, Text(1000) for landing page.
    • Field API name should match what SourceLoop expects (visible in SourceLoop’s Field Mapping tab as the “external_field”).
  3. Repeat for the Contact object so attribution survives Lead conversion.

Step 7: For sandbox / production confusion

If you connected the wrong environment:

  1. Open the Salesforce card and click Disconnect in the three-dot menu.
  2. Toggle the Sandbox setting to the correct state.
  3. Click Connect.

Sandbox connections and production connections are separate records in SourceLoop. Data synced from one isn’t shared with the other. Most teams keep both connections active, sandbox for testing the mapping, production for real data.

Step 8: How to disconnect

If you need to fully remove the Salesforce integration:

  1. Open the Salesforce card in SourceLoop.
  2. Click the three-dot menu and select Disconnect.
  3. Confirm.

SourceLoop stops syncing immediately and revokes the OAuth token from its end. Your SourceLoop data stays intact, only future Salesforce syncs are paused.

To fully remove SourceLoop on Salesforce’s side too (recommended for cleanup):

  1. Go to Salesforce Setup -> Connected Apps OAuth Usage.
  2. Find SourceLoop in the list.
  3. Click Revoke.

This invalidates any cached tokens on Salesforce’s end.

When to email support

If you’ve worked through the checklist and the sync is still broken, email [email protected] with:

  • The Salesforce card’s current status
  • The most recent error from the sync log (verbatim)
  • Your Salesforce instance URL (visible on the Salesforce card)
  • Whether you’re connected to sandbox or production
  • Approximate time the issue started

We’ll dig in and respond within one business day.

Frequently asked questions

  1. My Salesforce card shows 'Token expired'. What now?

    Click **Reconnect** and run OAuth again. Salesforce access tokens are 2 hours long; SourceLoop refreshes them automatically via the refresh token. A 'Token expired' status usually means the refresh token itself was revoked (someone removed SourceLoop from Salesforce's Connected Apps, or a session policy rotated tokens). Reconnect by the same Salesforce user fixes it.

  2. I connected to sandbox but want to switch to production. How?

    Disconnect the sandbox connection (three-dot menu -> Disconnect), toggle the Sandbox setting OFF on the Salesforce card, click Connect. OAuth now goes through login.salesforce.com (production). Your sandbox data in SourceLoop is preserved; the production data syncs into a separate connection record.

  3. A specific Lead isn't syncing. What should I check?

    Three causes. (1) The Lead's Email is missing or different from what SourceLoop captured. (2) The Lead was created before the connection and hasn't been modified since the initial sync window. Run **Initial sync** from the three-dot menu. (3) The connecting user doesn't have Read access to the Lead (sharing rules, role hierarchy, OWD). Test by viewing the Lead as that user.

  4. SourceLoop fields aren't writing to Salesforce, but contacts are syncing in. Why?

    Most common cause is Field-Level Security. The connecting Salesforce user's profile must have Edit access to the field, otherwise Salesforce silently rejects the write. Open Setup -> Profiles -> [connecting user's profile] -> Field-Level Security -> Lead, and grant Edit on every `sourceloop_*` field. Alternatively connect with a System Administrator user.

  5. The auto-create of sourceloop_* custom fields failed. What now?

    The connecting user needs **Modify All Data** plus the **Customize Application** permission (or System Administrator profile) to create custom fields via the API. If the user doesn't have it, either grant the permission, reconnect with a System Administrator user, or create the fields manually in Salesforce (Setup -> Object Manager -> Lead -> Fields & Relationships -> New). The field API names SourceLoop expects are listed in the Field Mapping tab.

  6. How do I force a full re-sync?

    Open the Salesforce card, click the three-dot menu, select **Run initial sync**. This ignores the delta cursor and pulls every Lead, Contact, Account, and Opportunity again.

  7. I'm getting 'INVALID_FIELD_FOR_INSERT_UPDATE' errors. What do they mean?

    SourceLoop tried to write to a field that doesn't exist or isn't writable. Usually means a field was renamed or deleted in Salesforce. Open the Field Mapping tab and remove the mapping for that field, or remap to a valid field.

  8. How do I completely disconnect?

    Open the Salesforce card, click the three-dot menu, select **Disconnect**. SourceLoop stops syncing immediately and revokes the OAuth token. Your SourceLoop data stays intact; no new Salesforce data syncs until you reconnect. To also remove SourceLoop from Salesforce's Connected Apps, go to Salesforce Setup -> Connected Apps OAuth Usage -> SourceLoop -> Revoke.

Track every conversion to its true source

Capture and send full attribution data from every signup, lead, booking, and sale to your CRM and ad platforms, so you know exactly what's driving revenue.

Without SourceLoop

Untagged

Kayden Floyd

kayden@abc.com

  • SourceUnknown
  • MediumUnknown
  • CampaignUnknown
  • Landing pageUnknown
Journey
No touchpoints captured

With SourceLoop

Auto-tagged

Kayden Floyd

kayden@abc.com · Acme Co.

  • Channel Paid Social
  • CampaignFree_demo
  • Landing page/pricing
Journey
Synced to HubSpot Google Ads Meta