Fixing Salesforce transaction rolled back errors
When to use this guide: Sync Test or a live Salesforce sync fails with
transaction was rolled backoranother operation in the same transaction failed.
TL;DR fix: One step in Salesforce’s composite Contact and Account upsert failed, so Salesforce rolled back the whole write. Find whether Account create, Contact create/update, or Task/activity create is blocked — most often by a validation rule, required field, or field-level security — then fix that underlying failure and re-run Sync Test.
The error and why this happens
Section titled “The error and why this happens”During Sync Test or webhook processing, OutboundSync upserts a Contact (and creates an Account when no match exists), then writes activity as a Task or EmailMessage. Salesforce runs those Contact and Account writes as a composite request with allOrNone behavior: if any sub-request fails, the entire transaction is rolled back.
You may see a message like:
Transaction was rolled back.Another operation in the same transaction failed.That message is a wrapper. The root cause is usually one of:
- An Account or Contact validation rule (for example, required Industry or Billing Address on create)
- A required field OutboundSync does not populate
- Field-level security blocking a field OutboundSync writes (including Task Type)
- Profile or permission limits on the connected Salesforce user
OutboundSync may surface the composite rollback text instead of the specific field or rule name, so you need to isolate which object failed.
OutboundSync does not create or update Opportunity records. Activity lands on the Contact (or Lead) you configured as the primary object. See Which Salesforce fields are updated.
How to diagnose
Section titled “How to diagnose”1. Isolate create vs update
Section titled “1. Isolate create vs update”Re-run Sync Test with an email address that already exists as a Contact in Salesforce.
- If the test succeeds with an existing Contact, the failure is likely on Account or Contact create (validation rules or required fields when OutboundSync creates net-new records).
- If the test still fails, check Task/activity writes and field visibility next (including Task Type).
For how Sync Test works, see Sending test webhook payloads.
2. Check OutboundSync logs
Section titled “2. Check OutboundSync logs”Open the webhook log for the failed Sync Test or live event and review the Salesforce error payload. See How to check OutboundSync logs.
Look for nested messages that name a field, validation rule, or object. If the log only shows the rollback wrapper, continue with the Salesforce-side checks below.
3. Ask a Salesforce admin
Section titled “3. Ask a Salesforce admin”Have an admin confirm which validation rules and required fields apply when creating Accounts and Contacts via the API for the connected integration user. Also confirm that user can create Tasks and has visibility on the fields OutboundSync writes.
Common fixes
Section titled “Common fixes”Validation rules on Account or Contact
Section titled “Validation rules on Account or Contact”If creating a new Contact also creates an Account (no matching Account for the email domain), Account validation rules often block the composite upsert.
Exempt the OutboundSync integration user from those rules, or adjust the formula so API-driven creates are allowed. Follow How to bypass validation rules in Salesforce.
Task Type or field-level security
Section titled “Task Type or field-level security”If activity create fails because the integration user cannot see or edit Task Type, Salesforce returns an INVALID_FIELD error in some orgs — and in others the failure can appear inside a rolled-back composite transaction.
Fix field visibility with Fixing the Salesforce task Type field error.
Contact and Account create behavior
Section titled “Contact and Account create behavior”Review which default fields OutboundSync can populate and when it creates Accounts: Which Salesforce fields are updated.
For orgs with strict data hygiene, preload Contacts and Accounts before campaigns (and before Sync Test), then sync activity onto existing records. See the preload guidance in Data is incomplete in my CRM.
Verifying the fix
Section titled “Verifying the fix”- Apply the Salesforce-side fix (validation bypass, FLS, or preload).
- Re-run Sync Test from the webhook receiver.
- Confirm the Contact exists in Salesforce and that Task or EmailMessage activity appears on that record.
If Sync Test still fails, capture the full error from webhook logs and escalate to support with the log ID and Salesforce org details.