Communications Domain
UML diagrams for email infrastructure, automation, and delivery tracking
Communications Domain
The Communications domain handles email infrastructure, template management, automation sequences, and delivery tracking.
Domain Overview
graph TB
subgraph "Email Infrastructure"
SMTP[SMTP Pool]
IP[IP Pool]
DOMAIN[Domain Auth]
PROVIDER[Providers]
end
subgraph "Email Management"
TEMPLATE[Templates]
CAMPAIGN[Campaigns]
TRANSACT[Transactional]
end
subgraph "Automation"
RULES[Automation Rules]
TRIGGERS[Triggers]
SEQUENCE[Sequences]
end
subgraph "Delivery"
SEND[Sending]
TRACK[Tracking]
ANALYTICS[Analytics]
end
TEMPLATE --> CAMPAIGN
TEMPLATE --> TRANSACT
CAMPAIGN --> RULES
RULES --> TRIGGERS
TRIGGERS --> SEQUENCE
SEQUENCE --> SEND
SEND --> TRACK
TRACK --> ANALYTICS
SMTP --> SEND
IP --> SMTP
DOMAIN --> PROVIDER
PROVIDER --> SMTP
style SMTP fill:#e1f5fe
style SEND fill:#fff3e0
style TRACK fill:#e8f5e9Entity Relationship Diagram
erDiagram
TENANT ||--o{ EMAIL_TEMPLATE : has
TENANT ||--o{ EMAIL_CAMPAIGN : has
TENANT ||--o{ EMAIL_AUTOMATION_RULE : has
EMAIL_CAMPAIGN ||--o{ EMAIL : sends
EMAIL_TEMPLATE ||--o{ EMAIL : uses
EMAIL ||--o{ EMAIL_EVENT : logs
EMAIL }o--|| CONTACT : sent_to
EMAIL_AUTOMATION_RULE ||--o{ AUTOMATION_ACTION : triggers
EMAIL {
string id PK
string tenantId FK
string templateId FK
string contactId FK
string subject
string fromEmail
string toEmail
enum status
timestamp sentAt
timestamp openedAt
timestamp clickedAt
string messageId
}
EMAIL_TEMPLATE {
string id PK
string tenantId FK
string name
string subject
text htmlContent
text textContent
json variables
enum type
boolean active
}
EMAIL_CAMPAIGN {
string id PK
string tenantId FK
string name
string templateId FK
json segmentCriteria
enum status
timestamp scheduledAt
timestamp sentAt
int totalSent
int totalOpened
}
EMAIL_AUTOMATION_RULE {
string id PK
string tenantId FK
string name
enum triggerType
json conditions
json actions
boolean active
int priority
}
EMAIL_EVENT {
string id PK
string emailId FK
enum eventType
json eventData
string ipAddress
string userAgent
timestamp occurredAt
}Email States
stateDiagram-v2
[*] --> QUEUED: Create Email
QUEUED --> SENDING: Pick from Queue
SENDING --> SENT: Successfully Sent
SENDING --> FAILED: Send Error
SENT --> DELIVERED: Delivery Confirmed
SENT --> BOUNCED: Bounce Received
DELIVERED --> OPENED: Open Tracked
DELIVERED --> UNSUBSCRIBED: Unsubscribe Click
OPENED --> CLICKED: Link Click
OPENED --> SPAM_REPORTED: Spam Report
BOUNCED --> SUPPRESSED: Add to Suppression
FAILED --> QUEUED: Retry
FAILED --> SUPPRESSED: Max Retries
note right of BOUNCED
Hard or soft bounce
end noteKey Business Processes
Email Automation
Trigger-based email sequences and workflows. View Automation Details
Delivery Tracking
Email delivery status and engagement tracking. View Tracking Details
Infrastructure Architecture
flowchart TB
subgraph "Application Layer"
APP[Company Manager]
QUEUE[Email Queue]
end
subgraph "Sending Infrastructure"
WORKER[Email Workers]
RATE[Rate Limiter]
POOL[IP Pool Manager]
end
subgraph "Providers"
SES[Amazon SES]
SMTP_PROV[SMTP Provider]
RESEND[Resend]
end
subgraph "Feedback"
WEBHOOK[Webhook Handler]
BOUNCE[Bounce Handler]
COMPLAINT[Complaint Handler]
end
APP --> QUEUE
QUEUE --> WORKER
WORKER --> RATE
RATE --> POOL
POOL --> SES
POOL --> SMTP_PROV
POOL --> RESEND
SES --> WEBHOOK
SMTP_PROV --> WEBHOOK
WEBHOOK --> BOUNCE
WEBHOOK --> COMPLAINT
BOUNCE --> APP
COMPLAINT --> APPEmail Metrics
| Metric | Description |
|---|---|
| Delivery Rate | Successfully delivered / sent |
| Open Rate | Unique opens / delivered |
| Click Rate | Unique clicks / delivered |
| Bounce Rate | Bounced / sent |
| Unsubscribe Rate | Unsubscribes / delivered |
| Complaint Rate | Spam reports / delivered |