Orders Table

orders_table

The Orders table contains detailed data on each order, including transaction dates, product details, customer information, and sale amounts. Querying this table can provide insights into sales trends, customer buying behavior, and product performance.

📘

Note

event_date is a required field for queries on this table, and refers to the date of the order.

Dimensions

Dimensions are immutable properties that can be used for grouping data.

TitleIDTypeDescription
Event Hourevent_hourstringThe hour of the day the order was placed, according to a 24-hour clock. Based on the time zone of the shop at the moment of purchase.

Example values: 07, 16, 21
Event Dateevent_datedateThe date the order was placed. Based on the time zone of the shop at the moment of purchase.
Event Dayevent_date.daydateThe day on which the event occurred. Derived from event_date.
Event Weekevent_date.weekdateThe Sunday of the week during which the event occurred. Derived from event_date.
Event Monthevent_date.monthdateThe month during which the event occurred. Derived from event_date.
Event Quarterevent_date.quarterdateThe first month of the quarter during which the event occurred. Derived from event_date.
Event Yearevent_date.yeardateThe year during which the event occurred. Derived from event_date.
Amazon Fulfillment Channelamazon_fulfillment_channelstringThe fulfillment channel of the Amazon order.

Example values: FBA, FBM
Amazon Fulfillment Statusamazon_fulfillment_statusstringThe fulfillment status of the Amazon order.

Example values: Pending, Unshipped, PartiallyShipped, Shipped, Canceled, Unfulfillable, InvoiceUnconfirmed, PendingAvailability
Amazon Is Business Orderamazon_is_business_orderbooleanIndicates if the order is a business order on Amazon.

Possible values: true, false
Amazon Marketplace IDamazon_marketplace_idstringThe Amazon marketplace ID for the marketplace associated with the order. See list of marketplace IDs.
Canceled Datecancelled_attimestampThe time at which the order was canceled. Formatted according to the ISO 8601 international standard. NULL if the order was not canceled.

Example value: 2023-06-15T19:26:30.000Z
Order Created Datecreated_attimestampThe time at which the order record was created. Formatted according to the ISO 8601 international standard.

Example value: 2022-06-15T19:26:30.000Z
Customer Emailcustomer_emailstringThe customer's email address.

Example value: [email protected]
Customer First Namecustomer_first_namestringThe customer's first name.

Example value: John
Customer Citycustomer_from_citystringThe city of the customer's shipping address.

Example value: San Francisco
Customer Countrycustomer_from_country_codestringThe country code of the customer's shipping address, according to ISO 3166-1 alpha-2. See list of country codes.

Example value: US
Customer Statecustomer_from_state_codestringThe state or province of the customer's shipping address.

Example value: CA
Customer IDcustomer_idstringThe unique identifier for the customer, assigned by the main sales platform.

Example value: 5209503793328
Customer Last Namecustomer_last_namestringThe last name of the customer.

Example value: Doe
Customer Tagscustomer_tagsrepeated stringTags associated with the customer, set in the main sales platform.

Example values: Active Subscriber, PayPal_user, Login with FB
Discount Codediscount_codestringThe discount code or promotion name used in the order. Set by the seller in the main sales platform.

Example values: WELCOME10, Replacement for defective item, 807QRWMNK2
Discount Typediscount_typestringThe type of discount received by the customer in the order.

Example values: fixed_amount, percentage
Fulfillment Statusfulfillment_statusstringThe fulfillment status of the order.

Example values: fulfilled, partial, restocked
Integration Shipping Statusintegration_shipping_statusstringThe shipping status of the order, according to the integrated shipping provider.

Example values: LabeledCreated, Completed
Is First Order in Subscriptionis_first_order_in_subscriptionbooleanTrue if the order is the first in a subscription series.

Possible values: true, false
Is New Customeris_new_customerbooleanTrue if this is the customer's first order.

Possible values: true, false

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.
Is Subscription Orderis_subscription_orderbooleanTrue if the order is part of a subscription.

Possible values: true, false
Order IDorder_idstringThe unique order ID, assigned by the main sales platform.

Example value: 4930225799243
Order Nameorder_namestringThe name of the order as assigned by the seller on the main sales platform.

Example values: #2188464, Ex-2163819-9
Sales PlatformplatformstringThe sales platform where the order was processed.

Example values: Shopify, BigCommerce, WooCommerce, Amazon
Productsproducts_inforecord repeatedDetails about the products associated with the order (at the level of the variant), including name, product ID, variant ID, type, SKU, etc.
Product IDproducts_info.product_idstringThe unique ID of the product as set within the main sales platform.

Example value: 3891505496131
Product Nameproducts_info.product_namestringThe name of the product as set within the main sales platform.

Example values: Green Soft Socks 3-Pack, Paring Knife Travel Case, Gift Subscription
Product Typeproducts_info.product_typestringThe product type as set within the main sales platform.

Example values: Jackets, Coffee Mugs, Books
Product SKUproducts_info.product_skustringThe SKU (Stock Keeping Unit) for the product as set within the main sales platform.

Example values: GP-BACK-02, A02630, POP200NAVY
Product Variant IDproducts_info.variant_idstringThe unique identifier for a specific variant of a product as set within the main sales platform.

Example value: 29275946877001
Is Gift Cardproducts_info.is_gift_cardbooleanTrue if the product purchased is a gift card.

Possible values: true, false
Product Priceproducts_info.product_name_pricenumericThe price of a single product (to the buyer), before discounts. By default shown in the shop's currency.

Note: Tax will be included in the product price if the seller has configured the sale to require taxes in the main sales platform.
Product Discountproducts_info.discount_amount_for_productnumericThe amount discounted from the product price. By default shown in the shop's currency.
Product Units Soldproducts_info.product_name_quantity_soldnumericThe total number of individual units sold for the product.
Product Costproducts_info.single_product_costnumericThe cost of a single product (to the seller). By default shown in the shop's currency.
Shipping Providershipping_provider_idstringThe integrated shipping provider that manages and processes the order's shipment.

Example values: shipbob, shipstation
Shop Timezoneshop_timezonestringThe designated timezone of the shop according to the timezone database.
Sourcesource_namestringThe origin of the order as designated by the seller on the main sales platform.

Example values: web, pos, tiktok
Tagstagsrepeated stringTags associated with the order, assigned by the seller on the main sales platform.

Example values: Upsell, Order Credits, discount_eligible
Transactionstransactionsrecord repeatedDetails about transactions associated with the order, including payment information and status.
Transaction Created Datetransactions.created_attimestampThe time at which the transaction record was created. Formatted according to the ISO 8601 international standard.

Example value: 2024-12-25 11:30:09
Transaction Processed Datetransactions.processed_attimestampThe time at which the transaction was processed. Formatted according to the ISO 8601 international standard.

Example value: 2024-12-25 11:30:09
Transaction Payment Gatewaytransactions.payment_gateway_namestringThe payment gateway used for the transaction.

Example values: shopify_payments, paypal, gift_card
Transaction Currencytransactions.currencystringThe currency in which the transaction was processed.

Example values: USD, EUR
Transaction Statustransactions.statusstringThe status of the transaction.

Example values: SUCCESS, FAILURE, AWAITING_RESPONSE, PENDING, ERROR
Transaction Amounttransactions.amountnumericThe amount of the transaction.
Transaction Feestransactions.feesnumericThe fees associated with the transaction.

Measures

Measures are numeric fields that can be aggregated and/or combined to calculate new metrics.

TitleIDTypeDescription
Amazon Estimated Feesamazon_estimated_feesnumericThe estimated fees to be charged by Amazon for the order, based on products purchased.

Note that this amount is an estimate and is not final until Amazon reports on actual fees.
Cost of Goods (COGS)cost_of_goodsnumericThe cost of goods for orders within the selected time frame (before refunds).

Imported from the main sales platform, or edit these in Cost Settings > Cost of Goods.
Order-Level Custom Expensescustom_expensesnumericAdditional custom expenses associated with individual orders.

Import these using the Enrich Orders Data API endpoint.
Discountsdiscount_amountnumericThe total discount amount applied to the order, including shipping discounts.
Estimated Shipping Costsestimated_shipping_costsnumericEstimated shipping costs paid by the seller for orders within the select timeframe.

Edit these in: Cost Settings > Shipping
Gross Salesgross_product_salesnumericThe total revenue, before adjustments such as discounts, shipping, fees, taxes, and refunds.

Gross Sales = Product Price x Units Sold
Handling Feeshandling_feesnumericHandling fees (e.g. boxing, packaging, or “pick & pack” services) paid by the seller for orders in the selected time frame.

Edit these in Cost Settings > Cost of Goods.
Order Revenueorder_revenuenumericThe total revenue after adjustments such as discounts, shipping, fees, and taxes (but before refunds).

Order Revenue = Gross Sales - Discounts + Shipping + Tax
Payment Gateway Costspayment_gateway_costsnumericPayment processing fees (not including currency conversion fees) paid by the seller.

Edit these in Cost Settings > Gateway Costs.
Units Soldproduct_quantity_sold_in_ordernumericThe total number of individual product units sold in the order.
Refundsrefund_moneynumericRefund value processed during the selected time period, based on the order date (not including refunded cost of goods, taxes, and shipping).

Note that Triple Whale does not track refunds from third-party return management apps (e.g., Loop), so totals may vary from the main sales platform.
Shipping Costsshipping_costsnumericShipping costs paid by the seller for orders within the select timeframe.

Edit these in Cost Settings > Shipping.
Shipping Priceshipping_pricenumericThe total shipping price of the order (paid by the buyer), including shipping taxes and shipping discounts.
TaxestaxesnumericAmount customers paid in taxes (excluding refunded taxes).

Derived

Derived fields are metrics that are pre-calculated using multiple measures or advanced formulas.

TitleIDTypeDescription
Average Order Value (AOV)aovformulaThe average order value, excluding shipping and taxes, as reported by the main sales platform.

AOV = (Order Revenue - Shipping Price - Taxes) / Number of Orders
New Customer Ordersnew_customer_ordersformulaThe total number of orders placed by new customers within the selected time frame.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.
New Customer Revenuenew_customer_revenueformulaThe total revenue derived from orders by new customers.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.
New Customers Percentnew_customers_percentformulaThe percentage of purchases made by new customers.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.

New Customers % = Number of New Customer Orders / Total Orders
OrdersordersformulaThe total number of orders placed within the selected timeframe.
Non-Zero Ordersorders_with_amountformulaThe total number of orders with a revenue greater than zero.

Non-Zero Orders = Count of Orders where Order Revenue > $0
Returning Customer Ordersreturning_customer_ordersformulaNumber of orders placed by Returning Customers.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.
Returning Customer Revenuereturning_customer_revenueformulaAmount of revenue derived from Returning Customers.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.
Returning Customers Percentreturning_customers_percentformulaPercentage of orders placed by Returning Customers.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.

Returning Customers % = Number of Returning Customer Orders / Total Orders
True Average Order Value (True AOV)true_aovformulaThe average non-zero order value, excluding shipping and taxes, as reported by the main sales platform.

True AOV = (Order Revenue - Shipping Price - Taxes) / Number of Orders > $0
Unique Customersunique_customersformulaNumber of unique customers who placed orders within the selected timeframe.