Localized Stock is an Experience OS extension that enables you to recommend only products available in the branch where the user is shopping.
With Localized Stock, you can upload location-based stock availability to your product feed, and adjust product recommendations for each branch. This delivers personalized recommendations across up to 1,500 locations, ensuring that users see only products available at the branch they’re currently browsing.
The classic use case for this capability is Buy Online Pick Up In Store (BOPIS) for groceries, but any business with branches can use it.
This capability is only available for product feeds updated and synced via API.
Implementing and using Localized Stock
Activate the extension
Contact your Customer Success Manager to activate the extension.
Update your feed
Add the column out_of_stock_branches to your feed. List the branches in which the selected item (SKU) is out of stock in an array format (strings separated by pipes). The feed update API call should look something like this:
{
"id": "abc-123",
"action": "update",
"body": {
"data": {
"sku": "abc-123",
"group_id": "abc",
"url": "http://www.example.com/abc-123",
"name": "white sneakers",
"price": 29.99,
"in_stock": true,
"out_of_stock_branches": ["branchId1"|"branchId2"],
"image_url": "http//:www.example.com/abc-123.png",
"categories": "shoes|sneakers"
}
}
}
Note that the param 'in_stock' must be set to 'true' to report out-of-stock branches. If the item is not in stock anywhere, there's no need to report out-of-stock per branch. Rather, set 'in_stock' as 'false' and keep 'out_of_stock_branches' empty.
Report the branch ID in the page context
- Experience API: Include the branch ID in your choose call.
-
Client-side: Include the new param 'branchId' in the DY.recommendationContext object.
For example:
window.DY = window.DY || {};
DY.recommendationContext = { type: “PRODUCT”, data: [‘SKU123’], branchId: “3075749”};
Limitations
This capability supports reporting up to 1500 branches for out-of-stock items.