Architecture
Real Messaging Engine is a layered, event-driven system. Requests flow down; delivery events flow back up into Salesforce.
Layer model
┌─────────────────────────────────────────────┐
│ Salesforce │
│ System of record · Objects · Flow · Apex │
└───────────────────┬─────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Enterprise Intelligence Engine (EIE) │
│ Schema · Context · AI services · Policy │
└───────────────────┬─────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Real Messaging Engine (RME) │
│ Orchestration · Templates · Routing · │
│ Consent · Suppression · Retry · Audit │
└───────────────────┬─────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Provider Layer │
│ SendGrid · Amazon SES · Azure ACS · │
│ Mailgun · Postmark · SparkPost · Future │
└───────────────────┬─────────────────────────┘
↓
┌─────────────────────────────────────────────┐
│ Customer │
│ Email · Phone · Enterprise inbox │
└─────────────────────────────────────────────┘
Events return along the reverse path:
Customer → Provider webhook → RME Webhook Service →
Platform Event → Salesforce records → EIE → AI / Analytics
Send sequence
Flow / Apex / REST
│ publish Message__c (Queued)
▼
Routing Service ──► select channel + provider
│ (policy, consent, cost, failover)
▼
Template Service ──► merge + personalization
│
▼
Named Credential ──► provider REST API
│
▼
Provider Message ID ──► Delivery_Status__c (Sent)
│
▼
Webhook (delivered / open / click / bounce / complaint)
│
▼
Platform Event: RME_Delivery_Event__e ──► subscribers
Provider layer
| Provider | Channels | Notes |
|---|---|---|
| SendGrid | Dedicated IPs, subusers, event webhook | |
| Amazon SES | Configuration sets, SNS event destinations | |
| Azure Communication Services | Email, SMS | Entra ID auth, EU/US data residency |
| Mailgun | Regional endpoints (US/EU) | |
| Postmark | Transactional message streams | |
| SparkPost | Subaccounts, high-volume relay | |
| Twilio / Vonage | SMS, RCS, WhatsApp, Voice | Channel providers |
| Future providers | Any | Pluggable provider adapter interface |
Providers are configured, not coded. Each provider is a Provider_Config__c record bound to a Named Credential; adding one never requires a code change to your messaging logic.
Bidirectional event flow
Every provider webhook is normalized to one internal event shape before it reaches Salesforce:
{
"messageId": "a0X5f000001AbCdEAK",
"providerMessageId": "14c5d75ce93.dfd.64b469",
"channel": "EMAIL",
"event": "delivered",
"timestamp": "2026-08-03T18:22:11Z",
"recipient": "customer@example.com",
"provider": "SENDGRID",
"metadata": { "ip": "168.245.1.1", "tls": true }
}
This normalization is what makes analytics, AI, and reporting provider-agnostic.
Design principles
- Salesforce is the system of record. RME never becomes a second database of customers.
- No synchronization. Data does not leave and return; it never leaves.
- Provider independence. Routing and failover are configuration.
- Event-driven. Platform Events decouple delivery from business logic.
- Governed. Sharing rules, permission sets, field-level security, and audit logs apply.
- Extensible. New channels and providers plug into the same interfaces.
Continue to Communication Providers.
Was this helpful?
Last updated 1 month ago