- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-13-2023 03:32 AM
I want to show a no agent available message based on the Schedule time
if it is falling during the Schedule time then the message should display 'No agents available to take the chat, all are busy in other chat'
if it is falling outside the Schedule time then the message should display 'All agents are offline now, please contact during the working hours 8AM-5PM Mon-Fri'
@Mark Roethof
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2023 11:11 AM - edited ‎06-19-2023 11:29 AM
Remove lines 2,9 and 10. Sorry about that as I should have noticed that when you added that directly in the workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 11:11 AM - edited ‎06-18-2023 11:14 AM
You don't need to include a schedule as its all based on the presence of the agents being online. AKA no agent available in Agent Workspace they would automatically default to the no agent online section of your workflow based on what we talked about earlier. I also created a new article for this. Here is the link - Solved: How to handle agents online/offline status for Liv... - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 11:16 AM
if it is falling during the Schedule time then the message should display 'No agents available to take the chat, all are busy in other chat'
if it is falling outside the Schedule time then the message should display 'All agents are offline now, please contact during the working hours 8AM-5PM Mon-Fri'
How to achieve this in the Workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 11:19 AM - edited ‎06-19-2023 11:41 AM
If the schedule is important to you then you can create another script variable and do something like this then include that in your condition for the agent not online decision
(function execute() {
var schedule = new GlideSchedule("ENTER SYS ID HERE"); //THIS IS MY HOLIDAY SCHEDULE
if(schedule.isInSchedule(new GlideDateTime())){
return true;
} else {
return false;
}
})()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 11:50 AM
Not sure where I'm wrong I wrote the above script in the Workflow but I don't see the Output coming for this script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2023 11:53 AM
No, create a variable then put that created variable in the decision condition. Then in the workflow you only need to add your response text message. This is the same process as what you should have done for the agent status.