I have a requirement where we want to route customers by prioritising the owner or Sales Team of a matched contact/lead for Chat. As far as I can tell, I can't achieve this using standard Queue-based or Skill-based routing - is there a way that I could use an Apex Trigger or a Flow to redirect chats to the most appropriate agent and override the standard routing behaviour?
-
Hello! Dis you find any valid approach?– lopez.regalado.fjOct 7, 2020 at 19:53
-
@lopez.regalado.fj see the answer I've just posted. Would appreciate the vote if you found it helpful! I had to look through a lot of the documentation to figure out whether it was doable or not, and unfortunately it's not possible just on Salesforce.– dogsdontcareOct 15, 2020 at 1:14
2 Answers
you can use Omni-channel flows and set the preferred Agent to the owner/Sales Team member on the route work action.
Please check the below link
https://help.salesforce.com/s/articleView?id=sf.omnichannel_route_to_specific_agent.htm&type=5
-
Looks like this is out of beta now so definitely worth using now Jun 3, 2022 at 13:01
I've had a look into this and it appears the only way to override the built-in routing solution is to use an external routing solution, as you cannot update any of the fields on the AgentWork record once it has been created as per the Omni Channel Documentation for the AgentWork object.
The PendingServiceRouting object does not support Apex Triggers as per the Omni Channel Documentation for the PendingServiceRouting object, so you can't change which agent the PendingServiceRouting object is associated with on-platform.
As a result there isn't a way to customise routing for Omni Channel work items on-platform without building an external routing solution.
-
I like it! really good point!, maybe that's the only way to go ahead but at the same time we need to add that logic out of salesforce....:( Oct 16, 2020 at 13:01