Bylink

Bylink Order Sync for Shopify

Keeps Business Central sales orders in step with Shopify when an order is cancelled or edited.

What it does

Setup per shop

  1. Shopify custom app scopes: read_orders, write_orders. Admin API credentials set up (see Getting started).
  2. Create an order metafield definition in Shopify for the sync status, and the matching row in Shopify Metafield Definitions (owner type Order, Enabled).
  3. Shopify Shop Card, group Order Sync: choose it in Sync Error Metafield Key. The card shows a notification while reporting is not configured.
  4. Set Edit Notify Email to receive an e-mail for blocked edits. Leave it blank for no e-mail. An e-mail account must be set up for the Default scenario.
  5. Optional: Address Read Tag. When set, the shipping address is read again only for orders with that tag.
  6. Switch on Shopify Order Cancellation and Shopify Order Edit Sync in the Feature Flags part.
  7. After switching on edit sync, run Store Order Edit Baselines on the Shop Card once, so that open orders created earlier are compared from then on.
  8. Before switching on cancellation, look for orders that are already cancelled in Shopify but still have a sales order. They will be cancelled the next time they are imported.

Blockers

A blocked order is not changed. The reason is one sentence.

You see the blocker on the Shopify Orders list and card (Cancel Blocker, Edit Pending, Edit Blocker), in the order metafield in Shopify, and for edits in the notification e-mail. The full Business Central error text stays in Business Central; Shopify and the e-mail get a fixed text.

Failed rebuild

The order stays Edit Pending and is tried again at every sync. If the shipping address cannot be read from Shopify, the order is held and read again at the next sync; a 401 or 403 from Shopify is logged as an error, so check the credentials.

Job queue

Give the job queue entry for Sync Orders from Shopify and the cancellation entries the same Job Queue Category Code, so they do not run at the same time. A user who cannot schedule tasks (for example a delegated admin) leaves the cancellation entry On Hold; run Process Cancellation from the Shopify Order card instead.

Permissions

Shpfy Order Sync BYL for the user who runs the sync and the job queue entries. Shpfy Admin API BYL for whoever sets up the shop.

Go-live check

In a sandbox, edit one order in Shopify (address and a quantity), run Sync Orders from Shopify, and check that the sales order was rebuilt under the same number. Then cancel one order in Shopify, sync, and check that the sales order is gone.