Manage your queue login status by dialing a dial code.

This script allows agents to toggle their queue login status by dialing predefined codes. Whether logging into or out of all assigned queues, agents can quickly adjust their availability without navigating menus. These scripts – Force Log in and Force Log out – showcase the flexibility of what you can do with a Call Processing Script. You may modify and optimize the script to do more according to your specific requirements.

How to Set Up the Script to Login for All Queues

  1. Go to Admin Console > Integrations > Call Scripts.
  2. Add from Store and select “Set Agent to Log in in Queues Status.”
  3. Assign a name to the script for easy identification.
  4. Select “Run this script when a user dials a dial code.”
  5. Add a dial code – for example *44.
  6. Select System Wide.

How to Set Up the Script to Logout for All Queues

  1. Go to Admin Console > Integrations > Call Scripts.
  2. Add from Store and select “Set Agent to Log out in Queues Status”
  3. Assign a name to the script for easy identification.
  4. Select “Run this script when a user dials a dial code.”
  5. Add a dial code for this – for example *55.
  6. Select System Wide.

How Agents Use It

  • To log in: Dial *44 (or your chosen code).
  • To log out: Dial *55 (or your chosen code).

Why Use These Scripts

  1. Simple Management: Agents can update their queue status instantly with dial codes.
  2. Time-Saving: Skip menus or interfaces for quick changes.
  3. Flexible Setup: Adjust dial codes and modify scripts for specific requirements

Example Script

DISCLAIMER! This script is for reference purposes only. For the latest version, download from the store.

Script: Ability to force Agent to Login to all queues


using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
namespace dummy
{
public class LoginToAllQueues : ScriptBase
{
public override async Task StartAsync()
{
if (MyCall.Caller.DN is Extension ext
&& MyCall.ReferredByDN is not DN)
{//------------login extension to all queues
ext.QueueStatus = QueueStatusType.LoggedIn;
foreach (var qa in ext.QueueMembership)
{
qa.QueueStatus = QueueStatusType.LoggedIn;
}
ext.Save();
MyCall.Info($"Extension {ext.Number} has been logged in to all queues");
//-----------play system prompt when done------
try
{
await MyCall.AssureMedia().ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), [ "LOGGED_IN" ], PlayPromptOptions.Blocked)).Unwrap();
}
catch(Exception ex)
{
}
return true;
}
return false;
}
}
}

Script: Ability to force Agent to Logout to all queues


using System;
using System.Threading.Tasks;
using TCX.Configuration;
using CallFlow;
namespace dummy
{
public class LogoutAndResetParticipation : ScriptBase
{
public override async Task StartAsync()
{
if (MyCall.Caller.DN is Extension ext && MyCall.ReferredByDN is not DN)
{
//----logout extension from all queues
ext.QueueStatus = QueueStatusType.LoggedOut;
foreach (var qa in ext.QueueMembership)
{
qa.QueueStatus = QueueStatusType.LoggedOut;
}
ext.Save();
MyCall.Info($"Extension {ext.Number} has been logged out from all queues"); //-------play system prompt
try
{
await MyCall.AssureMedia()
.ContinueWith(_ => MyCall.PlayPrompt(ext.GetPropertyValue("PROMPTSETID"), new[] { "LOGGED_OUT" }, PlayPromptOptions.Blocked))
.Unwrap();
}
catch
{
//nothing to do
}
return true;
}
return false;
}
}
}