Overview

MintJams Commerce is headless commerce running on the MintJams CMS (JCR). It integrates bidirectionally with Shopify and processes orders, refunds, inventory and products in an event-driven way. Processing is built from Camel EIP routes, Groovy endpoints and BPMN workflows.

Integration model

  • Inbound (Shopify → CMS): webhooks are HMAC-verified and routed by topic to dedicated workflows (orders/paid, products/create, refunds/create, inventory_levels/update, …); everything else is normalized as a generic entity
  • Outbound (CMS → Shopify): the Admin API writes back inventory, price, publish state and metafields (gated by adminApi.enabled)
  • Webhook receiver: /content/public/commerce/endpoints/shopify/webhook.groovy (public, HMAC-verified)

Data flow

Shopify event → webhook (HMAC verify)
  → direct:commerce-ingest (logged to the event log)
  → topic-specific route, or normalized as a generic entity
  → stored under /content/commerce/...
  → rules applied (thresholds, review, backorder detection, …)
  → tasks/notifications or batches → projections/caches
  → outbound (sync.groovy → Shopify Admin API)
  → audit trail /content/commerce/sync/

Where data lives (excerpt)

Path Contents
/content/commerce/orders/raw/{yyyy}/{MM}/order_{id}.json received orders
/content/commerce/refunds/raw/{yyyy}/{MM}/refund_{id}.json received refunds
/content/commerce/products/product_{id}.json product mirror + metadata + PIM overlay
/content/commerce/inventory/levels/{inventory_item_id}.json per-location stock
/content/commerce/events/{source}/{yyyy}/{MM}/{eventId}.json the event log
/content/commerce/entities/{source}/{collection}/{id}.json normalized entities
/content/commerce/sync/{yyyy}/{MM}/sync_{epochMs}.json outbound audit trail
/etc/commerce/config/*.yml configuration for each feature

Status

Content carries status on two axes:

  • commerce:status — the ingestion processing lifecycle (e.g. received / review_pending / approved / fulfilled / resolved / error)
  • commerce:source_status — a mirror of Shopify's business status (products: active/archived/draft; orders: financial_status plus partially_refunded/refunded)

Capability areas

  1. Catalog & PIM — product mirror and a CMS-authored overlay (multi-language, custom attributes, metafields)
  2. Inventory — multi-location, dynamic thresholds, sales velocity, stockout forecast, auto-reorder, backorders
  3. Orders & refunds — receipt, screening/review, fulfillment, refund recording, write-back
  4. Storefront — headless catalog publishing and editable landing pages
  5. Operations tools — dashboard, health monitor, notifications, reconciliation, reports, task SLA, CRM
  6. Integration & ingestion — event ingestion/replay and bidirectional sync

Admin endpoints (authenticated, excerpt)

health.groovy / tasks.groovy / forecast.groovy / events.groovy / sync.groovy / pim.groovy / reconcile.groovy / reports.groovy / crm.groovy / dashboard.groovy (all under /content/commerce/endpoints/, called via /bin/cms.cgi/<workspace>/...).