Shopify marketing engagements: testing cumulative-to-delta migration without double counting
Changing a mode flag can turn a cumulative total into a new increment. Connect the last approved total with the first emitted delta at the transition.
Shopify marketing engagements: testing cumulative-to-delta migration without double counting
Switching cumulative metrics to delta delivery requires more than changing an option. Sending the same number in a different mode can add previously counted performance again. Separate the last cumulative observation at the transition from subsequent differences to explain the relationship between historical totals and new deliveries. [1, 2, 3]
What the primary source establishes
Shopify deprecated isCumulative on marketingEngagementCreate and changed its default to false in API 2026-07. The announcement says existing cumulative activities can migrate to non-cumulative reporting. [1]
The handover decision
For a trial activity, calculate the difference between the last approved cumulative observation and the next observation before sending it. Track retry duplication separately. Keep activity_id, last_cumulative, current_cumulative, and emitted_delta so the same historical performance is not silently added again. [1, 3]
A reference defined before the output
The illustrative cumulative count rises from 20 to 25, so the new delta is 5. Emitting 5 satisfies the transition contract; sending 25 after merely changing the mode counts earlier performance again. The reference is the difference between retained observations, not the transmitted value. [1, 3]
The scoped Truthound check
Truthound Core 3.3.2 can check whether emitted_delta matches current_cumulative minus last_cumulative using ExpressionValidator. A reset of the cumulative baseline requires a separately recorded reason rather than blind application of the same formula. API calls and retry idempotency remain transmission-layer responsibilities. [1, 2, 3]
Limits and alternative choices
The announcement does not itself guarantee retry idempotency or rules for aggregation across activities. Fix the transition point and maintain separate cumulative and delta ledgers for reconciliation. If values are already non-cumulative and never mixed with earlier cumulative activity, a differencing conversion is unnecessary. [1, 3]
Application conditions
Retain the last approved cumulative observation and the current observation for the same activity before preparing the emitted delta.
Alternatives
Fix the transition point and maintain separate cumulative and delta ledgers for reconciliation.
Limitations
The announcement does not itself guarantee retry idempotency or rules for aggregation across activities.
Evidence
- Event checked
- Subject checked
- Modified
