inventory_ by_ location
The inventory_by_location schema captures how much of each item you hold at each location, as point-in-time snapshots. Use it for stock, value, and availability views by item and variant.
Anchor to Use casesUse cases
- Stock on hand: Group
ending_inventory_units_at_locationbyproduct_variant_idto break on-hand units down by variant. - Net change: Compare
starting_inventory_units_at_locationandinventory_units_net_change_at_locationto trace how stock at a location shifted over the interval. - Stock duration: Show
days_in_stock_at_locationanddays_out_of_stock_at_locationfor eachinventory_item_idto see how long items sit in or run out of stock at a location. - Value by product: Report
ending_inventory_value_at_locationandending_inventory_retail_value_at_locationby product or variant to see where inventory capital is tied up.
Anchor to MetricsMetrics
Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.
Metrics you can use when querying .
- Anchor to days_in_inventory_at_locationdays_
in_ inventory_ at_ locationdays_ in_ inventory_ at_ location DAY_DURATIONDAY_DURATION The number of days in your selected period when the inventory item had a stock record at the inventory location.
- Anchor to days_in_stock_at_locationdays_
in_ stock_ at_ locationdays_ in_ stock_ at_ location DAY_DURATIONDAY_DURATION The number of days in your selected period that ended with more than zero units at the inventory location.
- Anchor to days_of_inventory_remaining_at_locationdays_
of_ inventory_ remaining_ at_ locationdays_ of_ inventory_ remaining_ at_ location DAY_DURATIONDAY_DURATION Forecasted number of days of inventory remaining at the specified location
Days of inventory remaining (at location) = ending inventory units (at location) / inventory units net change (at location) per day- Anchor to days_out_of_stock_at_locationdays_
out_ of_ stock_ at_ locationdays_ out_ of_ stock_ at_ location DAY_DURATIONDAY_DURATION The number of days in your selected period that ended with zero or fewer units at the inventory location.
- Anchor to ending_inventory_retail_value_at_locationending_
inventory_ retail_ value_ at_ locationending_ inventory_ retail_ value_ at_ location MONEYMONEY The retail value is reported in your store's currency.
Ending inventory retail value (at location) = ending inventory units (at location) * product variant price- Anchor to ending_inventory_units_at_locationending_
inventory_ units_ at_ locationending_ inventory_ units_ at_ location INTEGERINTEGER Units at the end of the given period at the specified location
- Anchor to ending_inventory_value_at_locationending_
inventory_ value_ at_ locationending_ inventory_ value_ at_ location MONEYMONEY The cost value is reported in your store's currency.
Ending inventory value (at location) = ending inventory units (at location) * inventory item cost- Anchor to first_day_in_inventory_at_locationfirst_
day_ in_ inventory_ at_ locationfirst_ day_ in_ inventory_ at_ location DAY_TIMESTAMPDAY_TIMESTAMP - Anchor to inventory_units_net_change_at_locationinventory_
units_ net_ change_ at_ locationinventory_ units_ net_ change_ at_ location INTEGERINTEGER - Anchor to last_day_in_inventory_at_locationlast_
day_ in_ inventory_ at_ locationlast_ day_ in_ inventory_ at_ location DAY_TIMESTAMPDAY_TIMESTAMP - Anchor to starting_inventory_units_at_locationstarting_
inventory_ units_ at_ locationstarting_ inventory_ units_ at_ location INTEGERINTEGER Units at the start of the given period at the specified location
DAY_DURATION
A duration measured in days.
MONEY
A monetary amount representing currency values such as prices, revenue, costs, and discounts.
INTEGER
A whole number without decimal places, used for counts, quantities, and other discrete numeric values.
DAY_TIMESTAMP
A date value truncated to day precision.
Anchor to DimensionsDimensions
Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.
Dimensions you can use when querying .
- Anchor to daydaydayDAY_TIMESTAMPDAY_TIMESTAMP
The day an inventory snapshot applies to.
- Anchor to inventory_group_idinventory_
group_ idinventory_ group_ id IDENTITYIDENTITY Shopify identifier for the inventory group
- Anchor to inventory_item_idinventory_
item_ idinventory_ item_ id IDENTITYIDENTITY - Anchor to monthmonthmonthMONTH_TIMESTAMPMONTH_TIMESTAMP
The month an inventory snapshot applies to.
- Anchor to product_idproduct_
idproduct_ id IDENTITYIDENTITY - Anchor to product_variant_idproduct_
variant_ idproduct_ variant_ id IDENTITYIDENTITY - Anchor to quarterquarterquarterQUARTER_TIMESTAMPQUARTER_TIMESTAMP
The quarter an inventory snapshot applies to.
- Anchor to shop_idshop_
idshop_ id IDENTITYIDENTITY - Anchor to weekweekweekWEEK_TIMESTAMPWEEK_TIMESTAMP
The week an inventory snapshot applies to.
- Anchor to yearyearyearYEAR_TIMESTAMPYEAR_TIMESTAMP
The year an inventory snapshot applies to.
- Anchor to inventory_location_idinventory_
location_ idinventory_ location_ id IDENTITYIDENTITY Shopify identifier for the inventory location
- Anchor to inventory_location_nameinventory_
location_ nameinventory_ location_ name STRINGSTRING Name of the inventory location
- Anchor to shop_nameshop_
nameshop_ name STRINGSTRING Name of your store
- Anchor to inventory_cost_is_recordedinventory_
cost_ is_ recordedinventory_ cost_ is_ recorded BOOLEANBOOLEAN Whether the inventory item has a cost saved in Shopify, with values
trueandfalse.- Anchor to inventory_is_trackedinventory_
is_ trackedinventory_ is_ tracked BOOLEANBOOLEAN Whether Shopify tracks inventory adjustments for the inventory item, with values
trueandfalse.- Anchor to inventory_item_costinventory_
item_ costinventory_ item_ cost MONEYMONEY The cost recorded for one unit of the inventory item, in your store's currency.
- Anchor to product_statusproduct_
statusproduct_ status STRINGSTRING The product's current publishing state, with values Active, Archived, Draft, Suspended, and Unlisted.
- Anchor to product_titleproduct_
titleproduct_ title STRINGSTRING Display name of the product that your customers see
- Anchor to product_typeproduct_
typeproduct_ type STRINGSTRING Type (category) that you've assigned to the product
- Anchor to product_vendorproduct_
vendorproduct_ vendor STRINGSTRING Vendor of the product
- Anchor to product_collectionproduct_
collectionproduct_ collection STRINGSTRING Collection associated with the product
- Anchor to product_collectionsproduct_
collectionsproduct_ collections ARRAY<STRING>ARRAY<STRING> Set of collections associated with the product
- Anchor to app_product_creationapp_
product_ creationapp_ product_ creation STRINGSTRING The app that created the product, shown as an app name.
- Anchor to product_tagproduct_
tagproduct_ tag STRINGSTRING Tag associated with the product
- ARRAY<STRING>ARRAY<STRING>
Set of tags associated with the product
- Anchor to product_variant_abc_gradeproduct_
variant_ abc_ gradeproduct_ variant_ abc_ grade STRINGSTRING The ABC grade assigned to the product variant based on its share of revenue. A-grade variants account for about 80% of revenue, B-grade for 15%, and C-grade for 5%.
- Anchor to product_variant_skuproduct_
variant_ skuproduct_ variant_ sku STRINGSTRING SKU of the product variant
- Anchor to product_variant_titleproduct_
variant_ titleproduct_ variant_ title STRINGSTRING Display name of the product variant
IDENTITY
A unique identifier for a Shopify resource such as a customer, product, or order.
MONTH_TIMESTAMP
A date value representing the start of a month.
QUARTER_TIMESTAMP
A date value representing the start of a fiscal quarter.
WEEK_TIMESTAMP
A date value representing the start of a week.
YEAR_TIMESTAMP
A date value representing the start of a year.
STRING
A sequence of characters representing text data.
BOOLEAN
A true or false value representing binary states.
ARRAY
A list of values. The element type appears inside angle brackets, such as ARRAY<STRING>.
inventory: Store-wide inventory totals without location breakdown.inventory_transfers: Stock moves between locations that resolve stockouts.inventory_shipments: Incoming shipments arriving at each location.inventory_adjustment_history: Manual adjustments at each location.