Routing live chat to specific groups based on user input

poornimanar
Mega Contributor

I have a requirement to provide end users with two options: HR and Travel. Based on the selected option, the chat should route to a specific queue:

HR → HR Agent Workspace
Travel → CSM/FSM Configurable Workspace

I created a VA flow with a “Select Support Type” static choice node (HR, Travel). After a Decision Utility, I added two branches:
HR branch

Condition: Support Type = HR
Script Action:

JavaScript(function execute() {
vaVars.queue = "awa_queue_sys_id"; (I have created awa queue and added in the oob service channel)(added the group in that queue)
})();`

Followed by Connect to Agent:

JavaScript(function execute() {
vaSystem.connectToAgent();
})();

Travel branch

Condition: Support Type = Travel
Script Action:

JavaScript(function execute() {
vaVars.LiveAgent_queue = vaInputs.select_queue;
vaSystem.connectToAgent();
})();

Followed by a Text node displaying:

JavaScript
answer = vaVars.target_queue;

Issue:

When HR is selected and an HR agent is available, the chat connects correctly.
When HR is selected and only a Travel agent is available, it still connects to the Travel agent.(showing request in the travel agent inbox)
When Travel is selected, it always shows agent not available.

Could someone please help identify what’s wrong with this setup?

poornimanar_0-1775828294763.png

 





0 REPLIES 0