Custom Spend Table
The Custom Spend table provides daily allocations for custom expenses in Cost Settings > Custom Expenses. One row per expense allocation per event date, only within each expense's date range.
Table GuideWhat You Can Answer With This Table
- How much custom expense was incurred, by category, channel, or campaign? — use
amount,category,channel- Which of my custom expenses are contributing to ad spend, and how much? — use
is_ad_spend,amount- What are my variable expenses, and how much did each cost over a time period? — use
metric,rate,amount,event_dateBefore You Query
- Required field:
event_date- Selecting
event_hourreturns hourly allocations instead of daily rows.When to Use a Different Table
- Use Orders table when you need
custom_expensesattached to individual orders through Enrich Orders Data. The Custom Spend table is for store-level Cost Settings rules and dated expense allocations.
Dimensions
Dimensions are immutable properties that can be used for grouping data.
| Title | ID | Type | Description |
|---|---|---|---|
| Event Hour | event_hour | string | The hour of the day the custom expense was incurred, according to a 24-hour clock. Based on the shop time zone at the moment of the event (or the user time zone, if no sales platform is connected). Example values: |
| Event Date | event_date | date | The date the custom expense was incurred. Based on the shop time zone at the moment of the event (or the user time zone, if no sales platform is connected). |
| Event Day | event_date.day | date | The day the event occurred. Derived from event_date. |
| Event Week | event_date.week | date | The Sunday of the week during which the event occurred. Derived from event_date. |
| Event Month | event_date.month | date | The month during which the event occurred. Derived from event_date. |
| Event Quarter | event_date.quarter | date | The first month of the quarter during which the event occurred. Derived from event_date. |
| Event Year | event_date.year | date | The year during which the event occurred. Derived from event_date. |
| Campaign ID | campaign_id | string | The name or ID of the campaign the custom expense is associated with. Note: This may match an existing campaign ID in an integrated ad platform. Edit in Cost Settings > Custom Expenses. Example values: |
| Custom Expense Category | category | string | The category of the custom expense. Edit in Cost Settings > Custom Expenses. Example values: |
| Channel | channel | string | The 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: |
| Is Ad Spend | is_ad_spend | boolean | True if the custom expense is considered an advertising expenditure. Edit in
|
| Is Recurring | is_recurring | boolean | True 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 Metric | metric | string | The 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: |
| Variable Expense Rate | rate | string | The 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: |
| Shop ID | shop_id | string | The unique ID of the shop (often corresponds to the shop domain). Can be used to group or filter data by shop in multi-store reports. Example values: |
| Shop Name | shop_name | string | The name of the shop. Can be used to group or filter data by shop in multi-store reports. Example values: |
| Custom Expense Title | title | string | The title of the custom expense. Edit in Cost Settings > Custom Expenses. Example values: |
Measures
Measures are numeric fields that can be aggregated and/or combined to calculate new metrics.
| Title | ID | Type | Description |
|---|---|---|---|
| Custom Expense Amount | amount | numeric | The 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.
| Title | ID | Type | Description |
|---|---|---|---|
| Custom Ad Spend | custom_ad_spend | formula | The total amount of custom expenses marked as ad spend. |
| Custom Expenses Excluding Ad Spend | custom_excl_ad_spend | formula | The total amount of custom expenses, excluding those marked as ad spend. |
Updated about 3 hours ago