Bundles

A bundle is an offering of several products for sale as one combined product. See our Bundles page for more info about bundles and how they work in the Order Management System (OMS).

In order to process bundles, the Connector must map the bundle and its child lines during the creation of the order, so that the bundle is correctly handled. When creating the magento.sales.order_management.create specification in Magento Commerce (MC), the following is validated:

  • The bundle line is of the type BUNDLE.
  • The SKUs inside the bundle have PHYSICAL or VIRTUAL types.
  • the SKUs inside the bundle contain the parent_line_number field, which indicates the line number of the parent bundle line.
  • The prices for bundles are defined for each SKU part of the bundle, while the bundle line has a price of 0.
  • The shipment/sourcing rule for the bundle is configured in the MC catalog and is provided in new orders at the bundle line as a custom attribute.

Example

{
    "order": {
        "id": "123456",
         "lines": [
        {
            "line_number": "1",
            "id": "23",
            "type": "BUNDLE",
            "name": "The Beatles Collection"
            "custom_attributes": [
                {
                    "name": "mom_srcrr_FilterSourceBundleFromOneSource",
                    "value": "SHIPTOGETHER"
                }
            ]
            ...
        },
        {
            "line_number": "2",
            "type": "SIMPLE",
            "name": "Tee-Shirt Abbey Road",
            "parent_line_number": "23"
        },
        {
            "line_number": "3",
            "type": "VIRTUAL",
            "name": "Magical History Tour Ticket",
            "parent_line_number": "23"
        }
    ]
        }
}

Create or update bundle

When an MC client creates a new bundle, the magento.catalog.product_management.updated message is sent to the OMS to be enabled there. This contains the SKU of the bundle and the type defined is BUNDLE.

Example

{
  "product": {
    "id": "Bundle-test",
    "type": "bundle",
    "sku": "Bundle-test",
    "name": [
      {
        "value": "Test bundle for yoga outfit",
        "channel": "string",
        "locale": "string"
      }
    ],
    "status": "active"
  }
}

When defining the bundle in MC the following configuration can be defined:

  1. The ship bundle item can be defined as one of these options: TOGETHER, SEPARATELY or SIMULTANEOUSLY, which will be used to overwrite the generic sourcing rule defined for bundles.
  2. The fix or dynamic price can be defined. With the fix price each one of the children options will use the catalog defined price, while with the dynamic pricing the cost of each children item is dynamically calculated by using the price defined for the enitre bundle and splitting it out proportionally to each child, according to the catalog price.

The dynamic SKU option is disabled via the Connector, given the SKUs need to exist in the OMS catalog in order to process new orders.