Show Options in Virtual Agent Chat if no agents are available

Rohit Agarwal1
Tera Contributor

Hi,

 

I have a requirement. In Live agent chat if no agents are available, then system should show below message

Message:

Sorry, but at this time Chat support is not available. Would you like to:

Report an issue Topic >> this is link to another topic to create an incident

or

Show me everything> >> this link will show all topics

 

Any suggestion  to implement this?

 

@Ankur Bawiskar : Any suggestion?

 

Thanks

4 REPLIES 4

AnubhavRitolia
Mega Sage
Mega Sage

Hi @Rohit Agarwal1 

 

You can have a decision VA utility where using script you can check if no agents are available, you can redirect decision path to a choice User Input where you can give option to user to select Report an issue or any option like Need further help. If user select 'Report an issue' you can make flow to go to particular topic block and if 'Need further help' can loop the flow back to the beginning.

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Aman Kumar S
Kilo Patron

Hi,

You can follow below article to achieve the same:

Offer user more options when live agent is unavailable 

Virtual Agent - Agent not available message replacement 

Best Regards
Aman Kumar

reshmakore57046
Tera Expert

Hi,

  1. Go to the application navigator>Conversatinal Interface>virtual agent>designer & create topic.
  2. Follow the attached image & add the below scripts.

Agent Availability:

(function execute() {

  if(vaSystem.isLiveAgentAvailable() == true){

      vaVars.available = true;

      return true;

  }

  else{

      gs.info('in else');

      vaVars.available = false;

      return false;

  }

})()

 

Agent Not Available 

(function execute() {

    if(vaVars.available == false){

      return true;

  }

  else{

      return false;

  }

})()

 

Agent Available

(function execute() {

     if(vaVars.available == true){

         return true;

  }

  else{

            return false;

  }

})()


Create Incident

(function execute() {

   var catItemSysId;

   var catalogItem = new GlideRecord('sc_cat_item');

   catalogItem.addEncodedQuery('name=Create Incident');

   catalogItem.query();

   if(catalogItem.next()){

         catItemSysId = catalogItem.sys_id;

   }

  var header = "Add your msg here";

     var label = "Create a Incident";

     var link = "/esc?id=sc_cat_item&sys_id="+catItemSysId;

         var display = "<p>"+header+"</p><br/><a href="+link+" target='_blank'>"+label+"</a>"+"<br/>";

     return display;

})()

 

Best Regards,
Reshma Kore.

 

Aishwarya_01
Tera Contributor

Hello @reshmakore57046 
could you please reshare the image? I am not able to see it clearly
Thanks!