Custom Spend Table

The Custom Spend table aggregates expenses from various categories not otherwise accounted for, including advertising, operational costs, and other expenditures related to your store's operations. Querying this table enables you to analyze your spending patterns across different platforms and campaigns, helping you optimize your budget allocation for better financial management.

📘

Note

event_date is a required field for queries on this table.

Dimensions

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

TitleIDTypeDescription
Event Dateevent_datedateThe date the custom expense was incurred.
Event Dayevent_date.daydateThe day 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.
Event Hourevent_hourstringThe hour of the day the custom expense was incurred, according to a 24-hour clock. Based on the time zone of the shop at the moment the expense was incurred.

Example values: 07, 16, 21
Campaign IDcampaign_idstringThe name or ID of the campaign the custom expense is associated with.

Note: This may match an existing campaign ID in an integrated publisher platform. Edit in Cost Settings > Custom Expenses.

Example values: 23852438666180053, 531011533, 20620285829
Custom Expense CategorycategorystringThe category of the custom expense. Edit in Cost Settings > Custom Expenses.

Example values: Ad Spend, Cashback Booked, Returns Estimate
ChannelchannelstringThe channel or platform related to the custom expense.

Note: This may match an existing integrated ad channel. Edit in Cost Settings > Custom Expenses.

Example values: facebook, social, microsoft
Is Ad Spendis_ad_spendbooleanTrue if the custom expense is considered an advertising expenditure. Edit in Cost Settings > Custom Expenses.
Is Recurringis_recurringbooleanTrue if the custom expense is recurring. Edit in Cost Settings > Custom Expenses.

Note: Only relevant for fixed expenses. NULL for variable expenses.
Variable Expense Base MetricmetricstringThe metric upon which the variable custom expense will be based. Edit in Cost Settings > Custom Expenses.

Note: Only relevant for variable expenses. NULL for fixed expenses.

Example values: Blended Ads, COGS, Orders
Variable Expense RateratestringThe rate applied to the base metric to calculate the custom expense. Edit in Cost Settings > Custom Expenses, in the percent field.

Note: Only relevant for variable expenses. NULL for fixed expenses.

Example value: 0.02
Custom Expense TitletitlestringThe title of the custom expense. Edit in Cost Settings > Custom Expenses.

Example values: Podcast, Influencer

Measures

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

TitleIDTypeDescription
Custom Expense AmountamountnumericThe amount of the expense. By default shown in the shop's currency.

Note: For fixed expenses, the amount is set directly by the seller; for variable expenses, the amount is calculated based on the base metric and rate set by the seller, combined with shop prices from the sales, ad, or email/SMS platform (e.g. Shopify, Facebook, Klaviyo). Edit in Cost Settings > Custom Expenses.

Derived

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

TitleIDTypeDescription
Custom Ad Spendcustom_ad_spendformulaThe total amount of custom expenses marked as ad spend.
Custom Expenses Excluding Ad Spendcustom_excl_ad_spendformulaThe total amount of custom expenses, excluding those marked as ad spend.