> ## Documentation Index
> Fetch the complete documentation index at: https://help.statisfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Salesforce sync modes: scheduled and real-time (CDC)

> Choose how Account, Contact and Opportunity changes reach Statisfy from Salesforce: on a schedule, in real time with Change Data Capture, or both.

# Salesforce sync modes

Statisfy brings Salesforce accounts, contacts and opportunities in three ways.
You set all of them in **Integrations** > **Salesforce** > **Settings**, in the
**Sync frequency** section.

| Sync | What it does | How often |
| - | - | - |
| **Scheduled** | A partial sync: reads only the records that changed since the last run, and finds new accounts | The **Sync partial updates** schedule you pick, from every 2 hours to daily |
| **Real-time (CDC)** | Receives changes to the objects you tick as they happen, using Salesforce **Change Data Capture** | As they happen |
| **Full sync** | Reads every account again, with all its contacts and opportunities. Always runs, also when Scheduled or Real-time is on | **Daily** or **Weekly** |

![Sync frequency: Scheduled and Real-time (CDC), Sync partial updates and Full sync](https://cdn.statisfy.com/help-artifacts/integrations/salesforce-sync-frequency-native.png)

**Scheduled** and **Real-time** are independent. Tick either one, both, or
neither:

| Scheduled | Real-time | Result |
| - | - | - |
| On | Off | Changes arrive on the **Sync partial updates** schedule. |
| On | On | Changes to the ticked objects arrive as they happen. The partial sync brings in new accounts and changes to the objects you did not tick. |
| Off | On | Changes to the ticked objects arrive as they happen. New accounts arrive only with the full sync. |
| Off | Off | Only the full sync brings in changes. |

The full sync always runs. It is the backup that picks up anything the other
two missed.

To read one record from Salesforce now, without waiting for a sync, use
[Refresh from CRM](https://help.statisfy.com/accounts/refresh_from_crm.md).

> [!NOTE]
>
> Support cases and Chatter are not part of these syncs. Each one syncs on its
> own schedule, which you also set in **Sync frequency**.

## Supported objects for real-time sync

Turning on real-time sync selects all three objects. **Account** is required;
you can opt out of **Contact** and **Opportunity** afterwards.

| Salesforce object | What syncs in real time |
| - | - |
| Account | Changes to accounts Statisfy already tracks |
| Contact | New and updated contacts on those accounts |
| Opportunity | New and updated opportunities, and deleted ones |

Real-time sync does not bring in new accounts. The scheduled sync and the full
sync do, because they apply your account type filters. These filters decide
whether a new account is a customer, a prospect, or churned.

## Fewer Salesforce API calls

With **Scheduled** and **Real-time** both on, the scheduled sync stops reading
changed records for the objects you tick. Real-time sync already delivers those
changes, so Statisfy uses fewer of your org's Salesforce API calls.

| Object ticked | What the scheduled sync still reads |
| - | - |
| Account | The Ids of the accounts your account filters match, to find new accounts and changed account types. It reads full details only for new accounts. With no account filters, it reads changed accounts as before. |
| Contact | Nothing. A new account brings its contacts with it. |
| Opportunity | Nothing. A new account brings its opportunities with it. |

Custom objects and the full sync are not affected.

> [!NOTE]
>
> If Statisfy hears nothing from Salesforce's real-time stream for over an hour,
> the scheduled sync reads every object again, as it does without real-time
> sync. It goes back to skipping them once the stream is live again.

## Before you turn on real-time sync

1. Connect Salesforce through the native connection. Real-time sync runs only
   on it: on the older connection, **Sync frequency** has no **Real-time (CDC)**
   option.

   * **Already on the native connection:** reauthenticate Salesforce in
     **Integrations → Admin Apps**.
   * **On the older connection:** in **Integrations → Admin Apps**, disconnect
     **Salesforce**. Open the **Salesforce** card again and click **Connect
     your account**. Your Salesforce settings stay as they are: both
     connections use the same settings.

   Sign in with a Salesforce user that has the **View All Data** permission.

   ![The Connect Salesforce window, with the Connect your account button](https://cdn.statisfy.com/help-artifacts/integrations/salesforce-connect-native.png)

2. In **Account Filtering** on the Salesforce settings page, configure one
   **Churned** filter and one other filter, such as **Customer**.

3. Turn on real-time sync, as the next section shows.

## Turn on real-time sync

1. Go to **Integrations**, open **Salesforce**, then **Settings**.
2. Expand **Sync frequency**.
3. Tick **Real-time (CDC)**. Statisfy selects **Account**, **Contact** and
   **Opportunity** for Change Data Capture in your Salesforce org for you. If
   they are already selected, nothing changes.
4. Save your settings.

Each selected object uses one of your org's Change Data Capture slots:

* If Salesforce doesn't accept **Contact** or **Opportunity**, usually because
  no slots are left, real-time sync still turns on without them. A message
  names them, and they keep syncing on the schedule.
* If Salesforce doesn't accept **Account**, **Real-time (CDC)** stays unticked
  and this page opens. Follow the manual steps below, then tick
  **Real-time (CDC)** again.

## Change which objects sync in real time

You can change the ticked objects while real-time sync is on. Save your
settings afterwards.

* **Tick an object** and Statisfy selects it in Salesforce first. The box only
  stays ticked once Salesforce accepts it; if it can't, this page opens.
* **Untick an object** and Statisfy stops syncing it in real time. It stays
  selected in Salesforce. If **Scheduled** is ticked, the partial sync covers
  it; the full sync covers it in any case.

**Account** always stays ticked: real-time sync needs it. To stop real-time
sync altogether, untick **Real-time (CDC)**.

## Set the schedules

Schedules are saved as soon as you pick them. You don't need to save the
settings page.

* **Scheduled** and **Sync partial updates:** tick **Scheduled**, then pick how
  often, from every 2 hours to daily. Pick **Off (daily full sync)** to stop
  partial updates: the full sync then runs daily and brings in all changes.
* **Full sync:** pick **Daily** or **Weekly**. Until you pick one, the full
  sync runs weekly while **Scheduled** is ticked, and daily while it is not.
* **Support cases:** pick a schedule under **Support cases** in **Sync
  frequency**, or under **Sync schedule** in **Support Cases**. Both change
  the same schedule. Cases sync daily until you pick one.
* **Chatter:** pick a schedule under **Chatter** in **Sync frequency**, or in
  the **Chatter** section. Until you pick one, Chatter does not sync.

## Select the objects manually

A Salesforce admin can do this in a minute:

1. In Salesforce, open **Setup**.
2. In **Quick Find**, type **Change Data Capture** and open it.
3. Move **Account**, plus **Contact** and **Opportunity** if you want them,
   from **Available Entities** to **Selected Entities**. Each selected object
   uses one of your org's Change Data Capture slots.
4. Click **Save**.
5. Back in Statisfy, tick **Real-time (CDC)** again. Statisfy sees the objects
   are already selected and turns real-time sync on.

> [!NOTE]
>
> Your org's other Change Data Capture selections are left as they are.
> Statisfy only adds the objects you tick.

## Why automatic setup can fail

> [accordion] Your org has reached its Change Data Capture object limit
>
> Salesforce limits how many objects an org can select for Change Data
> Capture, and the limit is shared with anything else in your org that uses
> it. By default the limit is five objects, standard and custom combined.
> You have three ways to make room:
>
> * **Turn on with fewer objects:** real-time sync needs one free slot, for
>   Account. With only one or two free, tick **Real-time (CDC)** anyway:
>   Statisfy turns on what fits and names the objects it left out. Unticking
>   an object later doesn't free its slot, because it stays selected in
>   Salesforce.
> * **Free up a slot:** remove an object you no longer need from
>   **Selected Entities**.
> * **Raise the limit:** buy the Change Data Capture add-on from your
>   Salesforce account representative. It removes the limit on how many
>   objects you can select and raises your daily event delivery
>   allocation.
>
> See Salesforce's [Change Data Capture Allocations](https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_allocations.htm)
> for the current limits.

> [accordion] The connected Salesforce user can't change Change Data Capture settings
>
> Selecting objects needs a Salesforce user who can customize the
> application, usually a Salesforce admin. Ask your admin to follow the
> manual steps above, or reconnect Salesforce with an admin user.

## Which value Statisfy keeps

A field can change in Salesforce and in Statisfy, and reach Statisfy through
both real-time sync and the scheduled or full sync. This is what Statisfy keeps:

| Field | Changed in Salesforce | Edited in Statisfy |
| - | - | - |
| Custom fields (accounts, contacts, opportunities) | The most recent change, whichever sync delivers it | Kept. Neither sync overwrites it |
| Contact and opportunity details, such as a contact's title or an opportunity's name | The value that arrived last | Kept. Neither sync overwrites it |
| Account details: name, ARR and renewal date | The value that arrived last | Replaced by the Salesforce value at the next sync |

"The value that arrived last" can briefly be the older one: if the scheduled
sync read a record just before you changed it, it can put back the earlier
value after real-time sync delivered the new one. The next scheduled or full sync
corrects it. Custom fields are never affected, because Statisfy compares when
each change was made.

> [!NOTE]
>
> To keep a change to an account's name, ARR or renewal date, make it in
> Salesforce.

## Turn off real-time sync

Untick **Real-time (CDC)** and save. Within about a minute, Statisfy stops
receiving changes from Salesforce. Changes it received before that are still
processed, so a few may appear shortly after you turn it off. The scheduled
sync, if ticked, and the full sync carry on as before.

The objects stay selected in Salesforce; remove them from **Selected Entities**
if nothing else in your org uses them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.