System Design Atlas

Omnichannel customer service

10 / 10Worked example

Final design

Which tests prove contention protection and completion for service cases in the overall architecture?

The final design reuses the complete topology from step 6. Within the system boundary: interface → support case API → cases, channel messages, draft revisions and send commands; channel processing reads durable work from this store. Channel providers are external. Processing receives or sends the domain messages described in the main flow; results reach the interface through the support case API. The test plan adds concurrency, retries, exact boundaries and terminal completion for support case F-34. The table lists expected results; execution evidence is still outstanding.

Starting point Knowledge suggestions include sources and approval.

Assumptions for the example case

Own fictitious example design. A service case via e-mail and chat with human confirmed knowledge suggestions. A send command without evidenced status is added to the investigation list from 120 seconds. All figures and test goals are illustrative assumptions.

Overall architecture with checks and review loops

Runtime topology

  1. 1 · Email and chat providers → channel adapters
  2. 2 · Channel adapters → Permanent inbox
  3. 3 · Permanent Inbox → Service Case API
  4. 4 · Support case API → case and draft data store
Email and chat providersSeparate channel receipts
Specialised teamediting the assigned section

Omnichannel service

Channel adaptersDeduplicate separately within each source namespace
Permanent InboxStore the message before acknowledging receipt
Support case APIAssignment and response confirmation
Case and draft data storeCase, Revision, Outbox
Channel processingSend the exact draft
Email and chat providers → Channel adaptersMessage within its source namespace
Channel adapters → Permanent InboxDeduplicated commits
Permanent Inbox → Support case APIVerified customer reference
Support case API → Case and draft data storeCase + Draft + Outbox
Case and draft data store → Channel processingConfirmed draft
Channel processing → Email and chat providersselected channel
Support case API → Specialised teamAssigned question
Replay 4 · State 5 · Flow 7 · Operations 9Send command without status enters investigation at 120 s

Sending binds the confirmed draft version and selected channel.

Email and chat providers enter a permanent inbox via separate channel adapters. Message assignment only binds to the Support case API after checked customer reference. Case data, draft revisions and send commands are related; a knowledge base provides cited proposals that the service team confirms. Channel processing reads the outbox and transmits the exact confirmed draft to the selected provider. Specialist team edits assigned excerpts. The input and output paths have their own receipts and are shown separately in the diagram. The same building blocks and arrows as in step 6. Test marker: API/Commit → Contention and Replay (4/5/7); Boundary Check → Exact Boundary (2); Specialist Role/Close → Terminal Evidence (9).

Test plan for the complete design

ComponentTest and expected resultReturn to an earlier step
Support case APITwo send commands expect version 4. In either order, one wins and the second receives a conflict. After a fresh read, another send is possible only as a new, deliberately confirmed reply.Steps 3 and 5
Command journalIdentical retries take effect once; changed content produces a conflict.Steps 4 and 7
Domain boundary checkCheck values 119, 120 and 121 seconds. Oracle: A send command without evidenced status is added to the investigation list from 120 seconds.Step 2
Cases, channel messages, draft revisions and send commandsA closed case does not accept a new send command. A new customer message generates a subsequent case with reference.Steps 5 and 9
Channel processingThe reply draft and send command commit together. The channel provider accepts the command, but its acknowledgement is lost. Channel processing reconciles the same provider reference; a new send with a new key remains blocked until the existing command is resolved.Steps 6 and 7

Support case API

Test and expected result
Two send commands expect version 4. In either order, one wins and the second receives a conflict. After a fresh read, another send is possible only as a new, deliberately confirmed reply.
Return to an earlier step
Steps 3 and 5

Command journal

Test and expected result
Identical retries take effect once; changed content produces a conflict.
Return to an earlier step
Steps 4 and 7

Domain boundary check

Test and expected result
Check values 119, 120 and 121 seconds. Oracle: A send command without evidenced status is added to the investigation list from 120 seconds.
Return to an earlier step
Step 2

Cases, channel messages, draft revisions and send commands

Test and expected result
A closed case does not accept a new send command. A new customer message generates a subsequent case with reference.
Return to an earlier step
Steps 5 and 9

Channel processing

Test and expected result
The reply draft and send command commit together. The channel provider accepts the command, but its acknowledgement is lost. Channel processing reconciles the same provider reference; a new send with a new key remains blocked until the existing command is resolved.
Return to an earlier step
Steps 6 and 7

First end-to-end test and outstanding evidence

End-to-end path
Two answers and lost receipt form the end-to-end path. The reply draft and send command commit together. The channel provider accepts the command, but its acknowledgement is lost. Channel processing reconciles the same provider reference; a new send with a new key remains blocked until the existing command is resolved.
Clarify before extending the scope
Agree on the actual channel-provider contract, retention, recovery targets and role assignments. All limits here are design assumptions. The evidence table specifies tests to run; technical integration, browser checks and reader comprehension checks follow separately.

Test two replies and a lost acknowledgement end to end

Test two replies and a lost acknowledgement end to end

Test two replies and a lost acknowledgement end to end.

A customer reports via chat and e-mail for the same request. Two service employees prepare answers simultaneously. Completion requires technical and domain evidence.

Two send commands await version 4. One wins for each order; the second gets conflict. After a fresh read, a further dispatch is only possible as a new consciously confirmed answer. The exercise specifies the input and expected result.

Alternative considered
An initial end-to-end path limited to lists and forms postpones the critical state checks.
Trade-off
The first end-to-end path needs controlled concurrency and failure points.
Reassess
Passing the counterexample tests and checks with readers provides grounds for extending the case.

Try it yourself

Choose two architectural decisions: concurrency protection and evidence-backed completion. For each, name the test, expected result and step to revisit.

A hint for your attempt

Link the markers of the overall architecture with the associated design steps.

Compare with a possible solution
Concurrency control
Two send commands await version 4. One wins for each order; the second gets conflict. After a fresh read, a further dispatch is only possible as a new consciously confirmed answer. The invariant is expected: An externally sent response binds the confirmed draft version and the selected channel; uncertain identity similarity leads to an assignment proposal. Deviation leads back to step 5 and to the command contract in step 4.
Test completion and retries
Starting point: provider acceptance is confirmed, the case is answered and the service team has closed it. Attempt a new send in the closed case. Then deliver a new authenticated customer message with a stable channel message identifier twice. Expected result: the new send conflicts; exactly one linked follow-up case with exactly one new message is created. The old send record remains unchanged and is not executed again. Failures lead back to step 9 for ownership and step 7 for the failure sequence.

Apply to your project

Which two counterexample tests will you run first in your own end-to-end implementation?

Transfer the architecture and counterexamples to the editable Markdown design template.

Start your own design

Choose a small case from your project. The template collects the ten design tasks and leaves space for your sketches, decisions, and open assumptions. You can edit it in your text editor or note-taking app.

Download design template (.md)
Compare the ten tasks with the example case
  1. Purpose and boundary

    What proof of service case would arise in your own project outside of the application?

    In the example: Check channel references and customer identity separately. One support case across email and chat, with knowledge suggestions confirmed by a human.

  2. Requirements

    Which rule of your project remains binding even with slow processing?

    In the example: Sending requires a human-confirmed draft. A send command without evidenced status enters the investigation list from 120 seconds.

  3. Scale estimates

    Which single item concentrates the load more than the daily average when it comes to customer concerns?

    In the example: Test concurrent case updates alongside message throughput. An average of 1 event/s says little about two concurrent replies to the same support case.

  4. Interfaces

    Which input fields make two change intentions different in your project?

    In the example: Sending binds the text, recipient and channel. The case version, reply draft hash, recipient and channel must remain identical on replay.

  5. Data and states

    Which states must remain protected in your model against late replay?

    In the example: Message references remain unique within their source namespace. A closed case accepts no new send command. A new customer message creates a linked follow-up case.

  6. Overall architecture

    Which planned service boundary would distribute a currently local guarantee across the network?

    In the example: Channel processing runs outside the case commit. Cases, channel messages, draft revisions and send commands must express the same valid state.

  7. Critical flow

    What feedback could be missing even though the underlying action has already taken place?

    In the example: Resolve uncertain delivery using the same reference. An externally sent reply binds the confirmed draft version and selected channel; uncertain identity similarity produces a suggested association.

  8. Bottlenecks and trade-offs

    Which similar display could have two different causes in your project?

    In the example: Waiting reasons distinguish technical delays from business delays. Long case duration may reflect waiting for a specialist team, customer message or channel status. Separate waiting reasons enable appropriate responses instead of blanket technical escalation.

  9. Operations and security

    Which open state in your project needs a domain specialist as well as technical operations?

    In the example: Knowledge suggestions include sources and approval. A closed case accepts no new send command. A new customer message creates a linked follow-up case.

  10. Final design

    Which two counterexample tests will you run first in your own end-to-end implementation?

    In the example: Test two replies and a lost acknowledgement end to end. Two send commands expect version 4. In either order, one wins and the second receives a conflict. After a fresh read, another send is possible only as a new, deliberately confirmed reply.