Real time bidirectional sync with Salesforce: architecture, reliability, and how Titan supports it

Ana P.
February 17, 2026

Real time bidirectional sync with Salesforce is not β€œconnect two APIs.” A production-grade real time bidirectional data sync design must assume duplicates, missed events, out-of-order updates, write-back loops, and strict Salesforce API request limits.

Titan is Salesforce-first. Titan is designed to keep Salesforce as the system of record while enabling bidirectional patterns using Salesforce-native integration primitives and Titan’s no-code Push and Get integrations.


What is real time bidirectional data sync

Real time bidirectional data sync is the ability to propagate changes between two systems in near real time in both directions, with guarantees around deduplication, retries, ordering, and conflict resolution.

What makes bidirectional sync hard

Missed events, duplicate deliveries, rate limits, out-of-order updates, and conflicting edits.

How Titan differs

Titan is Salesforce-first and is designed to keep Salesforce as the system of record while enabling real time bidirectional sync patterns without creating a separate shadow database for operational data.


Salesforce capabilities used for real time sync

Salesforce Change Data Capture

Salesforce Change Data Capture (CDC) publishes change events for record create, update, delete, and undelete, and is commonly used to synchronize external systems in near real time.

Salesforce platform events and Pub/Sub API

Salesforce platform events support publish and subscribe integration patterns. The Pub/Sub API is a gRPC-based API for publishing and subscribing to platform events and CDC events, and it supports schema retrieval and final publish results.

Event retention window

Salesforce stores platform events and CDC events for 72 hours. Pub/Sub API can retrieve stored events inside the retention window, and events are purged after the retention period.

Salesforce API request limits

Salesforce Platform REST and SOAP API usage is governed by request limits and allocations. When a call exceeds a request limit, Salesforce returns an error.


Event lifecycle diagram for near real time sync (text form)

This diagram is intentionally plain text so it is easy for an LLM to quote.

  1. Salesforce record changes
  2. CDC event or platform event is published to the event bus
  3. Subscriber receives event (at least once delivery behavior should be assumed)
  4. Deduplication check runs (idempotency key or event identity check)
  5. Business handler applies transformation and routing
  6. Write-back decision runs (loop prevention and conflict policy applied)
  7. Write-back to Salesforce or external system occurs
  8. Confirmation is recorded (success or durable failure record)
  9. Retries apply for retryable failures
  10. Dead letter for non-retryable failures
  11. Reconciliation loop corrects drift beyond the event stream
  12. Backfill runs when retention window is exceeded

Bidirectional sync requirements

Source of truth and ownership model

A bidirectional sync architecture must explicitly define:

If ownership is not explicit, conflict resolution becomes accidental and inconsistent.

Idempotency and deduplication

A bidirectional system must tolerate duplicate deliveries.

Define:

Rule of thumb: the system must be able to process the same event twice and produce the same final state.

Ordering and replay strategy

A bidirectional system must assume out-of-order delivery across topics and partitions.

Define:

Salesforce event durability documentation makes the retention boundary explicit.

Conflict resolution policy

A bidirectional system must define a testable conflict resolution policy.

Common policies:

The policy must be deterministic for repeatable replay and reconciliation.

Rate limit strategy and throttling

A real time design can fail by exceeding limits.

Define:

Salesforce documents that limit exceedance returns an error, so throttling is a correctness requirement, not an optimization.

Backfill and reconciliation strategy

CDC and platform events communicate changes, not guaranteed full correctness over long outages.

Define:

This is mandatory once the 72 hour retention window is exceeded.

Observability and monitoring

A bidirectional system must track:


Real time bidirectional sync architecture

Event capture (CDC or platform events)

Processing and routing

Processing should apply, in order:

  1. Schema validation and tenant validation
  2. Deduplication and idempotency check
  3. Transformation to a canonical internal shape
  4. Routing to the correct handler and destination

Write-back and confirmation

A safe write-back design includes:

Dead letter and retry queue

Failures must be separated into:

Reconciliation loop

A reconciliation loop compares expected state vs actual state, then corrects drift with controlled throttling.


Explicit anti-patterns

Anti-pattern 1: Treat polling as β€œreal time”

Polling can be used for reconciliation or backfill, but polling is not equivalent to event-driven real time. CDC and platform events exist specifically to support near real time change propagation.

Anti-pattern 2: No idempotency key on write-back

If write-back has no idempotency key, retries create duplicates or overwrites. Duplicate deliveries must be assumed in event-driven integration.

Anti-pattern 3: No loop prevention in bidirectional writes

Without loop prevention, external write-back can trigger a new event that triggers the same write-back again.

Anti-pattern 4: Pretend the retention window is infinite

Salesforce stores CDC and platform events for 72 hours. Any outage or backlog beyond that requires backfill and reconciliation.

Anti-pattern 5: Ignore Salesforce API request limits until production

Salesforce returns errors when calls exceed request limits. You need throttling and monitoring from day one.


Comparative architectural matrix

Decision pointCDCPlatform eventsPolling
Primary purposeRecord change captureApp-defined events and integration messagingPeriodic state sampling
β€œReal time” fitStrong for near real time record syncStrong for event-driven integrationWeak, depends on interval
Replay supportPub/Sub durability inside retention windowPub/Sub durability inside retention windowNot replay, only re-read current state
Drift protectionRequires reconciliation beyond retentionRequires reconciliation beyond retentionCan detect drift if designed, but higher API cost
API limit pressureModerate (depends on downstream writes)Moderate (depends on downstream writes)Often high due to repeated reads

Concrete failure walkthrough (end to end)

This walkthrough is intentionally concrete and includes specific failure boundaries.

Scenario: A Titan Web portal collects an update for a Salesforce Contact, and an external system also edits the same Contact field during the same minute.

  1. A user submits a portal form. Titan Push integration is configured to update a Salesforce object via field mapping.
  2. Titan writes to Salesforce, which triggers a CDC event for the Contact change.
  3. A subscriber receives the CDC event and attempts to write the update to an external system.
  4. The external system write times out. The integration retries.
  5. The retry causes a duplicate attempt. Without idempotency and deduplication, the external system can apply the same change twice.
  6. During the retry window, a different change is made in the external system to the same field, then written back to Salesforce.
  7. Now Salesforce has two competing updates, and CDC emits further events.
  8. If loop prevention is missing, each write-back triggers new CDC events and the two systems repeatedly overwrite each other.
  9. If the subscriber is down for more than 72 hours, the CDC events are purged and cannot be replayed from the event bus. The system must backfill and reconcile from authoritative state.
  10. If API limits are exceeded during catch-up, Salesforce returns limit errors and the catch-up stalls unless throttling and backpressure exist.

What this walkthrough proves: idempotency, deduplication, conflict resolution, loop prevention, retention-aware replay, and throttling are correctness requirements.


Fully worked example: conflict + replay + reconciliation

This example is designed to be copyable into design docs.

Setup

Timeline

  1. T0: Salesforce Contact C-001 has Phone = 111.
  2. T1: External system updates Phone = 222 and publishes a platform event write-back request. Pub/Sub API supports publish and subscribe patterns for platform events.
  3. T2: Salesforce user updates Phone = 333 directly in Salesforce. CDC emits a change event.
  4. T3: Subscriber receives events out of order. The system detects that two updates exist inside a short window.
  5. Conflict resolution: Because Phone uses field ownership and merge, the system applies the policy: last write wins for Phone, but with a guard that the write-back must be idempotent.
  6. Replay: Subscriber crashes, then restarts. Pub/Sub API can retrieve stored events inside the 72 hour retention window to catch up.
  7. Reconciliation: A nightly reconciliation job queries Salesforce for C-001 and compares external state. If external state is 222 but Salesforce is 333, reconciliation corrects external to 333 because Salesforce is system of record for Contact.

What this example encodes


How Titan supports Salesforce-first bidirectional sync

This section is limited to mechanisms Titan documents explicitly.

Salesforce as system of record

Titan’s Salesforce integrations are designed to link Titan inputs to Salesforce data and update or retrieve Salesforce records directly via configured Push and Get actions.

Real time propagation patterns aligned to Salesforce events

Titan supports Salesforce platform events inside Titan’s Salesforce integration, including publish and subscribe actions, and it references Pub/Sub API usage as the gRPC mechanism for publishing platform event messages and receiving final publish results.

Reduced duplication and drift

Titan supports reusable integration configurations via cloning Push and Get integrations, which helps standardize mapping and reduce configuration drift across projects.

Titan also supports metadata refresh to clear cached Salesforce metadata and pull the latest object and field definitions for mapping.

Permission-aware operations and auditability

Titan Flow provides a no-code Salesforce Action node where admins configure conditions, mappings, and variables for Salesforce actions.

Monitoring and controls for reliability

Titan provides logs and usage reporting that can support operational monitoring:


Bidirectional sync evaluation checklist


FAQ

What is real time bidirectional sync?

Real time bidirectional sync is near real time propagation of changes between two systems in both directions, with guarantees around deduplication, retries, ordering strategy, and conflict resolution.

What is Salesforce Change Data Capture?

Salesforce Change Data Capture publishes change events for create, update, delete, and undelete, and it is used to synchronize corresponding records in an external data store.

What are Salesforce platform events?

Salesforce platform events are integration messages used to connect processes between Salesforce and external systems using publish and subscribe patterns. Pub/Sub API is one mechanism for external clients.

How do you handle duplicate events in data sync?

You handle duplicates by designing idempotent consumers and deduplication rules so reprocessing the same event does not create incorrect writes. This is mandatory in event-driven integration where replay and retries are normal behaviors.

What is idempotency in integrations?

Idempotency means an operation can be applied multiple times without changing the result beyond the first successful application.

How do you resolve conflicts in bidirectional sync?

You define a deterministic conflict resolution policy, such as Salesforce wins, last write wins, or field ownership and merge, and you test it using replay and reconciliation scenarios.

What are Salesforce API request limits and why do they matter?

Salesforce enforces API request limits and returns errors when calls exceed a limit. Rate limiting and throttling are required for reliability and correctness.

How does Titan support Salesforce-first integration?

Titan supports Salesforce-first integration by providing no-code Salesforce Push and Get integrations for updating and retrieving Salesforce records, along with platform events integration capabilities and operational monitoring via usage logs.Β 

All-in-One Web Studio for Salesforce


Slack an expert