Skip to content
Useful Builds
← All insights

Salesforce & Systems Integration · 10 min read

Salesforce Integration Sync Failures: Diagnose and Recover Safely

Salesforce records not syncing? Diagnose timeouts, duplicates, failed batches and missed events before safely replaying CRM integrations.

Useful Builds ·

When Salesforce and another system disagree, do not begin by replaying every failed job. First identify the affected business records, establish which system owns each field, and determine whether the last write succeeded. Then repair the smallest safe set of records, with duplicate protection and a reconciliation check. A green integration dashboard does not prove that invoices, bookings or customer statuses match.

This troubleshooting guide is for CRM owners, operations managers and technology leads whose Salesforce-to-ERP, finance or customer-platform synchronisation is unreliable. It covers incident containment, error classification, safe replay and the operational controls to request from an integration provider. It is not a substitute for inspecting your specific integration logs.

First 30 minutes: contain the business impact

  1. Identify the transaction: Choose one real affected record and capture its Salesforce ID, external system ID, business key and the expected versus actual state. Avoid exporting unnecessary personal information into incident notes.
  2. Find the last confirmed boundary: Was the event emitted, accepted by middleware, accepted by the destination API, and committed to the destination record? An HTTP success from middleware may only mean the message was queued.
  3. Pause dangerous retries: If a timeout may have occurred after an invoice or order was created, stop unconditional create requests until you can check the destination.
  4. Scope the blast radius: Compare records by creation or update window, source, integration job and business state. Record how many are pending, failed, duplicated or inconsistent; do not infer completeness from a job-level success flag.
  5. Assign ownership: Name a technical owner for delivery recovery and a business owner who can approve reconciliation of financial or customer-facing data.

Salesforce's Bulk API failure guidance explicitly warns that a completed batch can contain failed records and a failed batch may still contain successful writes. Always inspect row-level outcomes before reprocessing.

Classify the failure before choosing a remedy

Observed symptomLikely classFirst safe action
Timeout or 5xx after a writeUnknown commit / transientQuery destination by stable key before retry
429 or quota exceededCapacity or throttlingRespect backoff, reduce concurrency, monitor queue age
Missing required field or invalid valueData or mapping defectCorrect mapping or source record; do not blindly retry
401, 403 or permission changeIdentity / accessCheck integration-user scopes and permissions securely
Both systems say success but values differSemantic or ownership driftReconcile field rules, timestamps and authoritative source

Distinguish delivery failure (the message never arrived), processing failure (the receiver rejected it), and business mismatch (both systems processed something, but the result is wrong). Each requires different evidence.

Worked example: CRM opportunity marked won, invoice missing

Consider a hypothetical distributor: Salesforce marks an opportunity Closed Won and an integration asks the accounting platform to create an invoice. The request times out. A support analyst sees no confirmation and clicks retry. Two invoices now appear because the first call actually committed. This is an illustrative failure scenario, not a Useful Builds client incident.

Safer design: generate a durable invoice-request identifier before calling the accounting API; persist it with the Salesforce opportunity and integration log; search for an existing destination invoice by that identifier before retrying; and, where supported, send the same idempotency key on every attempt. A Salesforce External ID upsert can help when Salesforce is the destination, but it does not automatically make an external finance API idempotent. The destination must enforce its own duplicate-prevention contract. Amazon's idempotent API design guidance explains why a stable caller request identifier matters when responses are lost.

Once recovered, reconcile the opportunity, invoice identifier, amount, currency, status and timestamps. Have finance approve any correction or cancellation. Do not delete suspected duplicates automatically.

When events disappear: know the replay window

If your architecture uses Salesforce Change Data Capture or platform events, investigate subscriber outages promptly. Salesforce's Pub/Sub API documentation specifies a 72-hour retention window for these events, with no guarantee beyond that period. Replay IDs are opaque and not necessarily sequential. A subscriber must persist checkpoints and still reconcile source and destination records: replay is a recovery tool, not a complete guarantee against every missed change.

For an outage beyond the retained window, use a controlled backfill based on source records and business keys. Define a watermark and overlapping comparison period; test on a sample; then run a limited batch with a record-level exception report. The Salesforce CDC delivery guide documents event ordering and temporary storage.

What a reliable recovery workflow should include

  • One correlation ID: Follow the same business transaction across Salesforce, middleware and the destination.
  • Explicit state: Pending, accepted, applied, rejected and awaiting review should mean different things. Define who may move an item between states.
  • Bounded retries: Retry transient faults with backoff; route validation failures to an exception queue with an owner, not an infinite loop.
  • Idempotent writes: Prevent repeated messages from producing additional financial or customer-visible actions.
  • Reconciliation: Compare business keys and meaningful fields, not just message counts. Investigate missing, duplicate and stale records.
  • Safe reprocessing: Show the proposed change, approver, reason, previous attempt history and result for each replay.
  • Alerting: Measure oldest pending item, failures by reason, unresolved discrepancies and time to recovery.

Before choosing a connector, middleware or custom service, review our Salesforce integration architecture comparison. If the root problem is inconsistent CRM configuration rather than message delivery, use the Salesforce CRM health-check guide to scope remediation.

Questions to ask an integration provider

  1. Can you trace one failed business record from source event to final destination write, including intermediate acknowledgements?
  2. What happens if the destination commits a write but the HTTP response times out?
  3. Which errors retry automatically, who owns exceptions, and how are failed records safely replayed?
  4. How do you detect a business mismatch when every API call returned success?
  5. Can we demonstrate a failed-write and recovery test in a sandbox before launch?

A practical initial engagement is a bounded sync-failure assessment: sample affected transactions, map ownership, inspect logs and produce a prioritised repair and monitoring plan. Useful Builds offers systems integration and a way to discuss your specific failure; the right outcome may be repairing the existing connector rather than replacing it.