Design a system which integrates Amazon Connect with an ORM software like AWS and enables bidirectional communication between them
Designing a system that integrates Amazon Connect (a cloud contact center) with an ORM software (Operational Risk Management software — assuming you're referring to enterprise risk .
Let’s start by outlining the functional requirements for such an integration system that enables bidirectional communication.
FR
1.System must sync agent status (e.g., Available, On Call, Offline) from Amazon Connect to ORM.
2.ORM system should be able to update or query agent state via APIs.
3.Every incoming or outgoing call event (start, end, duration, caller info, recording URL) should be:
Logged into the ORM system.
Associated with relevant case/ticket/compliance report in ORM.
4.If a call meets certain conditions (e.g., keywords, sentiment, escalation), the system should:
Automatically create a case in ORM.
Attach call metadata, transcription, and recording link.
4.ORM users should receive real-time alerts (e.g., via UI or email/SNS) for:
Priority call events
High-risk keywords detected
Escalation triggers
5.Bidirectional Data Sync
From Amazon Connect to ORM:
Call logs
Agent activity
Transcriptions
6.When a call is received, Amazon Connect should trigger a screen pop with relevant ORM data (like customer’s open cases, history).
7.Every action (agent status change, case creation, call record edit) must be audit logged in both systems for compliance.
8.Different user roles (agent, supervisor, compliance officer) should see and do different things depending on permissions.
Enforced consistently across both Connect and ORM.
NFR
1.System should be highly available during peak hours
2.System should be highly scalable to handle concurrent requests
3. Real-time sync operations (e.g., screen pop, case updates) should occur within <1 second latency.
4.Bulk sync or batch updates (e.g., daily reports, transcription analysis) can tolerate higher latency (e.g., <5 minutes).
5.All call logs, events, and case links should be persisted durably
Estimates
5,000 agents × 80 calls = 400,000 calls/day
Each call triggers ~5 API calls (log, fetch user, sync case, notify, update status)
400,000 calls × 5 = 2 million API calls/dayAPI’s
1.POST /api/v1/calls
{
"callId": "abc123",
"agentId": "agent-001",
"startTime": "2025-04-12T08:00:00Z",
"endTime": "2025-04-12T08:05:00Z",
"direction": "INBOUND",
"customerId": "cust-789",
"recordingUrl": "https://s3.amazonaws.com/...",
"transcriptUrl": "https://s3.amazonaws.com/...",
"sentimentScore": 0.65
}
2.POST /api/v1/alerts
Raise an alert/case in ORM based on call triggers (e.g., keywords, sentiment).
{
"callId": "abc123",
"reason": "High sentiment score",
"triggeredBy": "compliance_rule_7",
"customerId": "cust-789"
}
3.POST /api/v1/cases/{caseId}/notes
Attach a call log or transcription as a note in an existing case.
{
"author": "agent-001",
"noteType": "CALL_TRANSCRIPT",
"contentUrl": "https://s3.amazonaws.com/transcripts/abc123.txt"
}
4.PATCH /api/v1/agents/{agentId}/status
Sync agent status from Connect to ORM.
{
"status": "ON_CALL",
"timestamp": "2025-04-12T08:00:00Z"
}
5.GET /api/v1/customers/{phoneNumber}
Fetch customer data to show during screen pop in Connect.
{
"customerId": "cust-789",
"name": "Jane Doe",
"riskScore": 87,
"openCases": [
{ "caseId": "case-001", "status": "OPEN", "createdAt": "2025-03-01" }
]
}
6.GET /api/v1/cases/{caseId}/script
{
"script": "Hello {{customer.name}}, we're calling regarding your case from March..."
}
7.POST /api/v1/route-call
Custom call routing based on ORM logic (risk score, open cases).
{
"customerId": "cust-789",
"callType": "INBOUND"
}
Here’s a suggested database + schema design for the system that integrates Amazon Connect with an ORM system, enabling bidirectional communication.
We'll split this into:
📦 Database Choice
🧱 Schema Design
🔁 Relationships
⚡ Indexing Tips
☁️ Optional: Hybrid Data Storage (Transcripts, Recordings)
-- Agents Table
CREATE TABLE agents (
agent_id UUID PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE,
current_status TEXT CHECK (current_status IN ('AVAILABLE', 'ON_CALL', 'OFFLINE')),
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Calls Table
CREATE TABLE calls (
call_id UUID PRIMARY KEY,
agent_id UUID REFERENCES agents(agent_id),
customer_id UUID,
start_time TIMESTAMP NOT NULL,
end_time TIMESTAMP,
direction TEXT CHECK (direction IN ('INBOUND', 'OUTBOUND')),
sentiment_score FLOAT,
recording_url TEXT,
transcript_url TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Cases Table
CREATE TABLE cases (
case_id UUID PRIMARY KEY,
customer_id UUID,
status TEXT CHECK (status IN ('OPEN', 'CLOSED', 'ESCALATED')),
created_by UUID REFERENCES agents(agent_id),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Call-Case Link Table (Many-to-Many)
CREATE TABLE call_case_links (
id UUID PRIMARY KEY,
call_id UUID REFERENCES calls(call_id),
case_id UUID REFERENCES cases(case_id),
linked_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Notes Table (Can attach notes/transcripts to cases)
CREATE TABLE notes (
note_id UUID PRIMARY KEY,
case_id UUID REFERENCES cases(case_id),
author_id UUID REFERENCES agents(agent_id),
note_type TEXT CHECK (note_type IN ('COMMENT', 'CALL_TRANSCRIPT', 'ALERT')),
content TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Alerts Table (Generated on conditions such as sentiment or keyword triggers)
CREATE TABLE alerts (
alert_id UUID PRIMARY KEY,
call_id UUID REFERENCES calls(call_id),
reason TEXT,
severity TEXT CHECK (severity IN ('LOW', 'MEDIUM', 'HIGH')),
triggered_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Audit Logs Table (For system or agent actions)
CREATE TABLE audit_logs (
log_id UUID PRIMARY KEY,
actor_id UUID,
entity_type TEXT,
entity_id UUID,
action TEXT CHECK (action IN ('CREATE', 'UPDATE', 'DELETE', 'STATUS_CHANGE')),
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
metadata JSONB
);
HLD
[Amazon Connect]
│
▼
[EventBridge / Lambda]
│
▼
[Call Ingestion Service] ───> [Agent Service]
│ │
├────> [Transcription & Storage Service] ──> [S3]
│ │
├────> [Alert & Rule Engine] ──> [Notification Service]
│ └─> [Case Management Service]
│ │
├──────────────┐ ▼
▼ ▼ [ORM Sync Service] ──> [External ORM]
[Call DB] [Audit Logging Service]
🔄 Interaction Flow (Sequence)
📞 Inbound Call from Amazon Connect
Amazon Connect emits a contact event via Amazon EventBridge or Lambda.
➡️ Call Ingestion Service receives the event.
➡️ Calls Agent Service to verify agent is available & update status.
➡️ Stores call metadata in Call DB.
➡️ Pushes recording/transcript job to Transcription & Storage Service.
⬅️ Transcription & Storage Service stores transcript/recording in S3, updates DB.
➡️ Passes call & transcript data to Alert & Rule Engine for analysis.
➡️ If rules matched (e.g. low sentiment), generates alert and passes it to:
Case Management Service to auto-create case or link to existing one
Notification Service to notify supervisor
➡️ ORM Sync Service pushes updated case/call info to external ORM API.
➡️ Audit Logging Service records all actions.
⬅️ Outbound Action from ORM (e.g., Supervisor updates a case)
ORM System sends update via webhook or polling.
➡️ ORM Sync Service pulls or receives update.
➡️ Routes to appropriate service:
Updates Case Management
Or updates Call Data
➡️ Agent Service is notified if new context needs to be shown in agent dashboard.
➡️ Logs action in Audit Logging Service
L



Hi from Colorado! 🪻 Come hang with us at the Bloom Collective! https://substack.com/@vibrationalbloom
Hi from Colorado! 🪻 Come hang with us at the Bloom Collective! https://substack.com/@vibrationalbloom