Columns
| Column | Description | API Field Name |
|---|---|---|
order_item_id | Primary key and order item unique identifier. | id |
created | The timestamp when the order item record was created. | |
modified | The timestamp when the order item record was last modified. | |
is_deleted | Indicates whether the order item record is deleted. | |
order_id | Foreign key to the order & orders_enriched table. The identifier of the order this item belongs to. | order_id |
item_id | Foreign key to the item & item_enriched table. The identifier of the catalog item for this line item. | item_id |
quantity | The quantity ordered for this line item. | quantity |
unit_price | The unit price for the order item in dollars. Snowflake displays dollars, API returns cents. | unit_price |
handling_fee | The handling fee for this order item in dollars. Snowflake displays dollars, API returns cents. | handling_fee |
status | The current status of the order item (e.g., APPROVAL_NEEDED, APPROVED, CLINIC_CANCELED, CLIENT_CANCELED, SENT_TO_VENDOR, DELIVERED). | status |
is_subscription | Indicates whether this order item is part of a subscription. | is_subscription |
is_pickup | Indicates whether this order item is for pickup (vs shipping). | is_pickup |
patient_id | Foreign key to the patient & client_enriched table. The identifier of the patient associated with the order item. | patient_id |
vendor_subtotal | The vendor subtotal (unit_cost * quantity). Snowflake displays dollars, API returns cents. | vendor_subtotal |
vendor_fees | The fees charged by the vendor for this order item. Snowflake displays dollars, API returns cents. | vendor_fees |
vendor_shipping | The vendor shipping cost including clinic withheld shipping. Snowflake displays dollars, API returns cents. | vendor_shipping |
client_price | The line item subtotal in dollars (unit_price * quantity). Snowflake displays dollars, API returns cents. | client_price |
current_chewy_price | The current Chewy price for the item at the ordered quantity. Snowflake displays dollars, API returns cents. | current_chewy_price |
revenue | The total revenue for this order item. Snowflake displays dollars, API returns cents. | revenue |
profit | The profit for this order item, calculated as total transferrable amount minus vendor cost minus refund debit. Snowflake displays dollars, API returns cents. | profit |
margin | The profit margin percentage, calculated as profit divided by revenue times 100. | margin |
ship_date | The date the order item was shipped. | ship_date |
vc_marketplace_facilitator_tax | The marketplace facilitator tax for this line item in dollars. Snowflake displays dollars, API returns cents. | vc_marketplace_facilitator_tax |
clinic_discounts | The total clinic discount amount applied to this order item in dollars. Snowflake displays dollars, API returns cents. | clinic_discounts |
rebate_discounts | The total rebate discount amount applied to this order item in dollars. Snowflake displays dollars, API returns cents. | rebate_discounts |
diet_fulfillment_fee | The diet fulfillment fee (vendor service fee) for this line item in dollars. Snowflake displays dollars, API returns cents. | diet_fulfillment_fee |
refunded_amount | The total refunded amount for this order item in dollars. Snowflake displays dollars, API returns cents. | refunded_amount |
net_payout | The net payout amount from all order item revenue records with associated payouts. Snowflake displays dollars, API returns cents. | net_payout |
stripe_payouts | Array of Stripe payout objects (stripe_id, created date) associated with this order item. | stripe_payouts |
urgency_fee | The amortized urgency fee for this line item in dollars. Snowflake displays dollars, API returns cents. | urgency_fee |
authorizing_vet_id | Foreign key to the doctor table. The identifier of the prescribing veterinarian. | |
authorizing_vet | The full name of the prescribing veterinarian. | authorizing_vet |
delivered_date | The date the order item was delivered. | delivered_date |
dvm_authorization_date | The date the prescription fill was authorized by a DVM, derived from active prescription fill created date. | dvm_authorization_date |
prescription_id | Foreign key to the prescription & prescription_enriched table. The identifier of the prescription associated with the order item. | prescription_id |
credit_card_processing_fee | The amortized credit card processing fee for this line item in dollars. Snowflake displays dollars, API returns cents. | credit_card_processing_fee |
order_processing_fee | The order processing fee for this line item in dollars. Snowflake displays dollars, API returns cents. | order_processing_fee |
sponsored_refund_amount | The total sponsored refund amount in dollars. Snowflake displays dollars, API returns cents. | sponsored_refund_amount |
vendor_name | The name of the vendor fulfilling this order item. | vendor_name |
loyalty_savings | The loyalty program earnings/savings for this line item in dollars. Snowflake displays dollars, API returns cents. | loyalty_savings |
pharmacy_fulfillment_fee | The pharmacy fulfillment fee (vendor order item fees + vc connect fee) for this line item in dollars. Snowflake displays dollars, API returns cents. | pharmacy_fulfillment_fee |
wholesale_tax | The amortized wholesale tax for this line item in dollars. Snowflake displays dollars, API returns cents. | wholesale_tax |
shipping | The amortized shipping amount for this line item in dollars. Snowflake displays dollars, API returns cents. | shipping |
client_service_fee | The client purchasing/service fee for this line item in dollars. Snowflake displays dollars, API returns cents. | client_service_fee |
last_updated | The timestamp when the order item record was last updated in the source table. This is the most recent timestamp from all related tables. | |
vetcove_corporate_id | The unique identifier of the corporate group associated with this record. |
Relationships
- Order via
order_id - Item via
item_id - Client via
patient_id - Prescription via
prescription_id
SQL Definition
View SQL
View SQL