ml-connector
PlexShopify

Plex and Shopify integration

Plex runs manufacturing and ERP. Shopify runs e-commerce. Connecting the two keeps your order fulfillment, inventory, and financial records aligned. Sales orders created in Shopify flow into Plex production planning, revenue journals post into Plex's general ledger after each transaction, and inventory movements in Plex stay synchronized with Shopify product quantities. ml-connector bridges the very different APIs on each side and moves the data as events occur.

How Plex works

Plex Adaptive ERP exposes suppliers, purchase orders, invoices, customers, sales orders, inventory, and GL accounts through a REST JSON API at https://cloud.plex.com/api, authenticated via OAuth 2.0 client credentials with Bearer tokens. The platform is cloud-native and tenant-scoped, so integration uses a dedicated OAuth credential pair per Plex instance. Plex does not offer native webhooks, so historical data and configuration tables are read by polling on a configurable interval (5-15 minutes recommended) filtering by modified_date or created_date. Role-based permissions are enforced at the API level, so the integration user must have the correct Plex role assigned or calls will return 403 or empty results.

How Shopify works

Shopify exposes orders, customers, transactions, fulfillments, refunds, and inventory through the Admin API available in both GraphQL and REST (GraphQL preferred). Authentication uses OAuth 2.0 Authorization Code Grant with long-lived offline tokens prefixed shpat_. Shopify publishes events via webhooks on topics including orders/create, orders/updated, orders/paid, draft_orders/create, customers/create, and inventory_levels/update. Webhook deduplication uses the X-Shopify-Webhook-Id header. Shopify Advanced and Plus plans unlock the Companies entity and additional rate limits, but basic orders and fulfillment data is available on all tiers.

What moves between them

The main flow is Shopify into Plex. When a customer creates an order in Shopify, ml-connector receives a webhook event, creates a corresponding sales order in Plex if it does not already exist, and records the order line items with proper mapping to Plex customer and part records. After payment clears, ml-connector posts the revenue GL journal into Plex's general ledger, allocated to the Shopify channel and the correct product GL account. Fulfillment events flow the same direction, updating the Plex sales order fulfillment status. Inventory is synchronized in both directions: Plex inventory transactions update Shopify inventory levels so the storefront shows accurate stock, and Shopify fulfillments decrement Plex inventory to match what was shipped. Refunds in Shopify trigger refund transactions in Plex and reverse the corresponding revenue GL posting.

How ml-connector handles it

ml-connector stores both credential sets encrypted and presents the Shopify offline OAuth token on every REST or GraphQL call. On the Plex side it accepts the full tenant URL from the customer's Plex instance, exchanges the OAuth 2.0 client credentials for a Bearer token, and validates every sales order and GL account against that instance. Shopify publishes orders and fulfillment events via webhooks, so ml-connector listens on a registered endpoint and verifies the signature using the shared Shopify API key before processing. Since Plex has no native webhooks, inventory updates flow through scheduled polling to detect changes in Plex inventory and push quantity changes back to Shopify every 10 minutes. Product-to-part mapping is pre-configured so Shopify product SKUs match Plex part numbers exactly, and GL account mapping is established so revenue journals always post to a valid Plex GL account for the e-commerce channel. Shopify rate limits apply per API call, so ml-connector implements exponential backoff on 429 responses. Every order, transaction, and inventory movement carries a full audit trail and can be replayed if a downstream GL posting or fulfillment update fails.

A real-world example

A mid-sized discrete manufacturer runs Plex ERP for production, procurement, and finance, and uses Shopify Plus to operate a direct-to-customer e-commerce storefront. Before the integration, the e-commerce operations team manually exported daily orders from Shopify, re-entered them into Plex as sales orders by hand, and struggled to keep Shopify inventory in sync with factory stock-outs and rework. The finance team posted daily revenue summaries from Shopify transaction reports into Plex's general ledger once a week during month-end close. With Plex and Shopify connected, each Shopify order becomes a Plex sales order immediately, triggering manufacturing and fulfillment scheduling. Revenue posts into the ledger on each transaction, the month-end close revenue is already reconciled, and inventory syncs in real-time so overselling stops and customer experience improves.

What you can do

  • Receive Shopify orders and fulfillments via webhooks and create matching sales orders in Plex with the correct customer and part mapping.
  • Post Shopify transaction revenue into Plex's general ledger after each payment, allocated to the e-commerce channel GL account.
  • Synchronize Plex inventory with Shopify inventory levels every 10 minutes so the storefront reflects factory stock.
  • Map Shopify refunds and cancellations back into Plex as invoice credits and sales order reversals with full GL impact.
  • Authenticate Shopify with OAuth 2.0 offline tokens and Plex with OAuth 2.0 client credentials, with retries and a full audit trail on every record.

Questions

Does ml-connector support Shopify Draft Orders for pre-sales?
Yes. Draft Orders are available on all Shopify tiers and are treated the same as regular orders in the integration. ml-connector receives draft_orders/create and draft_orders/update webhooks and can sync draft orders into Plex as preliminary sales orders so your sales team can coordinate pricing and availability before the customer converts the draft to a real order.
What if Shopify and Plex inventory quantities get out of sync?
ml-connector polls Plex inventory every 10 minutes to detect quantity changes and pushes them to Shopify. If a manual adjustment happens in either system, the next polling cycle brings them back into agreement. A full audit trail is maintained so you can trace where discrepancies came from and replay corrections if needed.
How does ml-connector handle refunds and partial fulfillments?
Shopify publishes refunds/create and fulfillments/update webhooks. ml-connector creates refund transactions in Plex that reverse the original revenue GL posting, and updates the Plex sales order fulfillment status to track partial shipments. Both events are audited, so month-end close can verify that GL refund credits match the actual Shopify refunds.

Related integrations

Connect Plex and Shopify

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started