Sage X3 and Shopify integration
Sage X3 runs the back-office finance and inventory for a distributor or manufacturer. Shopify runs the online storefront. Connecting the two keeps your order and inventory records synchronized across both systems without manual re-keying. New orders placed on Shopify feed into Sage X3 as sales invoices, inventory levels from X3 update Shopify product stock, and fulfillment changes on Shopify close out the corresponding X3 shipments. ml-connector handles the different APIs and authentication models on each side and moves the data on a schedule you control.
What moves between them
The main flow runs from Shopify into Sage X3. As orders are created and updated in Shopify, ml-connector polls for changes and writes corresponding sales invoices into X3's sales invoice entity, mapped to the X3 customer record and GL sales accounts. Inventory levels are synced in both directions: X3 inventory receipts and shipments update Shopify product stock levels, and Shopify fulfillment events trigger inventory shipment records in X3. Order status changes on Shopify (paid, shipped, cancelled) update the X3 sales invoice status so the GL reflects the true order state.
How ml-connector handles it
ml-connector stores the Shopify OAuth2 token encrypted and uses it to query the GraphQL Admin API at the Shopify tenant URL, which is per-store and provided by the customer. On the Sage X3 side, it accepts the customer's server URL, port, and X3 folder name (since X3 publishes no central registry), and manages the 5-minute access token expiry by requesting a new bearer token before each call. Because X3 has no push webhooks, ml-connector polls the Shopify orders endpoint for changes using the modifiedAt field and writes matching X3 sales invoices, looking up the X3 customer ID by matching the Shopify customer email to X3 customer master records. GL account mapping is configured per customer because X3 analytical dimensions vary by site configuration, and ml-connector validates that the GL accounts and cost centers exist before posting. Shopify rate limits are handled with exponential backoff, and every record carries a full audit trail so failed GL postings can be replayed once the configuration is corrected.
A real-world example
A mid-sized electronics distributor runs Sage X3 on-premise for inventory, procurement, and finance, and uses Shopify to sell directly to customers through an online store. Before the integration, the order fulfillment team packed orders in Shopify and emailed a CSV of shipments to the finance team, who manually entered the line items into X3 sales invoices and posted the GL journals by hand each morning. Inventory counts were also reconciled manually once a week. With Shopify and X3 connected, each Shopify order automatically creates a sales invoice in X3 assigned to the matching customer and GL account, inventory movements from X3 sync back to Shopify product levels in real-time so the storefront never oversells, and fulfillment updates in Shopify automatically close out the X3 invoice and post the cost of goods sold. The manual entry step is eliminated and inventory is always current.
What you can do
- Map Shopify orders to Sage X3 sales invoices with automatic customer lookup and GL account posting.
- Sync inventory levels from X3 receipt and shipment transactions back to Shopify product stock.
- Authenticate with Shopify OAuth2 offline tokens and Sage X3 OAuth2 or HTTP Basic, managing X3 token expiry and refresh.
- Poll Shopify for order changes and detect X3 inventory movements by querying the updatedDate fields on every sync cycle.
- Audit every order and inventory transaction with a full record trail, allowing manual replay if a GL posting fails.
Questions
- How does the integration find the correct Sage X3 customer for a Shopify order?
- ml-connector matches the Shopify customer email to the X3 customer master record using the email field in X3 customer entities. If no match is found, the order is logged as a failed record and flagged for manual review so the customer can be created in X3 before replay.
- How does ml-connector handle Sage X3 token expiry and Shopify's webhook alternatives to polling?
- X3 access tokens expire after 5 minutes, so ml-connector requests a fresh bearer token before each call using the refresh token, which is valid for 30 days. Sage X3 does not support webhooks, so ml-connector polls the Shopify orders and inventory endpoints on a schedule you configure, using the modifiedAt field to detect changes since the last run.
- What GL accounts does ml-connector post to in Sage X3?
- GL account mapping is configured per customer because X3 analytical dimensions vary by site. ml-connector validates that the configured GL accounts exist in the X3 instance before posting any journal, and logs the full GL entry (account, cost center, amount) in the audit trail so you can verify the allocation.
Related integrations
More Sage X3 integrations
Other systems that connect to Shopify
Connect Sage X3 and Shopify
Free to use. Add your credentials, ping your real systems, and see if we fit.
Get started