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
Column | Description |
---|---|
store_id | The unique identifier for each store. Each store is tied to exactly one org_id |
org_id | The unique identifier for each retail organization consisting of one or more stores operating with Treez |
org_name | The name of the organization |
store_name | The name of the store where the sale was made |
selltreez_url | The URL of the SellTreez Point of Sale where the sale was made |
store_state | The US state where the store is located, abbreviated (e.g., CA, CO) |
store_timezone | The timezone in which the store operates. This is returned in the Olson format (i.e., America/Los_Angeles) |
datalake_store_id | The store identifier used in a legacy Treez data system |
invoice_created_date | The timestamp when the invoice was created. This is converted to the local timezone of the store |
store_tz_offset | This column represents the timezone offset of the store for the invoice created date |
invoice_id | This column represents the unique identifier of the invoice |
invoice_number | This column represents the numeric identifier assigned to the invoice |
invoice_external_id | The external ID of the invoice. This is used to reference the invoice in external systems |
invoice_status | The status of the invoice. This indicates whether the invoice is fulfilled or not |
invoice_source | The source of the invoice (e.g., MANIFEST, PACKAGE, MANUALLY) |
invoice_inventory_type | The inventory type of the package associated with the invoice line. (e.g., ADULT, MEDICAL, ALL) |
distributor_id | The unique identifier for the distributor connected to the invoice |
distributor_name | The name of the distributor on the distributor profile |
term_id | The unique identifier for the payment terms of the invoice, associated with the terms field |
terms | The human-readable name for the payment terms of the invoice (e.g., Net 30, COD, PIA) |
invoice_line_id | The 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_id | The unique identifier for the cost associated with a specific invoice line |
product_id | This column represents the unique identifier for the product on the invoice line |
product_brand | The brand name from the product profile of the product on the invoice line |
product_name | The name from the product profile of the product on the invoice line |
product_type | This 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_subtype | This 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_skus | This 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_classification | The classification field from the product profile of the product in inventory. (e.g., SATIVA, INDICA, HYBRID, S/I, I/S) |
product_amount | The 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_unitofmeasure | The 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_size | The product size from the product profile of the product sold on the ticket line |
product_size_formatted | This 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_tags | This column contains the internal tags associated with the product in inventory. These tags are used for internal categorization and tracking purposes |
product_external_ids | The External ID(s) associated with the product on the product profile. This is a JSON field |
units_purchased | This 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_unit | This column represents the base cost of each unit of the product purchased in the invoice |
base_cost_total | This column represents the total base cost of the invoice line purchased in the invoice |
fees_per_unit | This column represents any additional fees applied to each unit of the product purchased in the invoice |
fees_total | This column represents the total fees applied to the invoice line |
discounts_per_unit | This column represents the amount of discount applied per unit of the product on the invoice line |
discounts_total | This column represents the amount of discounts applied to the invoice line |
true_cost_per_unit | The 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_total | The total true cost of the invoice line |
excise_tax_per_unit | If excise tax was paid to the distributor, this is the excise tax paid to the distributor per unit on the invoice line |
excise_tax_total | If excise tax was paid to the distributor, this is the total excise tax paid to the distributor for the invoice line |
total_cost_per_unit | This 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_total | This column represents the total cost of the invoice line. It includes the base cost, fees, discounts, and excise tax |
last_sync | A 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_at | This column represents the timestamp when the record in the database was last updated, encoded in the store's local time zone |