You are here:
Location Graph
Set up your Location Graph by creating locations and location groups in your Salesforce org and committing them.
This process is described in Manage Locations and Location Groups in Salesforce Help. Set up your Location Graph by creating locations and location groups in your Salesforce org and committing them Use Connect in Apex, Connect REST API, or Omnichannel Inventory console app. You can’t use the headless Commerce API to set up your location graph.
For information on managing your Location Graph with Connect in Apex, see OmnichannelInventoryService Class in the Apex Reference Guide.
For information on managing your Location Graph with Connect REST API, see Salesforce Omnichannel Inventory Resources in the Connect REST API Developer Guide.
Here’s an overview of the steps to follow in your Salesforce org:
- Create at least one location type.
-
For each location that fulfills orders, create a Location record.
Note When using D2C Commerce, your location graph is limited to one location.
- Set Should Sync With OCI to True.
- Set Is Inventory Location to True.
- Set the Location Type as appropriate.
- Set the Visitor Address to the physical address of the location.
- Set the External Reference to a unique value. If you use Salesforce B2C Commerce, use the External Reference to associate the location with a dedicated B2C Commerce inventory list.
-
For each storefront, sales channel, or desired logical group of locations, create a
Location Group record.
Note When using D2C Commerce, your location graph is limited to one location group.
- Set Should Sync With OCI to True.
- Set Is Enabled to True.
- Set the External Reference to a unique value. If you use Salesforce B2C Commerce, use the External Reference to associate the location group with a dedicated B2C Commerce inventory list.
-
For each location, create a Location Group Assignment record for each location group
that it belongs to.
- A location doesn’t have to belong to any location groups.
- A location can belong to multiple location groups. Create a location group assignment for each one.
- Assign at least one location to each location group.
- Commit the changes to Omnichannel Inventory by following the instructions in the help topics.
Adding or removing locations or location groups after loading inventory availability data can trigger large availability data and cache updates. To mitigate the performance impact, we recommend these practices:
- If you use Salesforce B2C Commerce, follow the instructions in Omnichannel Inventory Location Graph Changes in the B2C Commerce Infocenter.
- Schedule location graph changes for times with low-order traffic.
- Add or remove only one location or location group at a time.
- After making a change, wait for the update to finish before importing new inventory availability data.

