@apex-inc/sdk 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -181,7 +181,11 @@ data: {
|
|
|
181
181
|
data: { order_id: "ord_123", value: 99.0, currency: "USD", cost: 48.5 }
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
`unit_cost` aliases: `
|
|
184
|
+
`unit_cost` aliases: `unitCost`, `item_cost`. All three are PER UNIT — Apex
|
|
185
|
+
multiplies by `quantity`. Do not send a line total under any of them, and note
|
|
186
|
+
that `cost` is **not** an alias at the line level: it means an order total, so
|
|
187
|
+
sending a $150 line total as `cost` on a line with `quantity: 3` would be read
|
|
188
|
+
as $450. If you only know the total, use the order-level shape above. Cost is
|
|
185
189
|
never inferred — omit it and every channel is measured and ranked on LTV:CAC,
|
|
186
190
|
which is a complete answer on its own.
|
|
187
191
|
|
|
@@ -191,8 +195,18 @@ and it contributes to LTV:CAC only. This matters most during a rollout: if you
|
|
|
191
195
|
instrument 70 of 100 SKUs, a mixed order would otherwise report the cost of the
|
|
192
196
|
70% as if it were the whole order, which inflates gross profit rather than
|
|
193
197
|
leaving it blank. Send `cost` at the order level if per-item cost isn't
|
|
194
|
-
available for every line.
|
|
195
|
-
|
|
198
|
+
available for every line.
|
|
199
|
+
|
|
200
|
+
**How partial coverage is handled.** Apex measures your margin on the orders
|
|
201
|
+
where every item reported a cost, then applies that margin rate to all of the
|
|
202
|
+
channel's revenue. Each channel's LTGP:CAC states the share of revenue the
|
|
203
|
+
margin was measured on, so a partial rollout reads as a small sample rather than
|
|
204
|
+
a wrong number — and LTGP:CAC can never come out above LTV:CAC.
|
|
205
|
+
|
|
206
|
+
**Refunds reverse gross profit.** Send `order_id` on the refund event (or link
|
|
207
|
+
it to the original charge) and Apex reverses that order's margin in proportion
|
|
208
|
+
to the amount refunded. A refund with no way to identify the original order
|
|
209
|
+
still reduces revenue, but leaves the margin untouched.
|
|
196
210
|
|
|
197
211
|
## Event naming conventions
|
|
198
212
|
|