Invoice Products

The Invoice Products dataset provides a detailed view of the products associated with each invoice line item. It contains information about the invoice, distributor, products, quantity purchased, cost, taxes, and other relevant details.

Primary Key: org_id, store_id, invoice_id, invoice_line_id

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
invoice_created_dateThe timestamp when the invoice was created. This is converted to the local timezone of the store
store_tz_offsetThis column represents the timezone offset of the store for the invoice created date
invoice_idThis column represents the unique identifier of the invoice
invoice_numberThis column represents the numeric identifier assigned to the invoice
invoice_external_idThe external ID of the invoice. This is used to reference the invoice in external systems
invoice_statusThe status of the invoice. This indicates whether the invoice is fulfilled or not
invoice_sourceThe source of the invoice (e.g., MANIFEST, PACKAGE, MANUALLY)
invoice_inventory_typeThe inventory type of the package associated with the invoice line. (e.g., ADULT, MEDICAL, ALL)
distributor_idThe unique identifier for the distributor connected to the invoice
distributor_nameThe name of the distributor on the distributor profile
term_idThe unique identifier for the payment terms of the invoice, associated with the terms field
termsThe human-readable name for the payment terms of the invoice (e.g., Net 30, COD, PIA)
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
invoice_line_cost_idThe unique identifier for the cost associated with a specific invoice line
product_idThis column represents the unique identifier for the product on the invoice line
product_brandThe brand name from the product profile of the product on the invoice line
product_nameThe name from the product profile of the product on the invoice 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)
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_amountThe amount field from the product profile of the product on the invoice line. 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 on the invoice line. This field is used in conjunction with the Amount field. (e.g., g, mg, ml, fl-oz, each)
product_sizeThe product size from the product profile of the product sold on the ticket line
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_external_idsThe External ID(s) associated with the product on the product profile. This is a JSON field
units_purchasedThis column contains the number of units of the product on the invoice line that were purchased as a part of the associated invoice
base_cost_per_unitThis column represents the base cost of each unit of the product purchased in the invoice
base_cost_totalThis column represents the total base cost of the invoice line purchased in the invoice
fees_per_unitThis column represents any additional fees applied to each unit of the product purchased in the invoice
fees_totalThis column represents the total fees applied to the invoice line
discounts_per_unitThis column represents the amount of discount applied per unit of the product on the invoice line
discounts_totalThis column represents the amount of discounts applied to the invoice line
true_cost_per_unitThe true cost of each unit of the product on the invoice line. This is calculated as the cost per unit minus any vendor discounts or credits
true_cost_totalThe total true cost of the invoice line
excise_tax_per_unitIf excise tax was paid to the distributor, this is the excise tax paid to the distributor per unit on the invoice line
excise_tax_totalIf excise tax was paid to the distributor, this is the total excise tax paid to the distributor for the invoice line
total_cost_per_unitThis column represents the total cost per unit of the product on the invoice line. It includes the base cost, fees, discounts, and excise tax per unit
total_cost_totalThis column represents the total cost of the invoice line. It includes the base cost, fees, discounts, and excise tax
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