Sitecore OrderCloud Documentation

docs

Portal login

Introducing Product Bundles

Published by Miranda Danielson on October 19, 2023

Last updated on October 26, 2023

We’re excited to present a new, often requested, feature: Product Bundles. This feature can be used in a variety of ways to help customers achieve their ecommerce goals.

Use Cases

  • I need new employees to purchase uniform bundles, I want to provide the products in the bundle at a discount and ensure they are purchasing a minimum quantity of each item.

  • I want to cross-sell complementary beauty products, so I create a bundle consisting of two or more products that are commonly used together at a slightly reduced price.

  • I know people buying video game consoles also likely need other equipment, to entice them to buy all of the items at once, I need a bundle that includes a console, headset, and choice of game.

Key Highlights

  • To provide a seamless shopping experience, Bundles are returned in product lists.

    • You can get all of the products assigned to a given bundle by filtering on BundleID={id}

  • Bundles can be assigned to catalogs, categories, and parties.

    • Product visibility rules also apply to Bundles.

    • Bundles visibility is also determined by the product’s assigned to it. If all products assigned to a bundle are not visible to a given user, the user will not be able to see the bundle, even if it’s assigned to them.

  • In order to provide the greatest flexibility, and ease in calculating tax, each item purchased as part of the bundle must have it’s own price defined. If you had a flat rate in mind for your bundle, you can take that amount and divide it however you’d like between each product in the bundle.

  • You make a single API call to add all products in a bundle to an order.

New Properties:

Product.IsBundle

  • Read-only

  • In order to return Bundles in product lists, a product that represents the bundle is created alongside the bundle with this property set to true.

  • Cannot be used to create a single lineitem on an order

  • To exclude bundles from a product list, you can add a filter of IsBundle=false

LineItem.IsBundle

  • Read-only

  • Set when a bundle and it’s products are added to an order

  • LineItems with IsBundle = true will always have a unit price of 0

  • LineItems with IsBundle = true will be excluded from Order.LineItemCount

LineItem.BundleItemID

  • Read-only

  • Set when a bundle and it’s products are added to an order. A reference to the LineItem that represents the Bundle

  • When populated it signifies a LineItem.Product is being purchased as part of a bundle, and can be used to group LineItems in the UI

PriceBreak.BundlePrice

  • Similar to SubscriptionPrice, or SalePrice this property allows defining a price that will be used if a product is purchased as part of a bundle

  • If the item is being purchased as part of a bundle, even if it's also part of a subscription order, the BundlePrice will always apply when it is defined. If it is not defined, then the following pricing precedence applies:

    • SubscriptionPrice

      • if the item is part of a subscription order

    • SalePrice

    • Price

New Resource: Bundles

1{
2 "ID": "",
3 "OwnerID": "",
4 "Name": "",
5 "Description": "",
6 "Active": true,
7 "xp": {}
8}

New Roles

  • BundleReader

  • BundleAdmin

  • BundleAssignmentAdmin

New Endpoints

  • GET v1/bundles

  • GET v1/bundles/{bundleID}

  • POST v1/bundles

  • PUT v1/bundles/{bundleID}

  • PATCH v1/bundles/{bundleID}

  • DELETE v1/bundles/{bundleID}

Assignments

Catalog Assignments

  • GET v1/catalogs/bundleassignments

  • POST v1/catalogs/bundleassignments

1{
2 "CatalogID": "",
3 "BundleID": ""
4}
  • DELETE v1/catalogs/{catalogID}/bundleassignments/{bundleID}

Category Assignments

  • GET v1/catalogs/{catalogID}/categories/bundleassignments

  • POST v1/catalogs/{catalogID}/categories/bundleassignments

1{
2 "CategoryID": "",
3 "BundleID": "",
4 "ListOrder": 0
5}
  • DELETE v1/catalogs/{catalogID}/categories/{categoryID}/bundleassignments/{bundleID}

Bundle Product Assignments

  • GET v1/bundles/productassignments

  • POST v1/bundles/productassignments

1{
2 "BundleID": "",
3 "ProductID": "",
4 "Required": true,
5 "DefaultQuantity": null
6}
  • DELETE v1/bundles/{bundleID}/productassignments/{productID}

Bundle Party Assignments

  • GET v1/bundles/assignments

  • POST v1/bundles/assignments

1{
2 "SellerID": "",
3 "BundleID": "",
4 "BuyerID": "",
5 "UserGroupID": ""
6}
  • DELETE v1/bundles/{bundleID}/assignments/{buyerID}

Adding a Bundle to an Order

When you add a bundle to an order, a LineItem will be created to represent the bundle itself, as well as additional LineItems for each product in the bundle, which will have a reference to the item that represents the bundle.

Providing the item that represents the bundle allows you to have easy access to the bundle information, such as Name, Description and xp, for UI purposes.

New Endpoints

  • POST v1/orders/{direction}/{orderID}/bundles/{bundleID} and POST v1/cart/bundles/{bundleID}

    • There is an optional request body which is a list of LineItems

      • If no request body is provided, we will create a LineItem for each product assigned to the bundle, using the DefaultQuantity

      • If any required products are missing a DefaultQuantity and no request body is passed in, an error will be thrown

      • If any Parent products are assigned to the bundle and no request body is passed in, an error will be thrown

      • If any products with assigned specs that are required and have no DefaultOptionID are assigned to the bundle and no request body is passed in, an error will be thrown

    • If you need custom validation when a user adds a bundle to an order, you can configure a pre-webhook on this endpoint.

      • Possible use case: Shorts and Socks are a optional items in your Uniform bundle, but if a user adds Shorts to the bundle, they must also add Socks.

  • DELETE v1/orders/{direction}/{orderID}/bundles/{bundleID}/{bundleItemID} and DELETE v1/cart/bundles/{bundleID}/{bundleItemID}

    • Deletes all LineItems that were added as part of the given Bundle

  • Updating single bundle items is supported via existing endpoints

    • PATCH v1/orders/{direction}/{orderID}/lineitems/{itemID}

    • PUT v1/orders/{direction}/{orderID}/lineitems/{itemID}

    • PATCH v1/cart/lineitems/{itemID}

    • PUT v1/cart/lineitems/{itemID}

  • Deleting single bundle items is supported via existing endpoints

    • DELETE v1/orders/{direction}/{orderID}/lineitems/{itemID}

    • DELETE v1/cart/lineitems/{itemID}

Configuring your first Bundle

Use Case

I have identified three products I want to sell as part of a bundle, each of those products is assigned a price schedule, or has a default price schedule, and they are currently visible in a catalog.

Administrative Workflow

  1. Update the Price Schedules via PATCH v1/priceschedules/{priceScheduleID} and set the BundlePrice on the price break

  2. Create the bundle via POST v1/bundles

  3. Assign the bundle to the desired catalog(s) and category using POST v1/catalogs/bundleassignments and POST v1/catalogs/{catalogID}/categories/bundleassignments

  4. Assign the three products to the bundle via POST v1/bundles/productassignments

  5. Assign the bundle to the buyer(s) or user groups(s) via POST v1/bundles/assignments

Shopper Workflow

  1. See the bundle returned from GET v1/me/products

  2. Visit the bundle detail page and see all of the bundle details and associated products, including BundlePrice via GET v1/me/products?BundleID={id}

  3. Add the bundle to your cart via POST v1/cart/bundles/{bundleID}


Still have questions?
Ask in our Community Channel

Content Powered By
Sitecore Logo

© Copyright 2024, Sitecore OrderCloud®. All rights reserved.

Contact Us
Privacy Policy
Sitecore