Skip to main content

Shopify®

The module connects Business Central to a Shopify® online store through document exchange. Paid Shopify orders are downloaded automatically and turned into sales Store Documents of the linked store, with item lines, shipping charges, payments and any refunds. The number of the document created in Business Central is then written back to the order in Shopify.

  1. Open the Document Exchange Profiles page.
  2. Create (or select) a profile with Exchange Format and Exchange Transport set to Shopify.
  3. Use the profile's Setup action to open the Shopify Setup page for that profile.
Field Description
Profile Code Document exchange profile the setup belongs to (read-only).
Store URL Address of the Shopify store. Required.
Client ID Client identifier of the Shopify app used for the connection.
Client Secret Secret key of the Shopify app. It is stored securely and shown masked; changing it forces a new authentication on next use.
Exchange Reference Code Optional exchange reference that maps a Shopify product name to a Business Central item or G/L account.
Store No. Business Central store in which documents are created. The store must have a customer (with a VAT business posting group) and a linked location.
Order Starting Date Only payments and refunds made on or after this date are imported.
Last Order Check Date/time of the last order update read from Shopify. Must be filled in before the first download and is updated automatically.
Fixed Payment Method Code Payment method used for all imported payments and refunds.
Shipping Account No. G/L account for shipping charges.
Shipping VAT Posting Group VAT product posting group for shipping charges.
Refund Account No. G/L account for refunds.
Refund VAT Posting Group VAT product posting group for refunds.

After entering the connection data, run Initialize APP (with confirmation). The action prepares the Shopify store by creating, if it does not already exist, the custom order field in which Business Central writes the number of the created document.

  1. Create a custom app in Shopify and note its client ID and client secret.
  2. Create the document exchange profile with Shopify format and transport and open its Setup.
  3. Fill in Store URL, Client ID and Client Secret.
  4. Enter Store No., Order Starting Date, Last Order Check and Fixed Payment Method Code.
  5. Enter the accounts and VAT groups for shipping and refunds.
  6. Run Initialize APP.

The download process reads from Shopify all orders updated after Last Order Check. For each order a queued entry with the message "Order <no.> downloaded" is created in the Document Exchange Log and then processed. Last Order Check moves forward as orders are read. The number of the order being processed is shown during the operation.

Only paid, partially refunded or refunded orders are considered.

  • Sale: at the date of the first successful payment (if not earlier than Order Starting Date) a sales store document is created, with:

    • the customer's store contact, found by e-mail or created with first name, last name, address and e-mail;
    • one line per product, with quantity and discounted amount. The item is identified, in this order, through the exchange reference (product name), the barcode in item references, or an item number equal to the barcode. An unrecognized product with an amount stops processing with the message "Unknown: "; unrecognized zero-amount lines remain as comments;
    • a Shipping line on the shipping account, if there is a shipping cost;
    • payment lines (described with the Shopify payment gateway) and, if needed, a balancing line for any difference from the total.

    The document is closed automatically and its number is written to the Shopify order.

  • Refunds: for each successful refund (not earlier than Order Starting Date) a separate store document is created with a negative Refund line on the refund account and the matching negative payment; this document is also closed automatically.

Orders and refunds already imported are not created again. At the end, the queued entry is replaced by a completed entry linked to the created store document.