Design paper
Marketing automation as a constrained decision system: an event-driven design
Abstract
Marketing automation is usually built as a campaign scheduler: segments are computed in batch, rules fire on correlations, and consent, fatigue and fairness are checked after the fact. We describe an alternative design in which every send, offer and channel choice is a decision made by a loop with four parts: event intake with schema and consent contracts, a signal store with quality monitors, estimators that separate causal effect from correlation, and policies that act under explicit constraints on exposure, frequency, latency and privacy. We map each component to the problem it addresses and to the literature it draws on, set out the evaluation protocol the design would need before any claim of effect, and list what it cannot yet show. This is a design proposal, not a measured result.
Method. Design paper: the architecture is argued from the cited literature; we report no measurements of our own. Table 1 maps each design component to the problem it addresses and its source.
1Context and motivation
Most marketing automation is organised around campaigns. Audiences are computed in batch, a schedule decides when messages go out, and rules decide who receives what. Three weaknesses follow from that shape.
First, rules built on observed correlation confuse who would have bought anyway with who was moved by the message. Confounding of this kind is the central problem of causal inference1, and a campaign engine has no place to represent it. Second, the constraints that matter to a recipient (how often they are contacted, whether they consented, whether a group of customers is systematically left out) are checked after the fact, if at all. Third, segments go stale between batch runs, so the system acts on yesterday's state of a buyer.
We propose treating each send, offer, channel and timing choice as a decision taken by a closed loop: sense events as they happen, estimate the effect of each possible action, choose under explicit constraints, act, and record enough to audit the choice later. The rest of this paper describes that loop as a worked design. We name its two halves the Marketing Decision Fabric (MDF), which turns events into trustworthy signals, and the Execution Mesh (EM), which turns signals into constrained actions.
2Design principles
The design follows six principles, each of which constrains the components below.
- Event first. Every meaningful state change is an event with a schema contract and consent and residency flags attached at ingest.
- Causal preference. Where the question is "what would this message change", the system prefers effect estimates from experiments or quasi-experiments over correlational scores1, 2.
- Constraints on the decision path. Consent, frequency, exposure and latency limits are evaluated before each action, not reported afterwards.
- Human review for high-impact changes. Policy changes above an impact threshold set by the operator need sign-off, and every recommendation carries an explanation3.
- Several objectives at once. Conversion, margin, cost to serve, fatigue and trust are scored jointly; no single metric is optimised alone.
- Traceability. Every action can be traced back to the events, features, model version and policy version that produced it4.
3Architecture
3.1Marketing Decision Fabric
Ingest and contracts. Events arrive on a streaming bus and are validated against a schema registry. Each event carries consent and residency tags, an idempotency key and an event time. Stream processing must cope with duplicates and late arrivals; the design uses idempotent consumers and event-time windows with watermarks, standard techniques for data systems of this kind5.
Signal store. Features are served online and offline from the same definitions so that a model is trained on what it will see in production. Each feature records its lineage and a freshness target set per signal.
Signal quality monitors. Each critical field is monitored for null rate, volume anomalies and distribution drift. Drift is measured as the Kullback-Leibler divergence between the current window and a trailing baseline6. Alert and rollback thresholds are configuration, set per signal by the operator; we do not propose universal values.
3.2Execution Mesh
Causal services. These estimate the effect of an action rather than the probability of an outcome. Heterogeneous effects across customer groups are estimated with methods that give valid confidence intervals per subgroup, such as honest causal trees2. Where a market cannot be randomised, synthetic controls build a weighted comparison from untreated units7.
Predictive models. Gradient-boosted trees handle tabular features8. Sequence models based on the Transformer architecture9 handle ordered behavioural events when the decision's latency budget allows them; otherwise the system falls back to the tree model.
Policy engine. Offer, creative and timing choices are made by contextual bandits, which learn from the reward of the chosen action only10. Multi-step journeys (channel, then timing, then offer) are planned with linear or quadratic solvers that enforce spend, inventory and capacity limits.
Safety layer. Before any action leaves the system, it checks consent and residency, frequency caps, exposure constraints and the remaining latency budget. A failed check returns a safe default, never an error to the recipient.
Action connectors. Email, push, in-app, SMS, on-site modules and partner APIs, each with a rollback path and cached fallbacks.
4Signals
The design groups signals into four families, each with its own freshness and quality expectations.
- Behaviour and intent: search queries and reformulations, clickstream, cart edits, wishlists and abandonment, plus session context (device, locale, referral, recency).
- Channel and delivery: opens, clicks, delivery errors, send-time and frequency histories, and fatigue markers such as engagement decay and complaints.
- Commerce and operations: inventory exposure and delivery-promise accuracy, prices and discounts, payment declines and retries, refunds and support contacts.
- External: exchange rates, holidays and local events, and search-trend indices.
Two cautions from the literature shape how these are used. Search-volume data can improve short-term forecasts of economic activity11, but a model built on search trends alone can drift badly when the behaviour behind the searches changes12. External trend signals therefore enter as features alongside first-party behaviour, never as the sole driver of a decision.
The meaning of a behavioural signal also depends on the buyer's stage. In a field experiment, Lambrecht and Tucker found that ads showing the exact products a consumer had viewed were on average less effective than generic ads, and became more effective once the consumer's preferences had narrowed, for example after visiting a review site13. The design therefore treats message specificity as a decision variable that depends on lifecycle state, not as a constant.
5Estimation
5.1Effects, not scores
The causal services answer one question per candidate action: what is the expected difference in outcome if this recipient receives this action rather than the default? Subgroup estimates come with intervals2, and a policy acts on an estimate only when its interval excludes zero by a margin the operator sets. Where no experiment is possible, synthetic controls with placebo checks give a comparison for a whole market7.
5.2Experiments
Experiments remain the reference standard for effect estimates4. Two techniques make them practical in a system that decides continuously. Variance reduction using pre-experiment covariates (CUPED) lets an experiment reach a given precision with less traffic14. Always-valid inference permits continuous monitoring without inflating false positives through repeated peeking15.
5.3Forecasts and explanations
Time-series models provide baselines for send volume, response rates and latency, against which anomalies are judged16. For operators, SHAP attributions on the tree models show which features drove a recommendation3, and influence-shift alerts fire when the top drivers of a model change between periods.
6Decision policies and constraints
6.1Bandits with exposure constraints
Contextual bandits allocate offers, creatives and send times. Exploration is reduced for groups with sparse data and suppressed for recipients in sensitive lifecycle states. A pure reward-maximising bandit can starve some options of exposure; one formal response is to require that each option receives at least a given share of pulls, which Patil and colleagues analyse as a fairness-constrained bandit with bounded regret17. Our design applies the same idea to exposure across customer groups and regions: a policy that would push a group's exposure below its floor is held for review.
6.2Journey planning
Journeys are policies, not templates. Each step re-reads current signals and re-runs the on-path checks (consent, frequency, exposure, latency) before it acts. Eligibility filters for age, legal restrictions and regional policy are applied before any optimisation.
6.3Feedback regulation
Short spikes in response can make a bandit swing exposure sharply. The design damps this with a feedback regulator in the spirit of the adjustment schemes of statistical process control16: exposure changes are smoothed, and rising fatigue signals throttle frequency automatically.
6.4Lifecycle states
Recipients are modelled as a state machine (awareness, consideration, evaluation, purchase, loyalty, churn risk) with transitions triggered by events. Each state has its own policy for message type, offer, channel and cadence. Churn-risk and dispute states favour service messages over offers, since trust in the seller is a documented driver of online purchase intention18.
7Governance, privacy and observability
Every decision is logged with a request ID that links ingest, features, model version, policy version and rendered action. An experiment registry holds each hypothesis, its primary and guardrail metrics and its rollback criteria before launch4. Incident playbooks cover data quality, drift, exposure breaches, latency and fatigue.
Consent and residency are enforced at ingest and again at decision time; opt-outs take effect on the decision path. Data minimisation maps every signal to the decisions that use it, and unused fields are removed. When aggregate results are shared with partners, differential privacy offers a formal bound on what the release reveals about any one person19. The design also excludes manipulative patterns (false urgency, hidden opt-outs) as a matter of policy; we cite no source for that rule because it is our choice, not a finding.
8Design summary
Table 1 lists each component, the problem it addresses, and where the supporting evidence comes from. It is a map of the argument, not a result.
| Component | Problem addressed | Evidence |
|---|---|---|
| Event intake with contracts | Duplicates, late events, schema breaks | 5 |
| Drift monitors | Silent change in input distributions | 6 |
| Heterogeneous effect estimation | Correlation mistaken for effect | 1, 2 |
| Synthetic controls | Markets that cannot be randomised | 7 |
| CUPED and always-valid tests | Slow or biased experiment readouts | 14, 15 |
| Contextual bandits | Allocation under uncertainty | 10 |
| Exposure floors | Options or groups starved of exposure | 17 |
| Feedback regulator | Over-reaction to short spikes | 16 |
| Stage-dependent message specificity | Specific messages shown too early | 13 |
| Trust-first states | Offers sent during disputes or churn risk | 18 |
| Trend signals as features only | Over-reliance on search trends | 11, 12 |
| Private aggregate reporting | Disclosure through partner reports | 19 |
Source: our design, with the works cited in the table.
9Evaluation protocol
We have not measured this design. Before any statement of effect, it would need the following.
- Offline: calibration of the predictive models, sensitivity of the effect estimates to unobserved confounding, and placebo tests for every synthetic control7.
- Online: pre-registered experiments comparing the decision loop with a campaign-style baseline, analysed with always-valid inference15 and CUPED14, with guardrail metrics for latency, unsubscribe rate, complaints and exposure across groups4.
- Replay: simulations of outages, traffic spikes and regulatory changes against recorded event streams.
A hypothetical illustration of the intended behaviour: a store whose payment provider starts declining a card type would see the decline rate rise in the commerce signals; the policy for affected recipients would then switch from a discount message to a message offering another payment method. Whether that switch recovers orders is exactly what the online protocol would have to measure.
10Limitations
- No measurements. Every claim about the design's behaviour is an argument from its structure and from the cited work. We report no effect sizes, latencies or availability figures.
- Unobserved confounding. Effect estimates from observational data rest on assumptions that cannot be fully tested1; natural experiments are uneven across markets.
- Sparse groups. Small customer groups produce wide intervals, so the policy defaults to standard messages for them; that protects them from bad personalisation but also withholds good personalisation.
- Attribution across touches. Multi-step journeys blur which step caused an outcome. The design does not solve multi-touch attribution.
- Fairness definition. Exposure floors are one definition of fairness. They do not ensure equal effect across groups, and the right definition depends on context and law.
- Operator burden. Explanations, review gates and playbooks add work. Whether operators read SHAP attributions correctly is an open human-factors question.
- Adversarial and bot traffic. Bots and spam distort behavioural signals; the design depends on upstream detection that we do not describe here.
11Conclusion
We have described marketing automation as a constrained decision loop: events with contracts, signals with quality monitors, effect estimates in place of correlational scores, and policies bound by consent, frequency, exposure and latency limits. Each component answers a known failure of campaign-style automation and draws on established methods. Whether the loop improves outcomes for recipients and merchants is a question for the evaluation protocol above, not one this paper answers.
References
- 1
Pearl, J. (2009). Causality: Models, reasoning, and inference (2nd ed.). Cambridge University Press. doi.org/10.1017/CBO9780511803161
- 2
Athey, S., & Imbens, G. (2016). Recursive partitioning for heterogeneous causal effects. Proceedings of the National Academy of Sciences. doi.org/10.1073/pnas.1510489113
- 3
Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. Advances in Neural Information Processing Systems 30 (arXiv). arxiv.org/abs/1705.07874
- 4
Kohavi, R., Tang, D., & Xu, Y. (2020). Trustworthy online controlled experiments: A practical guide to A/B testing. Cambridge University Press. doi.org/10.1017/9781108653985
- 5
Kleppmann, M. (2017). Designing data-intensive applications. O'Reilly Media. www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063/
- 6
Kullback, S., & Leibler, R. A. (1951). On information and sufficiency. The Annals of Mathematical Statistics. doi.org/10.1214/aoms/1177729694
- 7
Abadie, A., Diamond, A., & Hainmueller, J. (2010). Synthetic control methods for comparative case studies: Estimating the effect of California's tobacco control program. Journal of the American Statistical Association. doi.org/10.1198/jasa.2009.ap08746
- 8
Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. doi.org/10.1145/2939672.2939785
- 9
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention is all you need. Advances in Neural Information Processing Systems 30 (arXiv). arxiv.org/abs/1706.03762
- 10
Agarwal, A., Hsu, D., Kale, S., Langford, J., Li, L., & Schapire, R. E. (2014). Taming the monster: A fast and simple algorithm for contextual bandits. Proceedings of the 31st International Conference on Machine Learning (arXiv). arxiv.org/abs/1402.0555
- 11
Choi, H., & Varian, H. (2012). Predicting the present with Google Trends. Economic Record. doi.org/10.1111/j.1475-4932.2012.00809.x
- 12
Lazer, D., Kennedy, R., King, G., & Vespignani, A. (2014). The parable of Google Flu: Traps in big data analysis. Science. doi.org/10.1126/science.1248506
- 13
Lambrecht, A., & Tucker, C. (2013). When does retargeting work? Information specificity in online advertising. Journal of Marketing Research. doi.org/10.1509/jmr.11.0503
- 14
Deng, A., Xu, Y., Kohavi, R., & Walker, T. (2013). Improving the sensitivity of online controlled experiments by utilizing pre-experiment data. Proceedings of the Sixth ACM International Conference on Web Search and Data Mining. doi.org/10.1145/2433396.2433413
- 15
Johari, R., Koomen, P., Pekelis, L., & Walsh, D. (2017). Peeking at A/B tests: Why it matters, and what to do about it. Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. doi.org/10.1145/3097983.3097992
- 16
Box, G. E. P., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time series analysis: Forecasting and control (5th ed.). Wiley. www.wiley.com/en-us/Time+Series+Analysis%3A+Forecasting+and+Control%2C+5th+Edition-p-9781118675021
- 17
Patil, V., Ghalme, G., Nair, V., & Narahari, Y. (2021). Achieving fairness in the stochastic multi-armed bandit problem. Journal of Machine Learning Research, 22. jmlr.org/papers/v22/20-704.html
- 18
Gefen, D., Karahanna, E., & Straub, D. W. (2003). Trust and TAM in online shopping: An integrated model. MIS Quarterly. doi.org/10.2307/30036519
- 19
Dwork, C., & Roth, A. (2014). The algorithmic foundations of differential privacy. Foundations and Trends in Theoretical Computer Science. doi.org/10.1561/0400000042
Cite this paper
Tanqory Research (2025). Marketing automation as a constrained decision system: an event-driven design. Tanqory. https://tanqory.com/research/20251230-marketing-automation-decision-system