Destinations & Activation → Real-time Activation

Email Platforms (SendGrid)

Triggers transactional and campaign email in response to a real-time customer event or a propensity-score threshold — the highest-volume real-time destination.

High-Level Design

A qualifying event or score crossing a threshold triggers an email within minutes.

Data Source
Data Sources
Every touchpoint and business system
→
Ingestion
Ingestion Layer
SDKs, connectors, protocols
→
Processing
Transformation & Processing
Real-time event stream feeding trigger logic
→
Foundation
Unified Customer Profile
Consent state and preferred channel checked before send
→
Intelligence
Propensity Scores
Optional trigger input for targeted campaigns
→
Activation
Email Platforms (SendGrid)
.NET Core Activation API → SendGrid API

💼 Business Context

  • Email remains the highest-ROI, highest-volume activation channel — cart abandonment, win-back, and lifecycle campaigns all depend on it firing reliably and on time
  • Consent and channel-preference enforcement here is a direct compliance requirement, not just good practice
  • Owned by Marketing Technology / Platform Engineering

🔌 Technical Overview

A .NET Core Activation API — packaged as a Docker container on Azure Container Apps — subscribes to qualifying events (cart abandonment, propensity-score threshold crossings) via Azure Service Bus, checks the customer's consent_basis and preferred channel through the Profile API, and calls the SendGrid API to trigger the appropriate template. Delivery status (sent, bounced, opened, clicked) is written back to Azure Event Hubs as a new event, closing the loop so engagement data feeds back into the lakehouse like any other touchpoint.

Trigger Types

Cart abandonment Propensity threshold Lifecycle milestone Transactional (order confirmation)

💾 Activation Trigger Payload

{
  "customer_key": "cust_004821",
  "trigger": "cart_abandonment",
  "channel": "email",
  "template_id": "cart_recovery_v3",
  "consent_checked": true
}

🔗 Integration Points

  • Azure Service Bus — delivers the triggering event to the Activation API
  • Profile API — consent and preferred-channel check before every send
  • SendGrid — email delivery provider
  • Azure Event Hubs — delivery/engagement events written back as new touchpoint data

🧰 Services Consumed

  • Owning microservice — Cxos.Activation.Api (see the Full Application Service Map)
  • Database — Azure Cosmos DB (dispatch log) + Azure Cache for Redis (frequency caps)

⚠️ Non-Functional Considerations

  • Scale: designed for bursty campaign sends (tens of thousands of triggers in a short window) without backing up the Service Bus queue
  • Latency: real-time triggers fire within 5 minutes of the qualifying event, per BR-6.2
  • Reliability: failed sends are retried with backoff via Polly, then dead-lettered for manual review rather than silently dropped
  • Security/Privacy: no send occurs without a passing consent check — the API fails closed if the Profile API is unreachable rather than sending anyway

🎯 Enterprise Example

A customer abandons a cart with a high-value item. The event reaches the Activation API within seconds, a consent check passes, and a recovery email sends within the 5-minute SLA — recovering an order that would otherwise have been lost, with the resulting click event flowing back into the lakehouse as a fresh touchpoint.

← Back to Real-time Activation