Skip to main content

hasOperatorsOnline

This function checks whether there are any customer service agents available online.

It returns either of the following:

  • true, if there are customer service agents online;
  • false, if no customer service agents are online;
  • null, if the live chat is not configured for the channel.
tip
If a check for a particular group of customer service agents is required, its name can be passed as a string parameter: hasOperatorsOnline("MessageGroup").

How to use

state: Switch
q: customer service
if: hasOperatorsOnline()
// switch
else:
a: Unfortunately, there are no customer service agents available at the moment.