Sync Salesforce Contacts and Cases on schedule

Recipe ToolsCRMMarketing

What it does

When a scheduled interval arrives, this automation searches Salesforce for new and updated Contacts using a SOQL query. It upserts them in bulk to Salesforce Secondary, then repeats the process for Case records linked to those Contacts.

Who it's for

Data and analytics teams who need to keep a secondary Salesforce org in sync with Contact and Case data on a regular schedule.

How teams use this

Keep a backup org in sync daily

Run this automation every night to sync all new and updated Contacts and Cases from the primary Salesforce org to a secondary org. The team has a current backup without manual work.

Sync data to a reporting org

Point this automation at a reporting Salesforce org instead of a backup. Contacts and Cases flow to the reporting environment on schedule so analysts always query fresh data.

Filter Contacts by region before sync

Add a condition to the SOQL WHERE clause so only Contacts in a specific region sync to the secondary org. This keeps the destination org focused on relevant records.

Sync only high-priority Cases

Include a priority field check in the Case SOQL WHERE clause so only Cases marked as high priority upsert to the secondary org. The destination stays lean with only critical records.

How it works

  1. Run on a specified interval. At the scheduled time, this automation starts and searches Salesforce for Contacts that are new or updated since the last sync.
  2. Search Contacts with SOQL query. Query Salesforce for Contacts matching the WHERE clause to find records that need to sync to the secondary org.
  3. Upsert Contacts in bulk. When the search returns results, upsert all new and updated Contacts in bulk to Salesforce Secondary so both orgs stay aligned.
  4. Search Case records with SOQL query. Query Salesforce for Case records linked to those Contacts, using a WHERE clause to find new or updated records since last sync.
  5. Upsert Cases in bulk. When Case records are found, upsert them in bulk to Salesforce Secondary with their parent Contact relationships intact.