Sending POS purchase history to Shopify

Send POS purchases from Business Central to Shopify as orders, giving customers a unified purchase history across physical stores and the online store.

When the POS purchase history sync is enabled, NP Retail sends posted POS sales transactions to Shopify as actual orders, created through a dedicated NPRetailPOS sales channel. Because the transactions become native Shopify orders, they immediately appear on the customer’s account page in the online store and work with third-party Shopify apps, for example, email marketing and product recommendation tools.

Prerequisites

  • Business Central version 21 or later. The functionality is not available on earlier versions.
  • NP Retail v.105 or later.
  • The Shopify integration must be set up and enabled, including the sales order integration, for the relevant Shopify store.
  • The customer sync between Business Central and Shopify must be in place. POS transactions are only sent for customers that are synchronized with the Shopify store.

How it works

  • Only POS entries posted with a customer number are considered, and only if that customer is synchronized with the Shopify store.
  • Eligible entries are direct sales and credit sales with a positive amount. System entries are skipped.
  • Once the sync is enabled, the system records the most recent POS entry, and a recurring background job (Schedule POS Entry export to Shopify) picks up POS entries created from this point onwards and sends them to Shopify.
  • Each POS entry is created in Shopify as a fulfilled and paid order named POS-<entry number>, associated with the customer’s Shopify account. The order carries the source name NPRetailPOS, a source identifier referencing the POS entry, and a link back to the POS entry in Business Central.
  • The POS payment lines are sent as Shopify order transactions, grouped by POS payment method, with the payment gateway reported as NPRetail.POS.<payment method code>.
  • The order creation bypasses Shopify inventory, and no order or fulfillment confirmation emails are sent to the customer.
  • Orders created through the NPRetailPOS sales channel are automatically excluded from the Shopify order import to Business Central, so the same sale is never processed twice.

Setting it up

The setup is done on the Shopify Store card page, in the POS Customer Transactions section:

  1. Enable Send POS Customer Purchases to activate the sync for the store. This also schedules the recurring background job that exports new POS entries.
  2. Review the Histor. POS Trans. Cut-Off Date field. It specifies the earliest date from which customer POS transactions are synchronized with Shopify. POS transactions created before this date are permanently excluded from synchronization. When you enable the sync, the field is automatically prefilled with the first day of the calendar year two years back, but you can change it.
  3. Optionally enable Auto-Send Historical POS Trans. With this option on, the system automatically schedules the sending of a customer’s historical POS transactions (respecting the cut-off date) as soon as the customer account has been created on Shopify. If the option is disabled, historical transactions must be sent manually.

Sending historical POS transactions manually

As part of the initial setup, you can send POS entries that were posted before the sync was enabled:

  1. Open the Shopify Store Card page for the relevant store.
  2. Run the Export Cust. POS Sales action. The batch job iterates through customers and their existing POS entries in Business Central and creates transaction export requests for Shopify. You can filter the batch job to specific customers.

Only entries on or after the Histor. POS Trans. Cut-Off Date are included, and entries that have already been sent to Shopify are skipped, so the batch job can safely be rerun.

Verifying the sync

On the POS Entry Card page, the Synced with Shopify field shows whether the entry has been exported, and the Shopify actions let you view the Shopify order ID assigned to the entry per store.

Limitations

  • Returns are not supported yet. Shopify requires a return to be applied to a specific earlier order, while the POS allows returns without referencing the original sale, so there is not always an order to link the return to. POS entries with a negative or zero amount are therefore not sent to Shopify. Return transaction support is planned for a future release.
  • Zero-quantity lines are skipped. Shopify does not support order lines with a quantity of zero, so such lines, for example, comment lines, are not included in the Shopify order.
  • Fractional quantities are rounded. Shopify only supports whole-number quantities, so fractional quantities are rounded up to the next whole number.
  • The Shopify order creation date cannot be backdated. Shopify always sets the order’s creation date to the moment the order is imported, which affects how orders are sorted on the customer’s account page by default. The actual POS transaction date and time are sent in the Shopify processed at and closed at fields, so a Liquid-based theme can be adjusted to sort and display orders by the processed date instead.
  • Shopify order management cannot be disabled for the imported orders. Options such as edit, refund, and return remain available on the orders in the Shopify admin. Changes made to these orders in Shopify are not synchronized back to Business Central, so the POS transactions should continue to be managed in Business Central.