Tangiblee
 > 
Help Center
 > 

Multi-Cart Bundling Specification

Overview

Tangiblee’s Multi-SKU Bundling feature connects our Stacking feature to your Add-to-Cart. Once enabled, we can perform batch adding to cart for catalog/history/dynamic comparison items.

This feature is currently available for SFCC and Shopify. At this stage, we do not support other engines out of the box, but we do have the ability to adapt to any custom APIs.

Requirements

To implement Multi-SKU Cart Bundling, we need to add code into the mapper, and require 2 API Endpoints:

  1. Fetch product variants by product id (or product slug)

          a. variation id

           b. price

           c. is in stock

           d. option(size, colour, etc)

  1. Add chosen items to cart by variation id (ideally as batch, last resort one-by-one).

Out of the box we support 2 engines which provides such APIs:

  1. Salesforce Commerce Cloud (SFCC)
  2. Shopify

SFCC

SFCC has OCAPI, which you should enable and provide us with the client_id.

Using OCAPI we can:

  1. Fetch variations by product id, using following endpoint:

GET: https:///s/Sites-en-GBSite/dw/shop/v17_8/products/?client_id=&expand=availability,prices,variati

where product_id is master product id, client_id provided by client.

  1. Add to cart variants one-by-one:

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

Request Body:


cartAction='add'

pid=

Quantity=1

References

OCAPI docs:

CORS enabling: Salesforce Commerce Cloud Infocenter

Shopify

Shopify has Ajax API available for storefront

  1. Fetch variations by product id, using following endpoint:

GET: /products/.js

where product_handle is a product handle.

  1. Batch add to cart:

POST: /cart/add.js

Request Body:


items: [ 
{ 
quantity: 1, 
id:  
} 
]

References:

Fetch Varations API: Product API Reference

Add to Cart API: Cart API Reference

Other Engines

Unfortunately, we do not support other engines out of the box at this time, but we can adapt to any custom APIs. Their requirements would be the same:

  1. API endpoint to fetch variations by product ID. We can adapt to custom API Response, but it should have a list of variations with variation ID, options, price and availability. For example SFCC response:
JSON mapping for Salesforce Commerce Cloud screenshot

}, 
{ 
_type: "variant", 
link: "https://", 
orderable: true, 
price: 45, 
product_id: "180177-50", 
variation_values: { 
size: "5000" 
} 
}, 
{ 
_type: "variant", 
link: "https://", 
orderable: true, 
price: 45, 
product_id: "180177-52", 
variation_values: { 
size: "5200" 
} 
}, 
{ 
_type: "variant", 
link: "https://", 
orderable: true, 
price: 45, 
product_id: "180177-54", 
variation_values: { 
size: "5400" 
} 
}, 
{ 
_type: "variant", 
link: "https://", 
orderable: true, 
price: 45, 
product_id: "180177-56", 
variation_values: { 
size: "5600" 
} 
}, 
{ 
_type: "variant", 
link: "https://", 
orderable: true, 
price: 45, 
product_id: "180177-58", 
variation_values: { 
size: "5800" 
} 
}, 
{ 
_type: "variant", 
link: "https://", 
orderable: true, 
price: 45, 
product_id: "180177-60", 
variation_values: { 
size: "6000" 
} 
} 
], 
variation_attributes: [ 
{ 
_type: "variation_attribute", 
id: "size", 
name: "Size", 
values: [ 
{ 
_type: "variation_attribute_value", name: "48", 
orderable: true, 
value: "4800" 
}, 
{ 
_type: "variation_attribute_value", name: "50", 
orderable: true, 
value: "5000" 
}, 
{

_type: "variation_attribute_value", name: "52", 
orderable: true, 
value: "5200" 
}, 
{ 
_type: "variation_attribute_value", name: "54", 
orderable: true, 
value: "5400" 
}, 
{ 
_type: "variation_attribute_value", name: "56", 
orderable: true, 
value: "5600" 
}, 
{ 
_type: "variation_attribute_value", name: "58", 
orderable: true, 
value: "5800" 
}, 
{ 
_type: "variation_attribute_value", name: "60", 
orderable: true, 
value: "6000" 
} 
] 
} 
], 
c_Collection: [ 
"Pandora Moments" 
], 
c_Depth: 1.3, 
c_DepthInch: 0.05, 
c_Height: 3.4, 
c_HeightInch: 0, 
c_Width: 3.3, 
c_WidthInch: 0.13, 
c_bundleOnly: false, 
c_bvAverageRating: "4.5775", 
c_bvRatingRange: "5", 
c_bvReviewCount: "471", 
c_color: [ 
"No color" 
], 
c_countryofOrigin: "TH", 
c_designNumber: 177, 
c_digitalSizeGroup: "Narrow-Shank-Rings", c_engravable: false, 
c_isPrelaunch: false, 
c_materialGroup: [ 
"No other material" 
], 
c_materialName: [ 
"No other material" 
], 
c_metalGroup: [ 
"Rose gold plated" 
], 
c_metalName: [ 
"14k Rose gold-plated unique metal blend" ], 
c_personalStyle: "Love", 
c_primaryCategory: "rings", 
c_status: "released", 
c_stoneGroup: [ 
"No stone" 
], 
c_stoneName: [ 
"No stone" 
], 
c_themes: [ 
"Love" 
] 
}
  1. API to add item into the cart by variant ID see Requirements Section above
Tangiblee is a registered trademark ® of yRuler Inc. Copyright 2023 All Rights Reserved