Loading

Salesforce Quote Sync Not Working When Quote and Opportunity Are Created in the Same Transaction Using Flow

Publicatiedatum: May 4, 2026
Beschrijving

When a Salesforce Flow creates a Quote and simultaneously updates the Opportunity's SyncedQuoteId field in a single transaction, the Quote.IsSyncing field remains False and the Quote user interface shows a "Start Sync" button.


Clicking "Start Sync" produces the message: "Quote is already synced with this opportunity. An opportunity can be synced with only one quote. If you continue, this quote won't sync." The quote does not sync, even though it has no line items and the opportunity has no products.


This article explains why this behavior occurs and how to resolve it by separating the transaction that creates the Quote from the transaction that updates the Opportunity's SyncedQuoteId.


Note: Process Builder is a legacy automation tool. The recommended approach is to implement this solution using Salesforce Flow with a Scheduled Path.

Oplossing

When a Quote is first created, it is in an unsynced state. At this point, the Opportunity's SyncedQuoteId should be null. When the Quote insert and the Opportunity SyncedQuoteId update occur in the same transaction as the Opportunity insert, the sync detection logic does not register a change in the Quote ID.

Why the Same-Transaction Sync Fails

The Opportunity is saved in a parent transaction that has not yet ended. Within that same transaction, the Quote is inserted and the Opportunity is updated with the new SyncedQuoteId. Because the Opportunity insertion and the subsequent Opportunity update (with SyncedQuoteId) occur in the same transaction, the system treats it as a recursive save and does not trigger the sync operation.

During the "Start Sync" process, Salesforce expects the SyncedQuoteId on the Opportunity to differ from the Quote ID being synced. If the IDs are the same (as they are in this scenario), the sync is skipped. This is why manually creating a new Quote and syncing it works successfully — the Quote ID is different from what was previously set on the Opportunity.

Solution: Separate the Transaction

The solution is to separate the transaction that creates the Quote from the transaction that updates the Opportunity's SyncedQuoteId. When these operations occur in separate transactions, the sync detection logic correctly identifies the change and completes the sync.

Steps to Implement Using Salesforce Flow

  1. In your Salesforce Flow, create the Quote record in the first transaction (on the initial trigger event, such as Opportunity creation).
  2. Add a Scheduled Path configured to run "0 Hours after Record Created Date." This Scheduled Path creates a separate transaction boundary.
  3. In the Scheduled Path, add the action that updates the Opportunity's SyncedQuoteId to the created Quote ID.
  4. Because the Opportunity update now occurs in a separate transaction from the Quote creation, the sync logic correctly fires and Quote.IsSyncing is set to True.

As per the Document Flows in Transactions 
Flow's transaction ends when a pause element is executed.

The solution is to separate the transaction.

Create a Schedule Action as "after 0 hours of CreatedDate" in the Process Builder before calling the flow to separate the transaction.

How Does Salesforce Process Scheduled Actions?

Knowledge-artikelnummer

000391126

 
Wordt geladen
Salesforce Help | Article