Order Splitting
Liferay DXP 7.4 U84+/GA84+
Order Splitting divides a customer order into separate orders that suppliers can fulfill independently. The order is split based on the catalog of the items. This process works in coordination with supplier roles, which give suppliers control over their catalogs, orders, and inventory, so suppliers can fulfill their assigned portion of the order.
Creating the Order Splitting Object Action
There are two ways to create the order splitting object action: manually, by creating the object action on the commerce order system object, or automatically by creating a pre-configured object action using the commerce health check.
Creating the Order Splitting Object Action Manually
-
Open the Global Menu (
) and navigate to Control Panel → Objects.
-
Select Commerce Order and click Actions.
-
Click Add (
):
Action Label: Split Order By Catalog
Action Name: splitOrderByCatalog
-
Use the Active toggle to enable the action.
-
Click on the Action Builder tab.
-
Under Trigger, choose On Order Status Update from the drop-down.
-
Under Condition, activate the toggle and enter the expression:
orderStatus = 10
Each order status corresponds to an integer. If you want to use a different order status, use any of the following integers:
Order Status Integer Value Open 2 In Progress 6 Pending 1 Processing 10 Shipped 15 Completed 0 Canceled 8 Partially Shipped 14 On Hold 20 Optionally, restrict order splitting to specific order types or channels:
orderTypeId = 12345 AND channelId = 67890 AND orderStatus = 10
This expression splits all orders from channel
67890
with the order type ID12345
when it moves to the processing status. -
Under Action, select Split Order by Catalog from the drop-down.
-
Click Save.
Creating the Order Splitting Object Action using the Health Check
-
Open the Global Menu (
) and navigate to Commerce → Health Check.
-
Find the Order Split by Catalog Action health check.
-
Click Fix Issue.
This creates the object action on the commerce order system object. The order splitting action is disabled when created through the health check. To activate it,
-
Open the (
) and navigate to Control Panel → Objects.
-
Select Commerce Order and click Actions.
-
You should see the object action created already. Select it and use the Active toggle to enable the action.
This enables order splitting for all orders that contain products from different catalogs.
Order Splitting Concepts
The following concepts explain how customer and supplier orders are managed during the order splitting process.
Customer Order
A customer order can contain products from multiple catalogs. When a customer places an order with items from different catalogs, it appears as a single entry in the Placed Orders page. The order is split only after it is accepted from the Orders page.
Supplier Order
-
Open the Global Menu (
) and navigate to Commerce → Orders. You can see a single entry for the customer order.
-
Select the order and click Accept Order. Now the object action on the commerce order object is executed.
-
Return to the Orders page, and you now see three entries: one for the customer order and two for the supplier orders, each linked to its respective channel.
Suppliers can only view and manage orders linked to their channels. If the original order had products from three different catalogs, there would be four entries: one customer order and three supplier orders.
The customer does not see the supplier orders in the Placed Orders page.
Splitting Order Level Discounts
When using the out-of-the-box order splitting rule, discounts are split between suppliers based on each supplier order’s percentage of the original order value. This applies to discounts on the order total and subtotal, while item-level discounts remain unchanged. See the illustration below:
In this example, a $100 order has a fixed discount of $10. The discount is split between two suppliers, A and B, with values of $25 and $75, respectively. Supplier A’s order, worth $25, receives 25% of the total discount, which is $2.50.
This percentage-based method applies only to fixed discounts. For percentage discounts, the percentage amounts are deducted from each supplier order—for example, a 10% discount is deducted individually from each supplier order.
Fulfilling Split Orders
From a customer perspective, there is no change in how information appears. Only administrators can view supplier orders from the Placed Orders screen after they’re split. Customers see only the original orders they placed, and suppliers only see their own supplier orders.
Updates to supplier orders are reflected in the corresponding item in the customer order. For example, if a supplier ships an order and updates its tracking number, that update appears in the customer’s order. The status moves from Processing to Partially Shipped and is updated to Completed once all supplier orders are delivered.
Feature Availability
Order Splitting
Liferay Version | Feature Status | Feature Flag Label |
---|---|---|
Liferay DXP 7.4 U84/GA84 | Release | COMMERCE-11025 |
Liferay DXP 2024.Q1/Portal GA112 | GA | - |