Workflows
Overview of Omnium workflow system with examples of order processing workflows for different order types.
Omnium Workflows
Workflows are automated sequences of steps that run when orders change status. Think of them as your order's to-do list that gets executed automatically.
Note: The configurations shown here are examples. Your actual setup will likely be different - it might be less complex or it might be more complicated.
Workflow Architecture
Each workflow step has the following properties:
- name: The specific workflow step to execute
- active: Whether the step is enabled
- runAfterOrderIsSaved: When the step executes (before/after order persistence)
- stopOnError: Whether to halt workflow if this step fails
- isInvisible: Whether the step appears in the UI
- Conditional execution: Steps can be excluded/included for specific criteria:
- Markets: Based on market configuration
- Stores: Based on storeId on the order
- Warehouses: Based on warehouseCode on the order
- Shipment Options: Based on shipment delivery type (pickup/delivery)
- Tags: Based on tags defined on the order
Example: BikeSport Happy Flow
This example shows the Omnium BikeSport Online order type "happy flow" - where everything goes smoothly without cancellations, returns, or other complications. The "Online" order type handles usually standard e-commerce scenarios - orders placed online that are fulfilled either from a central warehouse or directly from a store.
Status: New (14 workflow steps)
When an online order is created:
- TryReallocateToOtherWarehouse - Attempts to find alternative warehouse inventory if primary warehouse lacks stock
- ProductPackageBreakDown - Breaks down bundled products into individual components for fulfillment
- TransferReplacementOrderPayment (invisible) - Transfers payment from original order to replacement orders (only executes for orders with
IsReplacementOrderproperty set) - CheckAndUpdateCouponUsage - Validates and marks coupons as used to prevent double redemption
- UpdateOrderLineReservedInventory - Updates inventory reservations at the line level
- EnrichOrderFromProducts - Adds product details, weights, dimensions from product catalog
- TrySplitUnreservedOrderLinesToNewShipment - Splits unreserved order lines to a separate shipment for allocation (calls the distribution business service to split order lines without reservation if possible)
- Notification - Sends notifications (email/SMS) based on order status (calls the notification service to verify and enqueue order notifications)
- IncreaseReservedInventory - Increases reserved inventory for order lines (calls the inventory service to reserve inventory, skipping virtual warehouses and virtual products)
- EnrichShipmentLabel - Enriches shipping label information from shipping options (calls the order enrichment service to add shipment information)
- SetAuthorizationExpires (invisible) - Sets payment authorization expiration timeframe
- GetOrCreateCustomerFromOrder - Creates or updates customer record
- CustomerClubCalculateNewPointsOnHold (invisible) - Calculates loyalty points (held pending completion)
- CalculateAtp (runs after save) - Recalculates Available-to-Promise inventory levels
Status: InProgress (2 workflow steps)
When order moves to processing:
- Notification - Sends notifications that order is being prepared
- UpdateShipmentStatus - Updates shipment status (calls the shipping service to update status for specific shipment or all shipments in order)
Status: Ship (11 workflow steps)
When order is shipped to customer:
- UpdateShipmentStatus - Updates shipment to "Released"
- CapturePayments - Charges the customer's payment method
- ReduceInventoryAndReservedInventory - Removes items from available inventory
- CompleteShipment - Marks shipment as completed in carrier system
- Notification - Sends shipping confirmation notifications with tracking info
- RemoveAuthorizationExpires (invisible) - Removes payment auth expiration
- TryReleaseRemainingAuth (invisible) - Releases any unused payment authorization
- SetCompletedDate - Records order completion timestamp
- CustomerClubMoveFromOnHoldToEarnedPoints (invisible) - Converts held points to earned points
- CustomerClubCancelNewPointsOnHold (invisible) - Cleans up temporary point calculations
- CustomerClubCalculateAndUpateTierForMember (invisible, runs after save) - Updates customer loyalty tier
