Bylink Tag Order Routing for Shopify
Sends Shopify orders with a given tag to a fixed Business Central customer, per ship-to country.
What it does
Each shop keeps a list of rules: order tag + ship-to country → customer. An order with one of those tags is sold to and billed to the rule's customer instead of the customer the connector would map. Use it for orders that belong to a fixed account, such as a partner shop or a wholesale channel, where the customer must be the country-specific one so that VAT and prices come out right. Nothing is sent to Shopify.
Setup
- On the Shopify Shop Card, Feature Flags part, switch on Shopify Tag Order Routing for the shop.
- In the Tag Routing Rules part, add one line per rule:
Field Value Shopify Tag The order tag. Stored in upper case; matching ignores case. Ship-to Country Code The two-letter ISO code as Shopify sends it, for example DK.Customer No. The customer the order goes to.
Whole tags only, no wildcards. Only tags on the order count, not product tags.
What happens
| Case | Result |
|---|---|
| One customer for the order's country | Sell-to and Bill-to Customer No. are set to the rule's customer. |
| No ship-to country, no rule for the country, or two different customers for it | The order is flagged with a
[Tag Routing] error and no sales document is created until the rules are fixed. Other orders carry on. |
| No routing tag on the order | Left to the Shopify Connector as usual. |
Routing runs again just before the sales document is created, so a rule added after import still applies.
Customer template conflict
A default customer for the same country in Shopify Customer Setup by Country/Region would overwrite the routed customer. The app refuses the document in that case, with an error that names the customer template. Remove one of the two.
For developers
Codeunit Shpfy Tag Routing BYL publishes OnBeforeRouteOrder(var OrderHeader; var Skip) to leave an order
to the connector, and OnAfterRouteOrder(var OrderHeader; CustomerNo) after an order was routed.
Permissions
Shpfy Tag Route BYL to maintain rules. Routing itself works for the sync user without it.
Known limits
- A tag removed in Shopify after the order was routed does not undo the route.
- An order that cannot be routed may still show a customer the connector mapped, but it gets no sales document.