Skip to main content
By default, Upstack forwards the event’s own value to your destinations. You can override it so your ad platforms optimize on the value that matters to you — profit instead of revenue, a fixed lead value, or a number you compute yourself. This is the foundation of value‑based bidding. You set this while creating or editing a mapping (see Global event mappings and Destination event mappings). Turn on Override event value, then choose under Set value to.

Value options

OptionWhat it sendsRequirements
Event valueThe value already on the event (the default — no override).
Net RevenueRevenue after discounts and refunds.Shopify order data · purchase events
CM1 (Gross Margin)Net revenue minus product cost (COGS).Shopify order data · purchase events
CM2 (After Fulfillment)CM1 minus shipping, handling, and fees.Shopify order data · purchase events
Fixed valueA set amount you choose (e.g. a flat lead value).
Custom formulaA value you build yourself.See below
The revenue and profit presets are computed per order from your cost settings. They require Shopify order data and apply to purchase events. Value‑bearing events like add_to_cart can use Net Revenue (revenue only — no cost).
Cost- and revenue-based options need Shopify order data. On non‑Shopify accounts you can still use Fixed value or a Custom formula over your own data.* fields.

Custom formula

The formula builder has two modes:
  • Simple builder — start with a value, then adjust it step by step (e.g. Event value × 0.7). Each part is a Metric (a known measure), a Field (a custom event field, entered as data.fieldName), or a Number. Steps apply left to right, like a calculator.
  • Advanced — write the raw formula directly, with autocomplete for variables. Use + − * / and parentheses.

Operands you can reference

OperandMeaningAvailable on
data.valueThe value already on the event.Every event
data.<field>Any custom field on the event (e.g. data.leadValue).Every event
orders.gross_revenueGross revenue before discounts and refunds.Shopify purchase
orders.net_revenueRevenue after discounts and refunds.Shopify purchase
orders.subtotal, orders.tax, orders.discount_amount, orders.refund_amount, orders.unitsOrder revenue components.Shopify purchase
orders.cogs, orders.other_cogsCost of goods sold.Shopify purchase
orders.shipping_cost, orders.handling_cost, orders.other_fulfillment_costFulfillment costs.Shopify purchase
orders.gateway_cost, orders.other_transaction_costTransaction/gateway fees.Shopify purchase
Cost operands (orders.cogs, orders.shipping_cost, …) are only available on purchase events, where full order cost data exists.

Examples

GoalFormula
Send 70% of the event valuedata.value * 0.7
Send profit (revenue minus product cost)orders.net_revenue - orders.cogs
Subtract a flat fee from the valuedata.value - 15
Scale a custom lead valuedata.leadValue * 0.4
A missing field skips the formula — it doesn’t zero your value. If an event doesn’t carry a field your formula references (say data.leadValue on an event that didn’t send it), Upstack skips the override and forwards the event’s own value instead, so a missing field never overwrites a real value with 0. A field that is present but genuinely 0 is used as 0. Still, reference only fields your events reliably send, so the formula applies when you expect it to.

Global event mappings

Create a mapping once and send it to every destination.

Cost settings

Configure the costs behind Net Revenue, CM1, and CM2.

Custom events overview

What custom events are and when to use them.

Approve Meta custom events

Approve and verify custom events in Meta Events Manager.