Shopify Order Fails to Create: PO Number Longer Than 35 Characters
The length of the string is 45, but it must be less than or equal to 35 characters.What It Means
A Shopify order (usually B2B or a draft order) has a purchase order number longer than 35 characters. Business Central cannot create the sales document. The Shopify order stays in error on the Shopify Orders page, and every retry fails with the same message. The number in the message (45 here) is the length of the PO number on that order.
Root Cause
The connector copies the Shopify order's PO Number into Sales Header "External Document No." (the documented mapping). In codeunit "Shpfy Process Order", CreateHeaderFromShopifyOrder runs SalesHeader.Validate("External Document No.", ShopifyOrderHeader."PO Number") with no truncation. "External Document No." is Code[35], so any PO number over 35 characters raises a runtime string-length error and the whole document creation rolls back. Issue #10243 reports this; the one-line CopyStr fix in PR #10305 was still open when checked (2026-11-16).
Step-by-Step Fix
- Search for 'Shopify Orders' and open the order where Has Error is selected. Confirm that the Error Message is the string-length error.
- On the Shopify Order card, check the 'PO Number' field. Count its characters. If it is longer than 35, this playbook applies.
- Shorten the PO Number to 35 characters or fewer (the issue reporter's workaround is to edit the PO number and reprocess). Keep the part your buyer quotes on invoices. Write the full value somewhere you can find it (for example a note on the sales order after it is created).
- Choose 'Create Sales Document' on the Shopify Order card (or select the order on 'Shopify Orders' and choose 'Create Sales Documents').
- Repeat for each blocked order. Tell the B2B buyer or your Shopify B2B setup to keep PO numbers at 35 characters or fewer until the connector fix ships.
- Permanent fix: track BCApps PR #10305 (truncates PO Number to the length of External Document No.). Until it ships, a partner extension can shorten 'PO Number' on the Shpfy Order Header before the sales document is created. Note: the connector's own order events (codeunit 30162 'Shpfy Order Events') are declared internal, so ask your partner which subscription point works in your version.
Verification Steps
Sources & References
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.