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.

IDTypeDescription
event_datedateThe date the order was placed. Based on the time zone of the shop at the moment of purchase.
event_date.daydateThe day on which the order was placed. Derived from event_date.
event_date.weekdateThe Sunday of the week during which the order was placed. Derived from event_date.
event_date.monthdateThe month during which the order was placed. Derived from event_date.
event_date.quarterdateThe first month of the quarter during which the order was placed. Derived from event_date.
event_date.yeardateThe year during which the order was placed. Derived from event_date.
event_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
created_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
cancelled_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
shop_timezonestringThe timezone of the shop. Time zone designations are according to the tz database.
order_idstringThe unique order ID. Assigned by the shop platform.

Example value: 4930225799243
order_namestringThe name of the order. Assigned by the seller in the shop platform.

Example values: #2188464, Ex-2163819-9
source_namestringThe name of the source. Assigned by the seller in the shop platform.

Example values: web, 1520611
customer_idstringThe unique customer ID. Assigned by the shop platform.

Example value: 5209503793328
is_new_customerbooleanTrue if this is the customer's first order (calculated by Triple Whale based on customer ID).
customer_first_namestringThe customer’s first name.
customer_last_namestringThe customer’s last name.
customer_emailstringThe customer’s email address.
customer_from_country_codestringThe country of the shipping address, as a two-character country code. See list of country codes.
customer_from_state_codestringThe state/province of the shipping address.
customer_from_citystringThe city of the shipping address.
integration_shipping_statusstringThe shipping status of the order.
discount_codestringThe discount code or promotion name used in the order.

Note: If an order has multiple discount codes, only the first code is retrieved.
discount_typestringThe type of discount customer received in the order (e.g., product discount or shipping discount).
products_inforecord repeatedInformation about the product(s) associated with the order. There may be multiple products per order.
products_info.product_idstringThe unique ID of the product in the shop (not order-specific). Assigned by the shop platform.

Example value: 3891505496131
products_info.product_namestringName of the product.
products_info.product_skustringStock keeping unit of the product.
products_info.variant_idstringThe unique ID of the product variant in the shop (not order-specific). Assigned by the shop.

Example value: 29275946877001
products_info.is_gift_cardbooleanTrue if the product purchased is a gift card.
products_info.product_name_pricenumericThe product's price (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 Triple Whale Admin.
products_info.discount_amount_for_productnumericThe amount discounted from the product price in this order. By default shown in the shop's currency.
products_info.product_name_quantity_soldnumericThe quantity of the product sold in the order.
products_info.single_product_costnumericThe cost of goods sold for the product. By default shown in the shop's currency.

Data sourcing varies as follows:

- For Shopify, the single product cost is set in the store and imported directly, or configured in Triple Whale admin under the costs settings tab.
- For Amazon, the single product cost is set in Triple Whale admin under the costs settings tab.
tagsrepeated stringThe tags associated with the order.
customer_tagsrepeated stringTags associated with the customer.

Example values: Active Subscriber, PayPal_user, Login with FB
is_subscription_orderbooleanTrue if the order is a subscription order.
is_first_order_in_subscriptionbooleanTrue if the order is the first in a subscription order.
platformstringThe sales platform where the order was processed.

Example values: shopify, amazon
amazon_marketplace_idstringThe Amazon marketplace ID for the marketplace associated with the order. See list of marketplace IDs.
amazon_fulfillment_statusstringThe fulfillment status of the Amazon order (Pending, Unshipped, PartiallyShipped, Shipped, Canceled, Unfulfillable, InvoiceUnconfirmed, PendingAvailability).
amazon_fulfillment_channelstringThe fulfillment channel of the Amazon order (FBA, FBM).

Measures

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

TitleIDTypeDescription
Units Soldproduct_quantity_sold_in_ordernumericThe total number of individual product units sold in the order.
Order Revenueorder_revenuenumericThe total revenue after adjustments such as discounts, shipping, fees, and taxes (but before refunds).

Order Revenue = Gross Sales - Discounts + Shipping + Tax
Gross Salesgross_product_salesnumericThe total revenue before adjustments such as discounts, shipping, fees, taxes, and refunds.

Gross Sales = Product Price x Units Sold
Shipping Priceshipping_pricenumericThe total shipping price of the order, including shipping taxes and shipping discounts.
Refundsrefund_moneynumericRefunds processed during the selected time period.

Note that Triple Whale does not track refunds processed by 3rd-party return-management apps (e.g. Loop), so there may be variance relative to Shopify analytics.
TaxestaxesnumericAmount customers paid in taxes (excluding refunded taxes)
Shipping Costsshipping_costsnumericShipping costs paid by the seller for orders within the select timeframe.

Edit these in: Store > Shipping
Estimated Shipping Costsestimated_shipping_costsnumericEstimated shipping costs paid by the seller for orders within the select timeframe.

Edit these in: Store > Shipping
Payment Gateway Costspayment_gateway_costsnumericPayment processing fees (not including currency conversion fees).

Edit these in: Store > Gateway Costs
Cost of Goods (COGS)cost_of_goodsnumericThe cost of goods sold within the selected time frame (before refunds).

Imported from the main sales platform (MSP), or edit in: Store > Cost of Goods.
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: Store > Cost of Goods
Discountsdiscount_amountnumericThe total discount amount applied to the order, including shipping discounts.
Amazon Estimated Feesamazon_estimated_feesnumericThe estimated fees to be charged by Amazon for the order, based on products purchased. This amount is an estimate and is not final until Amazon reports on actual fees.

Derived

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

TitleIDTypeDescription
Ordersorders_countformulaThe total number of orders placed within the selected timeframe.
Non-Zero Ordersorders_with_amountformulaThe total number of orders with a revenue greater than zero.
New Customer Ordersnew_customer_ordersformulaNumber of orders placed by New Customers.

Note that Triple Whale identifies all customers as either new or returning, while in Shopify some remain unidentified (“N/A”), so there may be variance between the two.
Returning Customer Ordersreturning_customer_ordersformulaNumber of orders placed by Returning Customers.

Note that Triple Whale identifies all customers as either new or returning, while in Shopify some remain unidentified (“N/A”), so there may be variance between the two.
Average Order Value (AOV)aovformulaAOV = (Order Revenue - Shipping Price - Taxes) / Number of Orders
New Customers %new_customers_percentformulaPercentage of orders placed by New Customers.
Returning Customers %returning_customers_percentformulaPercentage of orders placed by Returning Customers.
New Customer Revenuenew_customer_revenueformulaAmount of revenue derived from New Customers.

Note that Triple Whale identifies all customers as either new or returning, while in your main shop platform some remain unidentified (“N/A”), so there may be variance between the two.
Returning Customer Revenuereturning_customer_revenueformulaAmount of revenue derived from Returning Customers.

Note that Triple Whale identifies all customers as either new or returning, while in Shopify some remain unidentified (“N/A”), so there may be variance between the two.
True Average Order Value (True AOV)true_aovformulaTrue AOV = (Order Revenue - Shipping Price - Taxes) / Number of Orders > $0
Unique Customersunique_customersformulaNumber of unique customers within the selected timeframe.