Shopify Sync Fails: The Sales Header Does Not Exist (Document Type='Quote', No.=Your Shop)
The Sales Header does not exist. Identification fields and values: Document Type='Quote',No.='YOUR SHOPIFY STORE'What It Means
Adding items to Shopify or syncing products or prices stops with this error. No quote with your shop's code exists in Business Central, and none is supposed to: the connector builds a temporary quote in memory to calculate prices. Another extension tried to read it from the database and failed.
Root Cause
To calculate Shopify prices, the connector creates a temporary Sales Header of type Quote whose 'No.' is the Shop Code, plus a temporary Sales Line, and runs the standard price calculation (codeunit 'Shpfy Product Price Calc.', CreateTempSalesHeader). Validating the line fires Base App events. If a partner extension subscribes to those events and reads the Sales Header from the database without checking whether the record is temporary, the Get fails with this error. Microsoft Learn names this as a known issue and points to partner extensions that do not use IsTemporary.
Step-by-Step Fix
- Turn off 'Run Syncs in Background' on the Shopify Shop Card and run the failing action again, so the error opens in a dialog.
- Choose the 'Copy details' / 'Copy information to clipboard' link and paste it into a text editor. Find the AL call stack.
- Read the call stack from the top. The first line that is not 'by Microsoft' names the extension and publisher that failed (Microsoft's example shows 'Sales Line ... No. - OnValidate' called from 'Shpfy Product Price Calc.').
- Send the call stack to that extension's provider. Ask them to skip their logic for temporary records (Rec.IsTemporary) in the subscriber that reads the Sales Header.
- Until they ship a fix, ask your partner whether that extension's feature can be turned off for the Shopify company, or run the price/product sync from a company or environment without it.
- After the fix is installed, run 'Sync Products' or 'Add Items' again.
Verification Steps
Sources & References
- https://learn.microsoft.com/en-us/dynamics365/business-central/shopify/troubleshoot
- https://github.com/microsoft/BCApps/blob/e48e2d94b13dc61a88b9a1811732ca4fbc36e6c2/src/Apps/W1/Shopify/App/src/Products/Codeunits/ShpfyProductPriceCalc.Codeunit.al#L107-L113
- https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-istemporary-method
Early Access · 30-Day Sandbox Pilot
Stop Order Sync Failures Before Customers Notice
The Order Flow Doctor monitors Microsoft Dynamics 365 Business Central order flows across Shopify, EDI (TrueCommerce, SPS), 3PLs, and carriers. Get automated root-cause diagnosis and one-click fixes.