---
schema_version: "1"
id: f0ec71705281a3bf59dc454980b714a8ca20d311d36886cddc3e0b07dd46643e
title: Create a Location Graph for Omnichannel Inventory
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/oci_impl_create_location_graph_b2b_d2c.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.oci_impl_create_location_graph_b2b_d2c.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5f714dfa70b5102cca6437e08a213610f408cde587815fb6e5cd1fa9debdb9dc
description: A location graph consists of locations and location groups. You can create the graph using the Omnichannel Inventory console app, Connect in Apex, or Connect REST API.
products:
  - Commerce
  - Omnichannel Inventory
release: "264"
---
# Create a Location Graph for Omnichannel Inventory

A location graph consists of locations and location groups. You can create the graph using the Omnichannel Inventory console app, Connect in Apex, or Connect REST API.

1. Create at least one location type.
2. For each location that fulfills orders, create a Location record.
    
    If you’re using D2C Commerce, the location graph can have only one location.
    
    1. Set Should Sync With OCI to **True**.
    2. Set Is Inventory Location to **True**.
    3. Specify the location type.
    4. Set the visitor address to the physical address of the location.
    5. Set the external reference to a unique value.
        
        If you’re using Salesforce B2C Commerce, use the external reference to associate the location with a dedicated B2C Commerce inventory list.
3. For each storefront, sales channel, or logical group of locations, create a Location Group record.
    
    If you’re using D2C Commerce, the location graph can have only one location group.
    
    1. Set Should Sync With OCI to **True**.
    2. Set Is Enabled to **True**.
    3. Set the external reference to a unique value.
        
        If you’re using Salesforce B2C Commerce, use the external reference to associate the location with a dedicated B2C Commerce inventory list.
4. 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 a location group.
    
    1. Create a location group assignment for each location.
        
        A location can belong to multiple location groups.
    2. Assign at least one location to each location group.
5. Commit the changes to Omnichannel Inventory.

Adding or removing locations or location groups after loading inventory availability data can trigger large availability data and cache updates. If you need to make changes, schedule the update during low-order traffic times or change one item at a time.

- Schedule location graph changes for times with low-order traffic.
- If you have scheduled imports, pause them until the changes are complete.
- 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.

When using Omnichannel Inventory console app, be sure to select **Sync with OCI** when creating locations and location groups.