Bundles
A bundle is an offering of several products for sale as one combined product. Order Management System (OMS) bundles are an implementation that defines which order lines pertain to a bundle, which will prevent the sourcing engine from splitting the defined lines as part of the bundle. This solution guarantees that a bundle results in a single shipment.
Bundles process
Order lines, which are imported as part of a bundle, are highlighted in the OMS. Each order line, as a part of the bundle, also have separate prices.
The bundle lines will always be sourced together when inventory is available. If there is no stock for any of the lines, or stock is not available in the same source, the entire bundle is kept in a soft allocated (held back in sourcing queue and retried in the next allocation wave) state.
There is a configuration, that allows the OMS to split a bundle after a defined number of attempts. The bundle will only be split if all lines of the bundle have stock in any of the sources.
If the FilterSourceBundleFromOneSource
option is displayed on the Sourcing Logic page, then the bundle will not be sourced.
If an order contains a bundle and regular lines, the regular lines will be sourced and the bundle will remain in the sourcing queue.
Two processes allow you to force a bundle split:
- Manual intervention - a user manually sources the order or partially cancels from the exception queue page
-
Unsuccessful attempts rule - rule that defines the number of unsuccessful attempts after which the bundle can be broken and the lines will be sourced individually if stock is available for all bundle lines.
Example: If only one of the lines of the bundle are not available in any of the sources then the bundle is still held back for sourcing. At this point, the manual sourcing can decide to send only a partial bundle to fulfillment.
Bundles diagram
Bundle ship rules
A specified aggregate can configure bundles to follow one of these three bundle sourcing logic behaviors:
SHIPTOGETHER
- all lines are available in the same sourceSHIPSIMULTANEOUSLY
- all lines are sourced at the same time, from the same source or different sourcesSHIPSEPARATELY
- all lines are sourced individually and the bundle is effectively ignored
The generic configuration can also be overwritten for a specific bundle/order by providing a custom attribute indicating the expected ship behavior at the bundle line.
In the following example, it’s assummed that the generic configuration is defined as SHIPTOGETHER
, but the ingested order will actually follow a SHIPSIMULTANEOUSLY
behavior.
Example
{
"order": {
"id": "123456",
"lines": [
{
"line_number": "1",
"id": "23",
"type": "BUNDLE",
"name": "The Collection",
"custom_attributes": [
{
"name": "mom_srcrr_FilterSourceBundleFromOneSource",
"value": "SHIPSIMULTANEOUSLY"
}
]
},
{
"line_number": "2",
"id": "24",
"type": "SIMPLE",
"name": "Tee-Shirt",
"parent_line_number": "23"
},
{
"line_number": "3",
"id": "25",
"type": "VIRTUAL",
"name": "Magical History Tour Ticket",
"parent_line_number": "23"
}
]
}
}
Exceptions in bundle lines
You can also configure a specific bundle line to ignore the bundle SHIPTOGETHER
and SHIPSIMULTANEOUSLY
rules so they do not have to be fulfilled together with the rest of the lines for that specific bundle. The same behavior can be applied for an order line if the order has been defined to follow the SHIPTOGETHER
and SHIPSIMULTANEOUSLY
rules, so that the line will be sourced individually.
With the magento.sales.order_management.create specification you can define the following custom attribute for a line inside a bundle:
mom_srcrr_FilterSourceBundleFromOneSource: SOURCEINDIVIDUALLY
Then, the sourcing logic will treat all lines with this specific attribute as outside of the “shiptogether/shipsimoutaneously” filter rule, which allows the line to be sourced individually.
Example
{
"sourcing_request": {
"uuid": "42c4f242-abe5-4d51-b5e9-23621d630997",
"mode": "direct",
"order_uuid": "3a007189-dd8b-4760-829c-2725f53b0607",
},
"lines": [
{
"id": "696",
"line_number": 1,
"sku": "MALLRATCDTSHIRT",
"product_type": "BUNDLE"
},
{
"id": "697",
"line_number": 2,
"sku": "09399062579953",
"product_type": "PHYSICAL",
"pparent_line_number": "696"
},
{
"id": "698",
"line_number": 3,
"sku": "00602567530732",
"product_type": "PHYSICAL",
"parent_line_number": "696"
},
{
"id": "699",
"line_number": 4,
"sku": "00602567530732",
"product_type": "PHYSICAL",
"parent_line_number": "696"
"custom_attributes" [
{
"name": "mom_srcrr_FilterSourceBundleFromOneSource",
"value": "SOURCEINDIVIDUALLY"
}
]
}
]
}
}
Implementation
The custom attribute that indicates the lines used to ignore the ship filter rules should be provided as per the following example. This example is a simplified scenario where a bundle called “The Collection” contains a t-shirt and a tour ticket:
{
"order": {
"id": "123456",
"lines": [
{
"line_number": "1",
"id": "23",
"type": "BUNDLE",
"name": "The Collection",
"custom_attributes": [
{
"name": "mom_srcrr_FilterSourceBundleFromOneSource",
"value": "SHIPTOGETHER"
}
]
},
{
"line_number": "2",
"id": "24",
"type": "SIMPLE",
"name": "Tee-Shirt",
"parent_line_number": "23"
},
{
"line_number": "3",
"id": "25",
"type": "VIRTUAL",
"name": "Magical History Tour Ticket",
"parent_line_number": "23",
"custom_attributes": [
{
"name": "mom_srcrr_FilterSourceBundleFromOneSource",
"value": "SOURCEINDIVIDUALLY"
}
]
}
]
}
}