Sync Salesforce opportunities to secondary Salesforce cases

CRMMarketingSales

What it does

When an opportunity reaches Closed Won in Salesforce, this automation gathers account and contact details. It creates a case in secondary Salesforce only when all required records exist, preventing incomplete cases.

Who it's for

Sales operations teams who need to sync closed opportunities across Salesforce instances without manual entry.

Apps used

How teams use this

Handoff closed deals to service teams

When sales closes an opportunity, automatically create a case in the secondary Salesforce so the service team has a record to work from. No manual case creation is needed.

Sync only high-value opportunities

Filter the trigger to only sync opportunities above a certain amount so smaller deals do not clutter the secondary org. The rest of the flow stays the same.

Add custom fields to the secondary case

Include additional opportunity fields like close date or deal size in the case creation step so the service team has full context. Only the final step needs to be updated.

Notify teams when sync fails

Set up a notification to a Slack channel when the job stops with an error so teams know a case was not created. This adds visibility to sync failures.

How it works

  1. Monitor for Closed Won opportunities. When an opportunity stage changes to Closed Won in Salesforce, this automation starts and retrieves the opportunity details.
  2. Gather account and contact information. Fetch the related account details from Salesforce, search for opportunity contact roles, and retrieve the contact record so all required data is available.
  3. Verify records exist in secondary org. Search the secondary Salesforce for matching accounts and contacts. If either is missing, the job stops with an error to prevent incomplete case creation.
  4. Create the case in secondary Salesforce. Once all required records are confirmed in secondary Salesforce, create a case with the opportunity and contact details from the primary org.