Skip to main content
Tangiblee
 > 
Help Center
 > 
 > 
 > 
 > 
Multi-Cart Bundling Specification: SFCC

Multi-Cart Bundling Specification: SFCC

Overview

Multi-SKU bundling simplifies the user experience by enabling users to add a stack of multiple products to their cart with a single click.

Requirements

To set up multi-SKU cart bundling for SFCC-based storefront, it’s typically requested to:

  • enable access to SFCC OCAPI endpoint for Tangiblee
  • provide client_id for API requests
  • share API version and siteID

How it works

Tangiblee will use 2 API endpoints.

1. API to retrieve product variants by product id (or product slug):

a. variation id;

b. price;

c. in stock availability;

d. option (size, color, etc)


GET: https://<client.domain>/s/Sites-en-GBSite/dw/shop/v17_8/products/<product_id>?client_id=<client_id>&expand=availability,prices,variations>

(where product_id is a master product id and client_id is provided by client)

  1. Push selected items to cart one-by-one by the variation id:

POST: https://<client.domain>/on/demandware.store/Sites-en-GB-Site/en_GB/Cart-AddProduct

The data is passed in the Request Body to the ATC endpoint:


cartAction='add'
pid=<variant_id>
Quantity=1

As an option, we may also send a request to add selected products to the cart all at once using pidsObj:


pid=''
pdsObj=[{ pid: variants[0], qty: '1' }, { pid: variants[1], qty: '1' }]
Quantity=1
 


References

OCAPI docs: https://documentation.b2c.commercecloud.salesforce.com/DOC2/index.jsp?topic=%2Fcom.demandware.dochelp%2FOCAPI%2Fcurrent%2Fshop%2FResources%2FProducts.html&cp=0_15_3_12

CORS enabling: Salesforce Commerce Cloud Infocenter

AddToBag Controller: https://salesforcecommercecloud.github.io/b2c-dev-doc/docs/current/sfrajsdoc/js/server/app_storefront_base_cartridge_controllers_Cart.js.html