Omnichannel Inventory Integration Setup and Configuration

Plan and implement your integration of Salesforce Omnichannel Inventory with B2C Commerce.

Planning the Integration

Before you begin, review the organization of your inventory and design a system to meet your specific business needs. Some of the decisions to consider include:

If you’re adding Omnichannel Inventory to an existing B2C Commerce implementation, these considerations also apply:

Implementing the Integration

To set up and configure the integrated inventory system, follow these steps in order. The details follow.

  1. Prepare Omnichannel Inventory
  2. Prepare B2C Commerce
  3. Set up the trust relationship between Omnichannel Inventory and B2C Commerce
  4. Activate the integration

Prepare Omnichannel Inventory

  1. Install and configure Omnichannel Inventory following the instructions in the Omnichannel Inventory topics in Salesforce Help.
  2. Create your location graph. You can use the Salesforce core UI or upload location and location group data using the Connect APIs or core actions.
  3. Create or import product availability data for the locations and location groups that will support your B2C Commerce storefront.
  4. To avoid overselling while activating the integration, we recommend that you specify safety stock quantities. Safety stock isn’t included in availability data sent to B2C Commerce. For example, if a product has 10 units available and a safety stock of 2, then the inventory record in B2C Commerce shows an allocation quantity of 8.

Prepare B2C Commerce

  1. If setting up a new instance of B2C Commerce, install and configure it according to the documentation.
  2. Create or import your sites and stores.
  3. Create or import the inventory lists to be paired with locations and location groups. Make sure that each ID matches the External Reference of the corresponding location or location group.
  4. Assign the inventory lists to sites and stores.
  5. In Business Manager, navigate to Administration > Global Preferences > Retention Settings. Set the Inventory Record Retention to a value greater than 0. This setting ensures that after the integration is activated, B2C Commerce deletes any unused legacy product inventory records. When the integration is active, Omnichannel Inventory handles all individual product inventory records.
    Note: If this setting is 0, then B2C Commerce doesn’t delete records that are no longer needed.

Set Up the Trust Relationship Between Omnichannel Inventory and B2C Commerce

Note: This process includes steps in both your Omnichannel Inventory Salesforce org and in your B2C Commerce instance Business Manager. Be sure to perform them in order.
  1. In your Omnichannel Inventory Salesforce org, go to Setup.
  2. From Setup, in the Quick Find box, enter Omnichannel Inventory, and then select Omnichannel Inventory.
  3. Turn on Omnichannel Inventory-B2C Commerce Integration.
  4. Wait for a success email sent to the Salesforce org admin.
  5. In your Omnichannel Inventory Salesforce org, go to Setup.
  6. From Setup, in the Quick Find box, enter Manage C2C Trust Relationships, and then select Manage C2C Trust Relationships.
  7. Click New.
  8. From the Cloud/Application dropdown, select Commerce Cloud.
  9. In the Remote Tenant URL field, enter the full URL for your B2C Commerce instance. For example: https://[HOSTNAME]/on/
  10. Click Request Trust.
  11. In your B2C Commerce instance, open Business Manager.
  12. In Business Manager, navigate to Administration > Global Preferences > Cross Cloud Trust.
  13. In the Trust Request dialog that appears, click Allow.
  14. Return to Setup in your Salesforce org and navigate to Feature Settings > CMS > Manage C2C Trust Relationships.
  15. Click Establish Trust.
    Note: If the Establish Trust button isn’t enabled, refresh the page.
  16. When trust is established, click Done.

Prepare to Use Commerce APIs

Before using the Commerce Headless APIs for inventory, configure an API Client ID in Account Manager as follows:

  1. Log into Account Manager as an account administrator at
  2. Select the API Client tab.
  3. Select Add an API Client ID.
  4. Enter a unique Display Name and a strong password.
  5. In the Organization section, select Salesforce.
  6. In the Roles section, add the Salesforce Commerce API role and assign it to your B2C Commerce instance.
  7. In the Default Scopes field, add the desired scopes. For information about available scopes, see the AUTHZ Scope Catalog in the Commerce Cloud Developer Center.
  8. From the Access Token Format dropdown, select JWT.

Use your Client ID and password to obtain an Account Manager token for calling the Headless APIs. For example:

curl -k --data 'grant_type=client_credentials&scope=SALESFORCE_COMMERCE_API:clientId' --user 'username:password' -X POST 'https://{AccountManagerURL}/dwsso/oauth2/access_token'

When building URIs for your API calls, you need the short code for your B2C Commerce realm and your Salesforce Org’s tenant group ID. Use the short code in the hostname and the tenant group ID as the organization ID. For example:


Activate the Integration

B2C Commerce can be in one of three inventory modes:

Initially, B2C Commerce is in Commerce Platform Inventory mode. When you first activate the integration with Omnichannel Inventory, B2C Commerce changes to OCI Cache Enabled mode. When the cache is ready, it can change to Omnichannel Inventory mode. The current mode is shown on the Omnichannel Inventory Integration page in Business Manager.

To activate the integration, follow these steps.

  1. In Business Manager, navigate to Administration > Operations > OCI Integration.
  2. In the Omnichannel Inventory Integration Status section, click OCI Cache Enabled. B2C Commerce changes to OCI Cache Enabled mode.
  3. The Cache Status table begins populating with inventory data. Wait for data to appear for all inventory lists associated with locations and location groups.
    Note: Normally, the cache requires at least one overnight data import to fully populate. For information on how the cache is populated, see Omnichannel Inventory Data Synchronization.
  4. Verify that availability data in B2C Commerce matches the data in Omnichannel Inventory. To view B2C Commerce inventory data in Business Manager:
    1. Navigate to Merchant Tools > Products and Catalogs > Inventory.
    2. Select an inventory list.
    3. Select the Records tab for that list and search for individual products. To review all the products in the list, leave the search field empty and click Find.
    4. Select a product. The General tab shows both the internal B2C Commerce availability data and the cached Omnichannel Inventory data for that product. Verify that the cached data matches the data in Omnichannel Inventory.
      Note: Remember that in the OCI Future values, the Quantity is the sum of all future quantities for the product, and the date is the date of the earliest future restock.
    5. Repeat the steps for each inventory list and product.
  5. After you verify that all the Omnichannel Inventory data is in the cache, you can activate the integration. We recommend that you minimize the risk of overselling during the activation by taking one or more of the following actions:
    • Activate the integration during a quiet business time when you expect few incoming orders.
    • Take your storefront offline temporarily while you activate the integration.
    • Before activating the integration, export all orders that already have reserved inventory.
  6. Navigate to Administration > Operations > OCI Integration.
  7. In the Omnichannel Inventory Integration Status section, click Omnichannel Inventory. B2C Commerce changes to Omnichannel Inventory mode. Now B2C Commerce uses the cache for all availability data and sends inventory reservations to Omnichannel Inventory. Individual inventory records in B2C Commerce are read-only.
  8. Verify that everything works properly.
  9. Start following regular processes to import inventory data into Omnichannel Inventory.
  10. Stop the processes that import inventory data directly into B2C Commerce. We recommend waiting for a short time before doing so, because if you turn off the integration, they’ll still work.

Turning Off the Integration

If you experience serious issues with the integration, you can turn it off by changing B2C Commerce back to Commerce Platform Inventory mode in Business Manager. When doing so, consider these recommendations:

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.