This project demonstrates a fully custom case routing logic in Salesforce Omni-Channel that restricts agents to one active case at a time, regardless of their configured capacity.
✅ Accepts only one assigned case
✅ Automatically flips agent status to Busy after accepting
✅ Other cases are not declined — they simply timeout and go back to the queue
✅ When agent manually switches status back to Ready, they're eligible again
✅ All logic implemented using Aura component + omniToolkitAPI
✅ Works with auto-accept enabled
✅ Requires no Apex or server-side code
✅ Compatible with custom presence statuses and short push timeout settings
- Agent sets Omni-Channel status to
Ready. - Omni-Channel assigns multiple cases (e.g., if capacity is 5).
- The Aura component intercepts all assignments via
onWorkAssigned. - The component accepts only the first case using
omniToolkitAPI.acceptAgentWork. - Then it calls
setServicePresenceStatus({ statusName: "Busy" })to stop further routing. - All remaining cases are left unaccepted, and they timeout (after 10s or your configured value) and return to the queue.
- When the agent switches status back to
Ready, the logic resets and allows another case to be routed.
- Go to Setup > Omni-Channel Settings
- Enable Omni and add presence statuses like
Ready,Busy
- Go to Setup > Presence Configurations
- Set
Push Time-Outto10 seconds(recommended for quick reassignment)
- Status
Ready(routing enabled) - Status
Busy(routing paused)
- In Service Channels, set the channel to Auto-Accept = True
- Go to App Manager > Your Console App > Edit
- Add OmniRoutingHandler (custom Aura component) to the Utility Bar
- Set
Start Automatically = True
- Add users to the presence configuration that includes
ReadyandBusy
force-app/main/default/aura/OmniRoutingHandler/ ├── OmniRoutingHandler.cmp ├── OmniRoutingHandlerController.js └── OmniRoutingHandlerHelper.js
This is ideal for:
- Tier 1 support teams that want to control agent workload strictly
- Avoiding SLA breaches by reducing context switching
- Overriding the default Salesforce capacity behavior
Pavan Kumar Yaramati
Salesforce Developer | Omni-Channel Architect | 8x Certified
GitHub: pavan-yaramati
MIT — Free to use, fork, modify. Attribution appreciated.