Interfaces
How does the contract for “send an answer” distinguish a repetition from a new intention?
The load profile meets the specific change order “Send response”. Its content consists of service case version, response draft hash, recipient and channel. An idempotency key detects the same intention after a loss of response; an aggregate version protects the changed business state.
Starting point Test concurrent case updates alongside message throughput.
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.
Commands, retries and current state
Command and historical result
Identical replay returns the stored record; changed content produces a conflict.
Proposed API for this example
- POST
/kundendienst-omnichannel/{id}/commandsSend reply
- Input
- Service case version, response draft hash, recipient and channel; expected aggregate version, authorized role and stable command key.
- Result
- Durably stored business result and new version; version or content conflicts produce no partial effects. An accepted external request receives an open status.
- Retry behaviour
- The key is scoped to the actor, operation and business object. After authentication, first compare the existing result and canonical content: identical content returns the stored evidence; changed content produces a conflict. Only new keys trigger validation of the current version.
- GET
/kundendienst-omnichannel/{id}Read the current business state and reason for investigation.
- Input
- Authorised identity and business object.
- Result
- Service case with current version, proofs and open processing reason.
- Retry behaviour
- Repeating a read creates no business change; access is checked again.
Additional state changes
| Operation | Input | Result and protection |
|---|---|---|
| Accepting message | Authenticated channel, provider identifier and content | Persist the inbox record before acknowledging receipt; changed content under the same identifier → investigation. |
| Assignment of case | Service team, verified customer reference and message | Assignment is traceable; similar names remain proposals. |
| Confirm reply | Service team, text revision, recipient and channel | Release the exact draft for delivery. |
| Accept delivery status | Provider reference and authenticated status | Distinguish confirmed, definitively failed and open outcomes. |
| Closing case | Service team and documented processing outcome | Close only after clarified sending; new message starts follow-up case. |
Accepting message
- Input
- Authenticated channel, provider identifier and content
- Result and protection
- Persist the inbox record before acknowledging receipt; changed content under the same identifier → investigation.
Assignment of case
- Input
- Service team, verified customer reference and message
- Result and protection
- Assignment is traceable; similar names remain proposals.
Confirm reply
- Input
- Service team, text revision, recipient and channel
- Result and protection
- Release the exact draft for delivery.
Accept delivery status
- Input
- Provider reference and authenticated status
- Result and protection
- Distinguish confirmed, definitively failed and open outcomes.
Closing case
- Input
- Service team and documented processing outcome
- Result and protection
- Close only after clarified sending; new message starts follow-up case.
Messages across the external boundary
- Source contract
- RFC 5322 describes message ID and response references for email. A thread reference proves neither customer identity nor that two messages belong to the same support case in its own system.
- System responsibility
- 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.
Sending binds the text, recipient and channel
Sending binds the text, recipient and channel.
The Send reply command can arrive again after its response is lost.
Service case version, response draft hash, recipient and channel must remain the same on replay. The exercise specifies the input and expected result.
- Alternative considered
- A key stored only in volatile memory loses its evidence on restart.
- Trade-off
- The Journal for Send reply requires permanent retention and protected access.
- Reassess
- The documented retry window and journal volume determine the future archiving strategy.
Try it yourself
Predict the results of an identical retry of Send reply, the same key with different reply text, and a new key with an old version.
A hint for your attempt
Retry identity and current state require separate checks.
Compare with a possible solution
- Identical
- The saved result for service case F-34 is returned; the effect is not repeated.
- Changed
- The same key with altered canonical content results in conflict.
- New intent with a stale version
- A new key with a stale version is rejected before any business change. The interface reloads the current state and asks the user to confirm the decision again.
Apply to your project
Which input fields make two change intentions different in your project?