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

# Configure sync rules

> Pick which Salesforce objects to sync and filter records with up to ten operators combined with AND or OR logic.

Sync rules decide what comes through. Pick the object types you want, then layer filters on top so only the records you actually need flow into Spotzee.

> [!NOTE]
>
> Sync rules live on each Salesforce integration record. Open the integration from your project's **Integrations** menu and configure rules from there. Changing rules resets the next run to a full sync so newly matching records are included.

## Pick objects to sync

You can pick any combination of three object types.

**1. Open the integration**

Inside the project, open **Integrations** → **Salesforce** and pick the integration.

**2. Open the configuration**

Pick **Configure** on the integration card.

**3. Toggle objects on**

In the **Objects to sync** section, pick the objects you want. Each toggle turns the object on or off. Selected objects show a highlight.

**4. Save**

Save. The next sync run will pull from every selected object type.

### Lead vs Contact

Both work. Pick the one that matches the audience you're sending to:

* **Sync Leads** for prospects. Top-of-funnel marketing, nurture sequences, awareness campaigns.
* **Sync Contacts** for existing customers. Renewals, upsell, product updates, customer comms.
* **Sync both** when you need to message prospects and customers separately. Most B2B teams sync both.

### CampaignMember

CampaignMember syncs Salesforce campaign membership. Add a rule on `CampaignId` when you want members of a specific campaign.

For example, filter by the Salesforce campaign ID for a product launch. Spotzee attaches campaign membership to the matching Lead or Contact record and emits a campaign event that can trigger a journey.

## Filter records with sync rules

Each rule has three parts:

* **Field**: a Salesforce field on the object you're syncing (`Status`, `Country`, `Industry`, `AnnualRevenue`, custom fields).
* **Operator**: how to compare the field value.
* **Value**: what to compare against.

Multiple rules combine with **AND** (all must match) or **OR** (any can match).

### The ten operators

| Operator | What it does | Example |
| - | - | - |
| `equals` | Exact match | `Status equals "Hot"` |
| `not_equals` | Doesn't match | `Status not_equals "Closed"` |
| `contains` | Text includes | `Email contains "@company.com"` |
| `not_contains` | Text excludes | `Email not_contains "test"` |
| `starts_with` | Begins with | `Phone starts_with "+61"` |
| `ends_with` | Ends with | `Email ends_with ".edu"` |
| `greater_than` | Numeric/date comparison | `AnnualRevenue greater_than 100000` |
| `less_than` | Numeric/date comparison | `CreatedDate less_than 2024-01-01` |
| `is_set` | Field has any value | `MobilePhone is_set` |
| `is_not_set` | Field is empty | `Email is_not_set` |

### Configure rules

**1. Open Sync rules**

Scroll to the **Sync rules** section in the integration's configuration view.

**2. Add rules**

Choose **Add rule**, pick the field, choose the operator, and enter the value. Repeat for as many rules as you need.

**3. Combine with AND or OR**

Pick **AND** to require every rule to match. Pick **OR** to allow any rule to match.

**4. Preview and save**

Use the preview action to see how many records match before saving. If the count looks wrong, refine and re-preview. Save once it's right.

### Worked examples

A few rule combinations that come up often:

* **Hot leads only**: `Status equals "Hot"`. One rule, AND.
* **Australian customers**: `BillingCountry equals "Australia"` AND `IsDeleted equals false`. Two rules, AND.
* **Mid-market or above**: `AnnualRevenue greater_than 1000000` OR `NumberOfEmployees greater_than 50`. Two rules, OR.
* **Recent leads, excluding test data**: `CreatedDate greater_than 2026-01-01` AND `Email not_contains "test"`. Two rules, AND.

The preview count tells you whether you've got the rule right before you commit to a sync.

## Empty result sets

If a sync returns zero records, the most common cause is rules that are too restrictive (or the connecting user lacking access to records that match). Use the preview count to diagnose. If the count is non-zero but the sync still imports nothing, check the integration's logs and field permissions.

## Next steps

> [card] [Map fields](https://spotzee.com/docs/guides/salesforce/field-mapping.md)
>
> Decide which Salesforce fields land on which Spotzee user property.

> [card] [Operations](https://spotzee.com/docs/guides/salesforce/operations.md)
>
> Manual sync, frequency, and monitoring.

> [card] [Troubleshoot](https://spotzee.com/docs/guides/salesforce/troubleshoot.md)
>
> What to do when no records come through.

> [card] [Salesforce overview](https://spotzee.com/docs/guides/salesforce/overview.md)
>
> What the integration does and what data flows.


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