Confirm Product Inventory in Point of Sale
Check both in-store and online inventory availability using Point of Sale SPIs.
If you change the cart in the Point of Sale app (for example, adding items, deleting items, changing the number of items, and so on), Point of Sale sends the cart contents to the external system through the SPI. Point of Sale checks the external system for product availability by checking inventory count. If the product isn't available, an error appears and the item isn’t added to the cart.
Point of Sale offers two additional inventory SPIs that check nearby inventory and get inventory information based on a delivery ZIP code on the Product Detail Page (PDP).
The merchant SPI implementation must provide an endpoint for the POS app to request inventory for the provided products. Configure these endpoints in Point of Sale CMS so that the POS app can perform live inventory checks.
-
Go to Inventory | Inventory Configurations.
-
Under Provider, select SPI and configure the rest of the toggles by referring to Inventory Configurations in Salesforce Help.
-
In CMS, and go to Store Management | Integration | Custom Connectors.
-
Click Create.
-
Fill out the fields using this information:
-
For API Config | API Key, enter ONLINE_ITEM_INVENTORY_CHECK.
-
For API Config | API Endpoint, enter the external endpoint to get the order. For example,
https://sample/external/to/export/return/order/to/external/system. -
For JSON Config | Integration Type, enter HTTP_POST.
-
For JSON Config | JSON Headers, enter the API header. Headers can be Content-Type, authorization attributes like clientId/password. For example,
{"Content-Type":"application/json","client_id":"myClientId","client_secret":"myClientSecret"}.
-
-
Confirm that the app configuration settings are turned off:
-
HasOnlineInventory (App Config | Modules | Settings)
-
HasStoreInventory (App Config | Modules | In-Store Fulfillment)
-
-
Confirm that the store settings are turned on:
-
enable.online.inventory.tracking (Store Management | Store Settings | Inventory)
-
check.store.inventory (Store Management | Store Settings | Store Fulfillment | BOPIS)
-
The next sections include examples of the request and response. In the response, the merchant receives the product ID, the type of inventory check (for example, ONLINE), the store ID (optional), and the purpose of the inventory check (for example, AVAILABILITY).
The SPI is triggered on the POS app when a user clicks Add to Cart for a product or changes the fulfillment type in the cart.