ARCHOS 525 BLUEPRINT · /d/dgm_coupon-promotion-engine
Coupon & Promotion Engine (Rule Eval, Budget Caps & Stacking)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_coupon-promotion-engine) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_coupon-promotion-engine)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_coupon-promotion-engine" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Coupon & Promotion Engine (Rule Eval, Budget Caps & Stacking) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Checkout & Cart API"]
n1_1["Promo Eval API"]
n2a_2["Rule & Stacking Engine"]
n2b_3[("Budget Cap Guard")]
n3_4[("Redemption Ledger")]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Eval cart · gRPC"| n1_1
n1_1 -->|"2a. Match · In-Proc"| n2a_2
n1_1 -.->|"2b. Check cap · Redis"| n2b_3
n2a_2 -->|"3a. Reserve/Us · SQL"| n3_4
n2b_3 -->|"3b. Apply · Async"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Checkout & Cart APISTATELESSApply promo at checkout
- Promo Eval APISTATELESSLow-latency cart pricing
- Rule & Stacking EngineSTATELESSEligibility DAG + precedence
- Budget Cap GuardSTATEFULRedis fast gate + DB atomic tx
- Redemption LedgerSTATEFULUnique `` + state
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Checkout & Cart API → Promo Eval API (Eval cart)[gRPC]
- Promo Eval API → Rule & Stacking Engine (Match)[In-Proc]
- Promo Eval API → Budget Cap Guard (Check cap)[Redis]
- Rule & Stacking Engine → Redemption Ledger (Reserve/Us)[SQL]
- Budget Cap Guard → Redemption Ledger (Apply)[Async]
- Redemption Ledger → Downstream & OTel (Emit /)[OTLP/API]