{"id":"bbe14d89-04f6-4149-a666-d332e4733ff4","task":"Configure Salesforce Omni-Channel routing with skill-based capacity rules and programmatically update agent presence status","domain":"developer.salesforce.com","steps":["Define Service Channels (e.g. for Cases or Chats) and Routing Configurations with capacity weights in Salesforce Setup","Create Queues and associate them with the Routing Configuration, then assign agent Skills via Setup or Apex","Use the Salesforce REST API or Apex to set an agent's Presence Status by updating the UserServicePresence record via PATCH /services/data/vXX.0/sobjects/UserServicePresence/{id}","Push a new work item to the queue by updating the Case OwnerId to the queue's group ID, or create a PendingServiceRouting record to invoke Omni-Channel routing explicitly","Poll AgentWork records via GET /services/data/vXX.0/sobjects/AgentWork to confirm the work item was accepted or declined by the agent","Subscribe to the AgentWork platform event streaming endpoint (/cometd/vXX.0/) for real-time routing status updates instead of polling"],"gotchas":["Omni-Channel routing bypasses standard queue assignment rules — do not use workflow rules or triggers to change OwnerId simultaneously, as conflicts cause items to be dropped from routing","Agent capacity is consumed per Routing Configuration weight, not per object — a high-weight Case can exhaust all capacity and block lower-priority work items from reaching the agent","Status-Based Capacity and Tab-Focused Capacity use different presence tracking models; mixing them within the same org requires careful configuration to avoid double-counting capacity"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/bbe14d89-04f6-4149-a666-d332e4733ff4"}