ERP Integration
This guide walks through a complete ERP integration with Omnium — subscribing to order events, fetching orders, confirming receipt, syncing inventory, reporting shipments, and processing returns.
Prerequisites
Before starting, ensure you have:
- Access to Omnium: You need an active Omnium account with appropriate permissions
- API Credentials: You'll need a
ClientIdandClientSecretfor API authentication - Required API Roles: Your API user needs
OrderAdminandInventoryAdminroles
If you don't have access yet, follow our Get Access guide to request access and obtain your API credentials.
1. Subscribe to Order Events
The recommended integration pattern combines real-time event notifications with delta polling as a safety net. Start by setting up a webhook so Omnium pushes order events to your ERP as they happen.
Configure a Webhook Subscription
In the Omnium UI, navigate to Configuration > Event subscriptions and create a new subscription:
| Field | Value | Description |
|---|---|---|
| Name | ERP Order Sync | Human-readable name |
| Connector | Webhook | Delivery mechanism |
| Base URL | https://your-erp.example.com | Your ERP's base URL |
| Request URI | /api/webhooks/omnium-orders | Your webhook endpoint path |
| HTTP Verb | POST | HTTP method |
Add Filters
Apply filters to receive only the events your ERP cares about:
| Filter | Example Values | Purpose |
|---|---|---|
| Class Names | Order | Only order events |
| Categories | Created, Updated, Workflow | Event categories |
| Statuses | New, Completed, Returned | Only specific statuses |
| Stores | oslo-online | Limit to specific stores |
| Markets | nor | Limit to specific markets |
You can also add custom HTTP headers (e.g., an API key) for authenticating incoming webhooks on your side.
Webhook Payload
When an event matches your subscription filters, Omnium sends a POST request with this payload:
Important: The webhook payload contains event metadata only — not the full order. Use the objectId to fetch the complete order from the API (see step 2).
Alternative Delivery Mechanisms
Besides webhooks, Omnium supports:
- Azure Service Bus — queue/topic-based messaging
- Azure Storage Queue — simple queue-based delivery
- Apache Kafka — high-throughput streaming
- RabbitMQ — AMQP-based messaging
These are configured the same way via Event subscriptions, just with a different Connector value and connection details.
2. Fetch New Orders
When your webhook receives an event, call back to Omnium to get the full order data.
Get a Single Order
Fetch the order referenced in the webhook event:
Response (simplified):
Delta Polling (Safety Net)
Even with webhooks, use periodic delta polling to catch any missed events. Poll every few minutes using ModifiedFrom:
Response:
Key parameters:
- ModifiedFrom — inclusive (greater than or equal to) — returns orders modified since this timestamp
- SelectedStatuses — filter by status (e.g., only
Neworders not yet processed by ERP) - DisableFacets — set to
truefor better performance when you don't need facet counts - SortOrder — use
ModifiedAscendingfor chronological processing, orDocumentIDfor best performance - Take — max 100 per page. Use
Pageto paginate (maxTake * Page= 10,000)
Scroll API (Large Volumes)
If you need to process more than 10,000 orders (e.g., initial backfill), use the Scroll API:
The response includes a scrollId. Fetch subsequent batches of 1,000 orders:
Continue until the result array is empty.
3. Confirm Order Receipt
Once your ERP has received and validated an order, confirm receipt by updating its status. This is the primary ERP integration endpoint.
Update Order Status
Response:
This endpoint triggers the configured workflow for the target status — which may include sending customer notifications, capturing payments, reducing inventory, or exporting data. The response tells you what workflow actions ran and whether they succeeded.
Store Your ERP Reference
Use PatchOrder to store the ERP order number on the Omnium order for cross-referencing:
Response:
Note: PatchOrder does not run workflows — it directly updates the specified fields. Use it for storing references, adding custom properties, or making lightweight metadata updates without side effects.
You can later search for orders by their ERP external ID:
4. Sync Inventory from ERP
Most ERP integrations use the ERP (or WMS) as the source of truth for stock levels. The recommended approach is to push inventory updates to Omnium using UpdateMany.
Full Inventory Sync
Push current stock levels (e.g., nightly full sync):
Key behaviors of UpdateMany:
- Upsert — creates new inventory items or updates existing ones
- Preserves reserved inventory — by default,
reservedInventorymanaged by Omnium's order workflows is not overwritten (controlled byisReservedInventoryOverwritten=false, the default) - Change detection — items that haven't actually changed are skipped, making full syncs efficient
- Field preservation — fields like
cost,location, andminQuantityare preserved from the existing item if you send them as0or empty - Transaction logging — every actual change creates an inventory transaction record for auditing
Incremental Delta Updates
For real-time stock changes (e.g., goods receipt, manual adjustments), use delta transactions instead of absolute values:
Key fields:
- inventoryChange — the delta: positive for additions, negative for removals
- reason — logged in the transaction history for auditing
- orderId — optional link to a related order
- adjustReservedInventory — set to
trueif the delta should also adjust reserved inventory (rarely needed for ERP sync)
Query Current Stock Levels
Read inventory back from Omnium (e.g., to reconcile with ERP):
Delta query (only items changed since last sync):
For large result sets, the response includes a scrollId. Use GET /api/Inventory/Scroll/{scrollId} to fetch subsequent pages (2,000 items per batch).
5. Report Shipment and Fulfillment
When your ERP or WMS confirms that goods have been shipped, update Omnium with tracking information.
Simple Fulfillment (Single Shipment)
Mark the full order as shipped with tracking:
This triggers the configured workflow for the Completed status, which typically includes:
- Capturing the payment (if not already captured)
- Sending a shipping confirmation notification to the customer
- Reducing reserved inventory
- Exporting the order to downstream systems
Update with Detailed Shipment Info
Provide full shipment details from your WMS:
Note: The shipmentId references an existing shipment on the order. If the order has a single shipment (most common), shipmentId: "1" targets it. The warehouseCode on the shipment identifies where the order was shipped from, while the storeId on the order level identifies where it was sold.
6. Handle Partial Shipments
When only some items can be shipped (e.g., backorder or multi-warehouse fulfillment), use the OrderLinesUpdate endpoint.
Ship Some Items, Back-order the Rest
This delivers line item 1 on shipment 1 and leaves line item 2 undelivered. The order status automatically changes to PartiallyShipped.
Ship Remaining Items on a New Shipment
When the back-ordered items are ready, create a new shipment:
Note: When shipmentId references a shipment that doesn't exist yet, Omnium creates a new shipment automatically. When all shipments on an order reach Completed, the order-level status automatically updates to Completed.
Key fields in lineItemUpdates:
- lineItemId — the order line identifier (required)
- deliveredQuantity — quantity actually shipped
- canceledQuantity — quantity cancelled (won't be fulfilled)
- cost — cost price per unit (for profit tracking)
7. Process Returns
When a customer returns goods and the return is registered in the ERP, update Omnium accordingly.
Create a Return
Key fields:
- returns — list of line items being returned with quantities and reasons
- isStockUpdated —
trueto add the returned items back to inventory - creditPayment —
trueto trigger a refund to the original payment method (runs theCreditReturnworkflow step) - creditShipment —
trueto also refund the shipping cost - rmaNumber — your ERP's return merchandise authorization number (auto-generated if omitted)
- storeId — the warehouse receiving the returned goods
Update Return Status
Returns have their own status workflow (configurable per tenant). Advance the return through its lifecycle:
The returnId is returned in the response when you create the return. The return workflow may trigger actions like refund processing, inventory updates, customer notifications, and export to your ERP.
Search Returns (Delta Query)
Poll for recently modified returns:
8. Common Status Flows
Here are the most common order status transitions an ERP integration handles:
Standard Online Order
- Webhook notifies ERP of new order
- ERP confirms receipt →
UpdateStatustoInProgress - ERP ships goods →
UpdateStatustoCompleted(with tracking info)
Order with Warehouse Processing
Partial Shipment
- ERP ships some items →
OrderLinesUpdate(order becomesPartiallyShipped) - ERP ships remaining →
OrderLinesUpdate(order becomesCompleted)
Click & Collect
Cancellation
Return
9. Best Practices
Performance
- Use
DisableFacets: trueon all search requests — facet computation is expensive and not needed for ERP sync - Use
SortOrder: "DocumentID"if you don't need a specific sort — it's the fastest option - Batch operations are limited to 4 concurrent requests — process them sequentially
- Use the Scroll API for bulk retrieval (> 10,000 orders) instead of deep pagination
Reliability
- Combine webhooks with delta polling — webhooks for real-time, polling as a safety net to catch missed events
- Store the last successful
ModifiedFromtimestamp — use it as the starting point for the next polling cycle - Use
ModifiedFrom(POST Search) overchangedSince(GET) — the POST variant uses inclusive matching (>=) which is safer for delta sync - Implement exponential backoff for 429 (rate limit) responses
Data Integrity
- Never overwrite
reservedInventory— keep the defaultisReservedInventoryOverwritten=falseon UpdateMany - Use
PatchOrderfor metadata — storing ERP references via PatchOrder avoids triggering workflows - Use
ExternalIdsto link Omnium entities to your ERP records — enables bidirectional lookup
Monitoring
- Subscribe to error events — create a separate webhook subscription filtered to
isError: truefor alerting - Check the event log — in the UI under Configuration > Advanced > Events, or via
POST /api/EventLog/Search - Monitor subscription health — every subscription execution creates an event with operation ID
290100and a status ofSuccessorFailed
Next Steps
You've now set up a complete ERP integration with Omnium. Your integration covers:
✅ Real-time order notifications via webhooks ✅ Order fetching with delta queries and scroll ✅ Order status confirmation and workflow execution ✅ Inventory synchronization (full and incremental) ✅ Shipment reporting with tracking information ✅ Partial shipment handling ✅ Return and refund processing ✅ Cross-system reference tracking with ExternalIds
For more details on specific topics:
- Events & Webhooks — full event reference and subscription configuration
- Data Out — export patterns and delta query best practices
- Data In — batch import patterns
- Orders — complete order model and workflow documentation
- Inventory — inventory management deep dive
- Returns — return workflow configuration
