Skip to main content

Work

Architecture in production.

Anonymized patterns from real enterprise engagements. Client names are protected. The architecture is accurate.

01

Financial Services

94%

Duplicate detection accuracy on live data

−61%

Duplicate contact volume within 90 days

Zero

Data loss incidents across 180K merges executed

Contact deduplication and identity resolution architecture

Designed a scalable contact deduplication and merge architecture for an enterprise Salesforce org with 2M+ Contact records spanning multiple business units.

The problem

The organisation had accumulated over two million Contact records across three merged business units, with no consistent identity resolution strategy. Duplicate contacts were causing incorrect service histories, failed marketing suppressions, compliance reporting errors, and agent confusion at the point of interaction. Multiple previous attempts to fix the problem through scheduled batch jobs had introduced data loss and partial merges that made the underlying model worse.

The architecture

We designed a deterministic identity resolution layer using a custom matching rule engine built on Apex, scoring contacts across email, phone, name variants and address normalisation. Matches above a confidence threshold were surfaced to a stewardship queue for human review before merge execution. The merge itself was implemented as a controlled Queueable chain to respect governor limits at scale, with full audit trail written to a custom object before and after each merge. Downstream systems were notified of canonical ID changes via Platform Events to prevent reference breakage.

Architecture highlights

  • +Deterministic matching engine with weighted scoring across six identity fields
  • +Confidence-tiered routing — auto-merge above 98%, human review between 85-98%, no action below
  • +Queueable merge chain with governor-safe batching and rollback capability
  • +Audit object capturing pre/post state for every merge operation
  • +Platform Event publication on merge to notify downstream identity consumers
  • +Stewardship UI built in LWC for data team review and override

02

Enterprise Technology

<2s

Change propagation latency at p99 (from up to 24h)

Zero

Access control gaps reported post-deployment

100%

Event auditability with full correlation trace

Real-time Salesforce to enterprise user management integration

Replaced a nightly batch sync between Salesforce and a downstream enterprise identity platform with an event-driven architecture delivering sub-2-second propagation.

The problem

Access and relationship changes made in Salesforce — role assignments, account ownership transfers, contact deactivations — needed to propagate to a downstream enterprise user management and identity platform. The existing mechanism was a nightly scheduled batch. Any change made during the day was invisible to the downstream system until the following morning, creating access control gaps, compliance exposure, and operational friction for the security team who were managing exceptions manually.

The architecture

We replaced the batch with a Platform Event-driven integration. Salesforce triggers and Flow published change events to a custom Platform Event on every relevant record change. A Java subscriber service consumed these events from the Pub/Sub API, validated and transformed the payload, and called the downstream User Management API with idempotency keys to ensure exactly-once semantics. The subscriber was designed with a replay buffer supporting 72-hour event replay for outage recovery, and all events were logged to an audit store with correlation IDs for traceability.

Architecture highlights

  • +Platform Event schema designed for forward-compatible versioning
  • +Pub/Sub API consumer in Java with retry, backoff and dead-letter handling
  • +Idempotency key enforcement at the subscriber layer to prevent duplicate writes
  • +72-hour replay buffer for downstream outage recovery
  • +Correlation ID propagated end-to-end for audit traceability
  • +JWT Bearer flow for service-to-service authentication with automated key rotation

03

Customer Service Operations

−67%

Automation object count (45 → 15 active automations)

3.1s

Console load time (from 8.4s)

Zero

Unplanned production incidents in first 6 months post-migration

Enterprise Service Cloud case management redesign

Redesigned the case management architecture for a 600-agent Service Cloud deployment that had accumulated years of overlapping automation across Flow, Apex and legacy workflow rules.

The problem

The Service Cloud org had been in production for six years across four different implementation vendors. The automation layer had grown into an unmaintainable tangle — 34 active Flows, 11 Apex triggers across the Case object, and 40+ legacy workflow rules, many of which overlapped or contradicted each other. Any change to case handling required weeks of regression testing and still produced unexpected side effects in production. Agent console load time had degraded past eight seconds. The team had stopped making changes.

The architecture

We began with a full automation audit, mapping every trigger, Flow and workflow rule to its business intent and identifying redundancy, dead code and conflicts. We then consolidated the automation into a single Apex trigger-per-object following the handler pattern, replacing eligible Flows with bulkified Apex logic and retiring all legacy workflow rules. Case routing was redesigned using Omni-Channel skills routing with a clean escalation path. The console was rebuilt with lazy-loaded LWC components and a shared data service layer to eliminate duplicate SOQL.

Architecture highlights

  • +Full automation inventory and conflict mapping across all Case object triggers and flows
  • +Consolidated handler pattern — single trigger entry point, clean separation of concerns
  • +34 Flows and 11 triggers reduced to 1 trigger and 4 targeted Flows
  • +Legacy workflow rules retired and logic migrated to maintainable Apex
  • +LWC console redesign with lazy loading and shared Lightning Message Service data cache
  • +Skills-based routing architecture with SLA-aware escalation logic

04

Customer Engagement

42%

Reduction in average handle time

−4 min

Post-call wrap-up time eliminated per interaction

100%

Call activity logging accuracy (from ~60% manual)

Salesforce and Twilio real-time communication integration

Designed and built a bi-directional Salesforce and Twilio integration enabling agents to make, receive and log calls directly within Service Cloud, with real-time transcription and AI-assisted case creation.

The problem

Customer service agents were handling calls through a standalone Twilio-based telephony system entirely disconnected from Salesforce. After every call, agents manually searched for the customer record, typed call notes, updated the case status and logged a completed activity. This process took an average of four minutes per interaction and was error-prone — notes were incomplete, cases were linked to wrong contacts, and call data was unavailable for reporting. Management had no visibility into call volumes, durations or outcomes in Salesforce.

The architecture

We built a bi-directional integration using Twilio Programmable Voice and the Salesforce Open CTI framework. Incoming calls triggered a screen pop in the agent console via Open CTI, matching the caller's number to a Contact or Lead using E.164 normalisation and fuzzy fallback. Call events from Twilio — initiated, answered, completed, transferred — were published to Salesforce via a secure webhook endpoint built as a Salesforce External Service, creating real-time Task records with duration, disposition and recording links. Twilio Studio handled IVR routing and passed context to Salesforce before the agent answered. Post-call, Einstein Conversation Insights summarised the transcript and pre-populated case fields, reducing wrap-up time.

Architecture highlights

  • +Salesforce Open CTI integration with screen pop on inbound call match
  • +E.164 phone normalisation with fuzzy matching against Contact, Lead and Account
  • +Twilio webhook → Salesforce External Service for real-time call event ingestion
  • +Twilio Studio IVR with context handoff to agent console before answer
  • +Real-time Task creation with call duration, recording URL and disposition
  • +Einstein Conversation Insights for post-call transcript summarisation and case pre-population
  • +JWT-secured webhook authentication with Twilio signature validation

05

Customer Engagement

100%

Inbound calls automatically logged to CRM

−5min

After-call work time per interaction

<500ms

Screen pop latency on inbound call

Salesforce and Twilio real-time communications integration

Designed and implemented a bidirectional integration between Salesforce Service Cloud and Twilio Flex, enabling real-time call logging, screen pop, and agent productivity tooling across a 300-seat contact centre.

The problem

The contact centre was running Twilio Flex as its telephony platform and Salesforce Service Cloud as its CRM, with no integration between the two. Agents were manually logging call notes after each interaction, creating data quality issues and adding 4-6 minutes of after-call work per interaction. There was no screen pop on inbound calls, no automatic case creation, and no supervisor visibility into live call activity from within Salesforce. Leadership had no unified view of contact centre performance tied to CRM outcomes.

The architecture

We designed a bidirectional integration using Twilio Flex Plugins for the agent interface and a middleware layer on Twilio Functions to handle event orchestration. Inbound calls triggered a Twilio Function that queried Salesforce via the REST API to match the caller by phone number, then published the matched contact and open cases to the agent screen via a screen pop built in LWC. Call events — answered, transferred, completed — were published to Salesforce via Platform Events in real time. On wrap-up, call metadata including duration, recording SID and disposition was written to a custom Activity record linked to the Contact and Case. A Supervisor dashboard was built in Salesforce using real-time Platform Event subscriptions to show live queue depth, agent status and CSAT trends.

Architecture highlights

  • +Twilio Flex Plugin for agent screen pop and embedded call controls within Salesforce
  • +Salesforce REST API caller identification on inbound call with sub-500ms lookup
  • +Platform Event pipeline for real-time call lifecycle events (answered, hold, transfer, wrap-up)
  • +Automatic Activity creation on call completion with full metadata and recording reference
  • +Supervisor dashboard built on Lightning Web Components with live Platform Event subscription
  • +Twilio Functions middleware layer handling event transformation and error retry logic
  • +JWT Bearer authentication for all service-to-service calls between Twilio and Salesforce

Note

All engagements are anonymized. Client names, industries and identifying details have been removed or generalized. The architectural patterns, technical approaches and outcome data are accurate.

Begin

Is your Salesforce architecture ready for what's next?