- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2021 01:31 AM
Before I log a Hi ticket for this I wanted to see if anyone here had some ideas.
In a couple of conversations we have the user is directed through a knowledge search along with some other deflections before being allowed through to an agent. When the time comes I am using the vaSystem.isLiveAgentAvailable(); function to determine if they can actually be routed to chat. This function also sets the context variable required to determine the correct chat queue.
If there isn't anyone available the user is presented with a list of options of what to do next and one of them is to try connecting to a Live agent again. This simply loops back round to the previous decision branch to check again. As a note, this option is here because our agents sometimes all go unavailable forgetting that Agent Chat + Agent Workspace doesn't just queue users like Connect Chat used to when this happens.
If an agent is available before the first vaSystem.isLiveAgentAvailable(); occurs then the chat routes correctly. If an agent isn't available at first but then becomes available vaSystem.isLiveAgentAvailable(); will only evaluate to false on the re-check.
To confirm this I added a text output to return the following after "re-try an agent" is chosen:
return 'VA agent available: ' + vaSystem.isLiveAgentAvailable();
This always brings back: VA agent available: false
Has anyone else encountered this or can think of a way to "force" vaSystem.isLiveAgentAvailable(); to re-check?
Solved! Go to Solution.
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2021 02:24 AM
Thank you for taking the time to reply. To elaborate on our use case slightly:
After no agents are found to be available a choice question is presented with the options:
- Log a ticket on the portal (will likely embed this in at some point and have VA do it but this was the 'quick win' during the implementation)
- Try connecting to a Live agent again
- Try again later (leads to the end of the conversation)
You are right that it doesn't make too much sense having the option to try again right after it failed. The main reason for this is we also recently implemented Agent Workspace + Agent Chat. Agents keep forgetting to make themselves available as Connect Chat used to drop people into a queue to be picked up. I will likely end up removing the option in the future but this was the "middle ground" option so users mid conversation can potentially get through to a person once they have noticed and made someone available.
In terms of the issue - I found it was something to do with the routing rules on the Advanced Work Assignment module. We use context variables to determine which HR chat queue someone should go to and these weren't working on the second attempt. It was almost like a variable used for the queue determination was going blank for some reason.
I ended up resolving it by bypassing the inbuilt check and doing a glide query on the agent availability table. If any agents are found with a status that can have tickets assigned then someone is available.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2021 09:42 AM
Joe,
I recently built a similar flow in my demo environment where I also displayed the wait time before presenting the Agent Chat option to the user. (link with some details of my topic flow). In my sample flow, if nobody was online I went straight to incident submission, but you might have other options you'd like to present as well.
Agent available:
Agent not available:
In the situation you are trying to design for, it sounds like the split second between right before the user is given the routing choice and right after they choose live agent you want to double check that nobody came back online - is that correct? I would think that after the first check returns "false" you can safely present the other non-chat options. Why dangle an option in front of users they can't take advantage of? Also, with the loop you describe, it seems possible the user would get stuck in an infinite loop checking and rechecking and being returned with the "false" response each time.
Hope this helps!
Regards,
Travis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2021 02:24 AM
Thank you for taking the time to reply. To elaborate on our use case slightly:
After no agents are found to be available a choice question is presented with the options:
- Log a ticket on the portal (will likely embed this in at some point and have VA do it but this was the 'quick win' during the implementation)
- Try connecting to a Live agent again
- Try again later (leads to the end of the conversation)
You are right that it doesn't make too much sense having the option to try again right after it failed. The main reason for this is we also recently implemented Agent Workspace + Agent Chat. Agents keep forgetting to make themselves available as Connect Chat used to drop people into a queue to be picked up. I will likely end up removing the option in the future but this was the "middle ground" option so users mid conversation can potentially get through to a person once they have noticed and made someone available.
In terms of the issue - I found it was something to do with the routing rules on the Advanced Work Assignment module. We use context variables to determine which HR chat queue someone should go to and these weren't working on the second attempt. It was almost like a variable used for the queue determination was going blank for some reason.
I ended up resolving it by bypassing the inbuilt check and doing a glide query on the agent availability table. If any agents are found with a status that can have tickets assigned then someone is available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2023 11:51 PM
Can you please help me with that glide query script as I have the similar requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 04:41 AM
Hello @Travis Rogers I found this post and I thought you might help me.
I have a requirement from my client to add the functionality to create HR Cases if no HR Agent is available to chat. In de decision tree, right after the script action to call the Live Agent, I tried to add the function vaSystem.isLiveAgentAvailable() to compare if the connection was successful or not but, the chatbot always gets stucked in the OOTB output message of No Agents available.
Can you please re-share some more details about the topic you have posted here before?
Thanks a lot!
Best Regards,
Nuno