Integrating with Salesforce Omnichannel Inventory provides more powerful features for
handling inventory data and working with external management systems.
Omnichannel Inventory Integration
When you manage inventory with Omnichannel Inventory, you don’t create or modify
inventory records in B2C Commerce. The integration handles that for you by automatically
updating availability in B2C Commerce based on data received from Omnichannel Inventory.
Reserving inventory for a basket or order is the only way that B2C Commerce can affect
inventory levels. Perform all other inventory updates in Omnichannel Inventory.
For information on configuring and customizing Omnichannel Inventory, see the Omnichannel Inventory topics in Salesforce
Help.
Location Graph
The location graph is the collection of inventory locations and location groups in
Omnichannel Inventory that fulfill orders from your B2C Commerce storefront. A location
represents a specific inventory source, usually a physical location like a warehouse. A
location group is a set of one or more locations. Inventory quantities for a location
group are calculated as the sums of the corresponding quantities of the locations in
that group. For example, the On Hand quantity for a location group is the sum of the On
Hand quantities of all the locations in that group.
Note: A location doesn’t have to belong to a location group, but a location group must
include at least one location.
B2C Commerce exposes inventory data by associating inventory lists with the locations
and location groups in your location graph. Create one inventory list in B2C Commerce
for each location or location group in Omnichannel Inventory that you want to expose.
The ID of the inventory list must match the External Reference value of the associated
location or location group in Omnichannel Inventory.
Note: The integration uses the inventory list ID and the location or location group
External Reference to transfer data between B2C Commerce and Omnichannel Inventory. For
B2C Commerce to interact with an element of your location graph, it must have an
inventory list whose ID matches that element’s External Reference.
For each B2C Commerce site, use a location or location group to represent the default
inventory available to fulfill orders placed on that site. Assign the inventory list for
that location or location group to the site. If you use other inventory lists, such as
for a store, associate them with locations or location groups of their own.
Note: You can only associate one inventory list with each site or store. Other inventory
lists can expose inventory availability data for individual locations in the
group.
Inventory Reservations
When B2C Commerce creates an order, it sends an inventory reservation request to
Omnichannel Inventory. Omnichannel Inventory tries to assign the reservation to the
location or location group associated with that site’s or store’s inventory list. If
insufficient inventory is available, the reservation fails. After Omnichannel Inventory
accepts a reservation, it handles any further processing together with your order
management system.
Note: When B2C Commerce sends a reservation request for a location group, it can’t affect
the way Omnichannel Inventory transfers the reservation to specific locations in the
group. Omnichannel Inventory and Salesforce Order Management provide tools for managing
and processing inventory reservations.
If you implement a customization that requests temporary inventory reservations for
baskets, the integration sends those requests to Omnichannel Inventory.
Considerations and Limitations When Using Omnichannel Inventory
- Visible inventory availability data is eventually consistent, meaning that an update
can take time (usually a few seconds) to be reflected in the UI or API. Therefore,
when B2C Commerce makes an inventory reservation in Omnichannel Inventory, you can’t
assume that availability data immediately reflects the quantities assigned to that
reservation. This delay affects all B2C Commerce functionality that relies on
availability data, such as Script API customizations that use inventory availability
queries. However, Omnichannel Inventory processes reservation requests sequentially,
so a reservation request only succeeds if inventory is actually available to fulfill
that order.
- If your custom code requests temporary reservations for baskets, those temporary
reservations affect visible inventory availability. (When not using Omnichannel
Inventory, the Commerce platform considers existing temporary reservations when
creating reservations, but doesn’t include them in visible availability data.)
- You can’t enable the On Order Inventory feature.
- The IDs of inventory lists associated with locations and location groups have the
following restrictions:
- They must be 2–128 characters in length.
- They can only include the following characters: A–Z, a–z, 0–9, _ (underscore),
- (hyphen)
- You can’t create or update inventory records in B2C Commerce. You can import
inventory lists into B2C Commerce, but must import product inventory data directly
into Omnichannel Inventory.
Note: Attempting to import an individual inventory record
into B2C Commerce causes this warning: Omnichannel Inventory does not
support the import of inventory records. Skipping
element.
- You can’t use custom properties on inventory records.
- You can’t use B2C Commerce APIs to modify individual inventory records. Otherwise,
inventory-related script API methods work the same as they do when not using
Omnichannel Inventory.
- You can’t make OCAPI calls to the
inventory_lists/{inventory_list_id}/product_inventory_records
endpoint.
- Omnichannel Inventory doesn’t support explicit preorders. Instead, it represents
expected inventory restocks with futures. Each future has a quantity and an expected date.
- In B2C Commerce, a product’s PreorderBackorderAllocation
quantity is the sum of all existing future quantities for that product, and its
inStockDate is the expected date of its earliest
future.
- If a product has any futures in Omnichannel Inventory, then in B2C Commerce,
its backorderable flag is true. Otherwise, that flag is
false.
- In B2C Commerce, product preorderable flags are always
false.
- Perpetual availability isn’t supported for individual inventory records. However,
you can enable Default In-Stock on an inventory list. In that
case, B2C Commerce always considers products not on the list to be available, and
doesn’t include them in reservation requests.
- B2C Commerce builds its Availability Search Index using the availability data
received from Omnichannel Inventory. Remember that this data is considered eventually
consistent.
- For best performance when implementing Omnichannel Inventory customizations, use the
headless Commerce APIs. The corresponding Salesforce core Connect APIs and actions
simply call the Commerce APIs under the hood. Updating the location graph is an
exception, since the Commerce APIs don’t provide that functionality.
CAUTION:
Attempting to upload large inventory data files using the
Salesforce core APIs can greatly affect your org’s performance.
Converting Existing Storefronts to Use Omnichannel Inventory
When integrating Omnichannel Inventory with an existing B2C Commerce storefront, include
these steps in your planning process:
- Map your existing sites, stores, and inventory locations to locations and location
groups in Omnichannel Inventory.
- Determine which locations and location groups to expose in B2C Commerce with
inventory lists.
- Identify any inventory lists used for orders but not assigned to a site; for
example, lists assigned to a store. Associate each one with a location or location
group in Omnichannel Inventory.
- Create a plan to transfer existing inventory data import processes from B2C Commerce
to Omnichannel Inventory.
- Identify any existing customizations that are incompatible with Omnichannel
Inventory and decide whether to modify or replace them. That includes any
customization that modifies product inventory records.
Terminology
The following terminology differs between B2C Commerce and Omnichannel Inventory.
B2C Commerce Term |
Omnichannel Inventory Term |
Description |
n/a |
On Hand Quantity |
Current physical quantity |
n/a |
Safety Stock |
Quantity of physical stock set aside to avoid overselling |
Allocation Quantity |
n/a |
Calculated as (On Hand Quantity) - (Safety Stock) |
Allocation Reset Date |
Effective Date |
Date of the most recent inventory data update |
Preorder Backorder Allocation Quantity |
Future Quantity (if multiple future quantities exist, the value in B2C
Commerce is their sum) |
Sellable expected future restock quantities |
In Stock Date |
Earliest Future Expected Date |
Date when future restock quantities are expected |
Turnover, Reserved, and On Order Quantity |
Total Reserved |
Quantity reserved to fulfill orders |
Stock Level |
Available to Fulfill (ATF) |
Calculated as (On Hand Quantity) - (Safety Stock) - (Total Reserved);
with a minimum value of 0 |
Available to Sell (ATS) |
Available to Order (ATO) |
Calculated as (On Hand Quantity) + (Future Quantities) - (Safety Stock)
- (Total Reserved); with a minimum value of 0 |