Module, not a second system
Commerce runs inside PIM Gate and reuses its tenants, roles, licences, encrypted secrets and e-mail. A super-admin enables it per tenant; when it is off, no commerce screen, API or widget answers for that tenant.
PIM Gate Commerce is a headless commerce module on top of the product data in PIM Gate. It adds customer-specific prices, stock, company accounts, carts, a configurable checkout, payments and the order handover to your ERP, and serves all of it to your website, a hosted storefront or your own front end through one Storefront API.
MS-12011 · Pressure transmitter 0–10 bar
If the ERP does not answer within 2 seconds, the last cached customer price (at most 24 hours old) is used and marked as such.
The price simulator's trace for one SKU and one buyer. Fictional data.
01 · What it is
PIM Gate already holds your validated, translated product data. The commerce module adds everything a B2B shop needs next to the product and keeps every external system behind an exchangeable adapter: prices, stock and orders from the ERP, payments from a provider, documents from a DMS. Front ends read one Storefront API; nothing in the browser talks to the ERP or the payment provider's server API directly.
Commerce runs inside PIM Gate and reuses its tenants, roles, licences, encrypted secrets and e-mail. A super-admin enables it per tenant; when it is off, no commerce screen, API or widget answers for that tenant.
One tenant runs several shops on one data basis. Each shop selects its products from the PIM by category, filter or by hand and has its own currencies, languages, prices, checkout and payment rules.
Every function exists in the Storefront API or the Admin API before it appears in a screen or widget. Both are described in OpenAPI 3.1 and are the only way front ends talk to the module.
02 · B2B features
The functions below are implemented in the module and covered by automated tests against PostgreSQL. They are configured per tenant and per shop in the back office.
Live customer price from the ERP, own prices per company, group prices and rules, quantity tiers and scheduled prices. One resolver answers every price question, and the price simulator shows its trace.
Explicit price lists per currency or derived prices from a base currency with exchange rate, markup and price endings. Net or gross display per shop and customer group, tax per region.
Stock per warehouse, available-to-promise from the ERP where it offers it, reservations during checkout and allocation at order placement.
Companies with members, invitations by e-mail or file, admin and buyer roles, address books and a sales contact. New companies apply online; VAT ids are checked before the back office accepts them.
Orders above a company's threshold wait for an admin's approval before they reach the ERP. Credit limit, payment terms and the invoice flag come from the ERP; above the limit invoice is blocked or the order is held.
Several named carts per account, carts shared with colleagues, a reference per line, quick order by SKU or by CSV and XLSX file, reorder from history and named shopping lists.
A checkout is a workflow of steps: identify, addresses, B2B details such as PO number and requested delivery date, shipping, payment, credit check, review and confirm. The review always re-validates prices and stock.
Catalog and cart discounts by product, category, quantity or cart value, per customer group and shop, with codes, usage limits and bulk generation. Shops where the ERP calculates discounts skip them, so nothing is discounted twice.
Orders with separate payment, shipment and ERP status, cancellation with refund and stock restore, partial refunds, returns with receipt and restock, CSV export.
Order confirmations, delivery notes, invoices and certificates from the ERP or a DMS, streamed through PIM Gate to the company they belong to and never stored on the way.
Order, shipment, approval, invitation and account e-mails with default templates in German, English, French and Italian, editable per shop.
Shops with their own number ranges, legal documents in versions, domains and SEO settings. Customer accounts exist once per tenant and are enabled per shop.
03 · An order, end to end
A buyer at a company customer of the fictional tenant MESSARA reorders pressure transmitters. The sequence follows what the module does at each step: the price comes from the ERP, the cart is validated on every change, the review re-checks prices live, the order is handed over to the ERP and its status and documents come back.
Illustrative scenario · fictional data
Order MS-26-001042
ShippedDelivery, tracking and documents flow back from the ERP. The buyer and the company's admins see them in the account area.
04 · Front ends
The module is headless. Your website keeps its pages, login and SEO; PIM Gate supplies product tiles, offers, cart, checkout and the account area. Four ways in, all on the same API and the same rules.
// one script, then tags<script type="module" src="https://messara.pimgate.ai/widgets/v1/pg.js"></script><pg-shop token="pgs_…" lang="de" currency="CHF"> <pg-buy-box sku="MS-12011"></pg-buy-box> <pg-mini-cart></pg-mini-cart></pg-shop>The Commerce section of PIM Gate holds everything a shop operator needs, with its own permissions per area and shop. Each change is written to the append-only audit log.
06 · Connectors
Every external system is an adapter behind a port: price, stock, customer, order, documents, payment, shipping, tax, e-mail and identity. A tenant combines them — prices from SAP, documents from a DMS, payment through Mollie.
What the states mean
Marketplace and Google Merchant Center feeds
Designed for in the data model, not implemented.
SAML sign-in
Planned for a later release; OpenID Connect is available.
Carrier label and rate APIs
Shipping uses rate rules and tracking links today.
Requests for quotation
There is no B2B quote request workflow; carts can be shared with colleagues.
External search engines
Search runs in PostgreSQL; no adapter for a separate search service.
07 · Architecture
Each ERP capability is a separate port, so an adapter implements only what its system offers and publishes what it can do. Data arrives live at request time, by scheduled sync with a cursor, or pushed by the ERP. When a system is slow or down, the module falls back in a defined way and says so.
Live calls for customer prices and availability, scheduled sync with a cursor for replicated data, or push from the ERP through the Admin API and signed inbound hooks.
Orders reach the ERP from a transactional event outbox. Every message is stored with status, attempts and payload; failures are retried, raise an alert and can be retried by hand.
After repeated timeouts a connection is short-circuited for a cool-down and probed with a single request before it closes again. Price and stock reads fall back while it is open.
Prices are frozen when the order is placed. If the review finds a changed price or stock level, the buyer sees the difference and must accept it.
| Behaviour | Default |
|---|---|
| Timeout of an ERP call | 2 s, configurable per connection |
| Fallback when the ERP does not answer | last cached customer price, at most 24 h old, marked |
| Circuit opens after | 5 timeouts within 30 s |
| Circuit stays open | 30 s, then one probe |
| Review step | always re-validates against the live ERP |
| Money | integers in minor units, ISO currency |
08 · Security and performance
Commerce uses the same isolation as the rest of PIM Gate and adds a shop boundary. These are the mechanisms in the code.
Every commerce table carries the tenant and, where shop-specific, the shop. PostgreSQL row-level security enforces both on every request of the Storefront API.
Shop tokens are stored only as SHA-256 hashes. Customer access tokens are signed and live 15 minutes. Inbound ERP hooks are signed with HMAC and rejected after 300 seconds.
Writes carry idempotency keys, so a retried order never creates a second one. Changes in the back office go to the append-only audit log.
Export of a customer's data as JSON and erasure by anonymisation; orders are kept for the retention period with personal fields reduced to what tax law requires.
The Storefront API is designed for a p95 below 300 ms when served from cache.
EU / CH hostingGDPRrevDSGTenant isolationAppend-only audit
09 · How a project starts
The module is built; what each project adds is the connection to your systems and the configuration of your shops. We start on a test tenant and move to production only when orders arrive correctly in your ERP.
Shops, markets, currencies, customer groups, front end, ERP and payment provider. We show which adapters are ready and what is set up for your project.
Commerce is enabled for your tenant, the first shop selects its products from the PIM and gets its currencies, tax regions and checkout workflow.
Connections with encrypted secrets and a connection test; the ERP mapping — sales organisation, plants, payment terms, tax codes — is agreed in a workshop with your ERP team.
Storefront preview as real customers, the price simulator against the ERP's test system, and test orders through the whole handover.
The shop goes live; the ERP message log, connection health and alerts show what is moving and what needs attention.
10 · FAQ
Tell us about your shops, your ERP and your payment setup; we will answer with what is ready for it and how your shop would start.
// ENQUIRY
Pricing will be published in Q1 2027.
Product and website translation with agencies, AI and review rounds — the languages your shops sell in.
Maintain product data where your PIM does not reach, or run it as your PIM.
PIM sources, delivery channels and systems PIM Gate connects.
Customer, sales and supplier portals on the same product data.
Put a gate between your catalog and chaos.