Inventory Log

The Inventory Log dataset contains each inventory log entry for each batch of inventory along with the relevant attributes about the product, batch, employees, inventory locations, and more. The log action is used to denote the type of change that occurred in the inventory.

Primary Key: org_id, store_id, log_date, inventory_log_id, log_action

ColumnDescription
store_idThe unique identifier for each store. Each store is tied to exactly one org_id.
org_idThe unique identifier for each retail organization consisting of one or more stores operating with Treez.
org_nameThe name of the organization.
store_nameThe name of the store where the sale was made.
selltreez_urlThe URL of the SellTreez Point of Sale where the sale was made.
store_stateThe US state where the store is located, abbreviated (e.g., CA, CO).
store_timezoneThe timezone in which the store operates. This is returned in the Olson format (i.e., America/Los_Angeles).
datalake_store_idThe store identifier used in a legacy Treez data system.
log_dateThis column represents the timestamp when the log was created. It is a timestamp with timezone value that follows the standard timestamp format
next_log_dateThe timestamp of the next log entry in the inventory log. This field is useful for tracking the sequence of inventory changes
store_tz_offsetThe timezone offset of the store. This is calculated as the difference in hours between UTC and the store's local timezone. This field is useful for converting timestamps to the store's local time
batch_idThe human-readable batch identifier for the batch of inventory from which the ticket line product was sold
inventory_idThe unique identifier for the inventory batch
inventory_log_idA synthetic identifier for the specific log record
product_idThis column represents the unique identifier for the product in inventory
product_brandThe brand name from the product profile of the product in inventory
product_nameThe name from the product profile of the product in inventory
product_menu_titleThe menu title from the product profile of the product sold on the ticket line
product_typeThis column represents the type of the product from the product profile. (e.g., FLOWER, CARTRIDGE, EDIBLE, PREROLL, EXTRACT, PILL, TINCTURE, TOPICAL, BEVERAGE, MERCH, CBD, PLANT, MISC, NON-INV)
product_subtypeThis column represents the sub-type or sub-category of the product. Each sub-type is tied to a parent product type. (e.g., PRE-PACK, GUMMY, 510 THREAD, POD, SAUCE)
log_actionThe action associated with the specific inventory log. (e.g., POS Sale, Abandon Ticket, Move, Count Adjustment, Invoice Received, Merge Product, Created From Batch Split)
quantity_beforeThis column represents the inventory quantity of the batch of inventory prior to the log action
quantity_changedThis column represents the inventory quantity of the batch of inventory that changed due to the associated log action
quantity_afterThis column represents the inventory quantity of the batch of inventory after the log action
cost_per_unitThe cost per unit paid to the distributor
true_cost_per_unitThe true cost per unit paid to the distributor. This is calculated as the cost per unit minus any vendor discounts or credits
excise_tax_per_unitIf excise tax was paid to the distributor, this is the excise tax portion of the cost on the invoice line associated with the inventory batch
cost_of_change_with_exciseThis column represents the cost of inventory impacted by the inventory action, including any excise tax paid to the distributor
cost_of_change_without_exciseThis column represents the cost of inventory impacted by the inventory action, excluding any excise tax paid to the distributor
location_originalThe name of the inventory location where the inventory batch was prior to the log action
location_newThe name of the inventory location where the inventory batch was after the log action
employee_idThe unique identifier for the employee who performed the log action
employee_nameThe name of the employee who performed the log action
employee_numberThe employee number on the employee profile associated with the employee who performed the log action
reasonThe reason for the log action, as documented by the employee for specific log actions such as destroying inventory
invoice_idThis column represents the unique identifier for the invoice containing the original package of inventory associated with the inventory batch
invoice_numberThis column represents the numeric identifier assigned to the invoice containing the package of inventory associated with the inventory batch
invoice_external_idThe external ID of the invoice associated with the inventory log. This ID is used for cross-referencing with external systems
invoice_line_idThe unique identifier for each line item in an invoice. This ID is used to track individual products or services listed on an invoice
credit_note_idThe unique identifier for the credit note associated with the inventory log. Note that this has not been enabled for all stores. Please reach out to [email protected] if you need this field
distributor_nameThe name of the distributor on the distributor profile
package_labelThe package label of the original package containing the batch of inventory. For METRC states, this is the package tag barcode or state tracking ID
package_manifest_numberThe shipment manifest number associated with the package containing the batch of inventory from which the ticket line product was sold
dispensary_licenseThe dispensary state license associated with the inventory batch that was received. This may be different for states that do medical and adult-use sales
inventory_typeThe inventory type of the batch in which the ticket line product was sold out of. (e.g., ADULT, MEDICAL, ALL)
packaged_dateThe date when the units in the inventory batch were packaged
expiration_dateThe expiration date of the units in the batch of inventory
harvest_dateThe date when the units in the batch of inventory were harvested
inventory_barcodesThe barcodes associated with the batch of inventory as defined in Inventory Control
product_barcode_skusThis column represents the SKU numbers associated with the product barcodes on the product profile. If a product has multiple barcode SKUs, they will be separated by commas
product_classificationThe classification field from the product profile of the product in inventory. (e.g., SATIVA, INDICA, HYBRID, S/I, I/S)
product_unit_priceThe unit price associated with the product on the product profile at the time of the inventory log action
product_unit_total_flower_weight_gramsThe total flower grams from the product profile of the product in inventory, typically used for purchase limit enforcement
product_amountThe amount field from the product profile of the product in inventory. This field is used in conjunction with the Unit of Measure field
product_unitofmeasureThe unit of measure field from the product profile of the product in inventory. This field is used in conjunction with the Amount field. (e.g., g, mg, ml, fl-oz, each)
product_size_formattedThis is a calculated field that combines Product Amount and Unit of Measure fields and formats them into rounded amounts and consistent unit of measures. (e.g., 1g, 100mg, 1ml, 1fl-oz, 1 each)
product_internal_tagsThis column contains the internal tags associated with the product in inventory. These tags are used for internal categorization and tracking purposes
product_sizeThe product size from the product profile of the product in inventory
product_external_idsThe External ID(s) associated with the product on the product profile. This is a JSON field
product_unit_thc_mgThe amount of THC in milligrams of the product in inventory, typically used for purchase limit enforcement
product_unit_cbd_mgThe amount of CBD in milligrams of the product in inventory, typically used for purchase limit enforcement
product_extraction_methodThe Extraction Method of the product on the product profile. This is typically used for cartridges and extracts
last_syncA timestamp field that records the last time the data was synchronized into the Treez Data Warehouse. This is useful for tracking data changes and updates. To check for new or changed records, query for records where the last_sync timestamp is greater than the greatest timestamp in your data store
record_loaded_atThis column represents the timestamp when the record in the database was last updated, encoded in the store's local time zone