Re-routing or Ending “Waiting” Conversations
We’ve all been there. You look at your Omni-Channel Supervisor dashboard and see a list of conversations sitting in the backlog waiting for a service rep to action them. Maybe the customer wandered off, or maybe the floor is just slammed, or it’s routed to a queue or skillset that doesn’t have anybody online right now.
Let’s look at this from the customer’s perspective. If a user is on a web chat and hasn’t been connected for 10+ minutes, they aren’t just “waiting”—they’re potentially stuck in a void. Maybe your agents were pulled into an emergency meeting, or a fire alarm went off, or the shift ended and the backlog didn’t clear. Keeping a customer staring at a spinning wheel for 15-20 minutes when no one is coming is a surefire way to tank your CSAT.
Wouldn’t it be better to proactively manage that experience? In this post, I’ll show you how to use Scheduled Paths and a “janitor” Bot to automatically re-route or end conversations that have been waiting too long. These steps will focus on how to solve this for our messaging channels, but a similar approach could be used for Voice calls, when using Unified Routing.
The “Why”: Proactive Queue Management
When a conversation stays waiting indefinitely, it clutters your backlog and misleads the customer. By automating the cleanup:
- Respect the Customer’s Time: Instead of infinite waiting, give them a clear exit or an alternative way to reach you.
- Accurate reporting: Wait times aren’t blown out by a few conversations that are waiting for an inordinate length of time.
- Cleaner Backlog: Supervisors can focus on the work that is actually actionable.
The “How”: Using Scheduled Paths
The magic happens in a Record-Triggered Flow on the MessagingSession object (or VoiceCall for the phone channel).
Option 1: The Simple “Safety Net”
This approach creates a global rule: if any session waits too long, we take action.
- Configure the Start: Trigger the Flow when a record is created or updated where Status equals Waiting.
- Add a Scheduled Path: Click Add Scheduled Paths.
- Set the Timer: Set the offset to, say, 10 or 20 minutes after the session moves to waiting (Time Source = When MessagingSession is Created or Updated)
- Route Work: Within that path, use the Route Work action to move the session to a different queue or an Enhanced Bot or Agentforce Agent.
Option 2: The “Prescriptive” Approach (Custom SLAs)
If you want to be more specific—perhaps giving VIP customers a longer wait threshold—you can use a custom field.
- Custom Field: Add a Date/Time field to MessagingSession called TimeToReRouteSession.
- Initial Routing: In your main Omni Flow, use a formula like NOW() + (1/(24*60)) to set a specific “expiration” time on that record.
- Triggered Flow: Set your Record-Triggered Flow to fire based on that custom field reaching its deadline (Time Source = MessagingSession:TimeToReRouteSession)
The Secret Sauce: The “Janitor” Bot
Salesforce doesn’t have a “Close Session” action in Flow yet. To end a session gracefully, we use an Enhanced Einstein Bot as our “janitor” (messaging only).
- Create the Bot: Build a simple Enhanced Bot.
- The “Welcome” Dialogue: Send a message that acknowledges the delay: “We’re sorry, it looks like our team is currently unavailable. Please try again later or visit our Help Center.”.
- The “End Chat” Action: Immediately following the message, add an End Chat action.
- The Hand-off: In your Flow’s Scheduled Path, route the “expired” session to this Bot.
The Bot triggers, explains the situation to the customer, and closes the session cleanly.
Technical Gotchas to Keep in Mind
- The 5-Minute Window: Scheduled paths run every minute. This means the scheduled path won’t execute exactly down to the second of expiry, but up to 59 seconds after it expires. Furthermore, depending on org activity, it can take up to 5 minutes for the automation to actually fire if you have a lot of these.
- Different Queues: If you route to a Bot, ensure the Fallback Queue in the Route Work action is different from the queue the work is currently in, or it won’t route at all.
- Work fails to re-route: In some circumstances, the re-routing can fail, I recommend a second scheduled path to catch these stragglers (Product is working on a fix here to handle these scenarios).
- Omni Supervisor Lag: We’ve seen cases where the work stays in the “Queues Backlog” view for a moment after the automation fires. A simple refresh usually clears the “ghost” session.
By setting up these safety nets, you ensure that if the worst happens and your queue is left unattended, your customers aren’t left in the dark and your backlogs stay clean.








