Feedback

  • Contents
 

IS_Action_ClientStatus

Definition

This action provides the ability to change a user status within a script. It changes the agent's CIC client status—an availability indicator that affects the processing of calls directed to the agent. To receive calls in a campaign, an agent's client status must be set to an "available" status condition code. Status indicators are defined in Interaction Administrator's "Status Messages" container (as Message Names). Some of the default status indicators are:

At a Training Session

At Lunch

Available

Available, Follow-Me

Available, Forward

Available, No ACD

Away From desk

Do Not Disturb

Gone Home

In a Meeting

On Vacation

Out of the Office

Out of Town

Working at Home

 

Any status other than "Available", "Available, Forward" or "Available, No ACD" sends incoming calls to the agent's voice mailbox.  For example, an agent whose status is "At Lunch" will not receive calls. 

Attributes

This action as three properties, only one is required the other two are optional. The code snippet below uses statuskey, which is the localized value of the status. This is appropriate to use if the script is being developed for another language. The IS_Action_ClientStatus element accepts the following attributes:

statusid

The value to change the users' status to (e.g. "Available").

[until]

Optional DATETIME that determines when this status condition will expire. Think of this as the date and time that the status is valid until. This only applies to statuses that allow DateTime option.

[statuskey]

Optional language-independent attribute that allows a script to change status by specifying a message name, such as "Available", rather than a localized status Message. This frees the script developer from having to know the localized version of status strings.

For example, a script might set IS_Action_ClientStatus.statuskey = "AcdAgentNotAnswering", rather than use IS_Action_ClientStatus.statusid = "ACD – Agent Not Answering", which is language-dependent. For more information, see the Status Messages container in Interaction Administrator.

[callback]

The callback property ensures that this action executes asynchronously in Interaction Connect. Starting with 2018 R3, all Interaction Scripter actions (IS_Actions) provide a callback property for use in Connect scripts only. In the example below, statements inside the highlighted callback function block execute only after the action completes. The callback will return an error if the action fails. See Writing custom scripts for Interaction Connect or Scripter .NET.

Here's how to use the .callback property in a script for Interaction Connect:

function IS_Action_ClientStatus() {
  IS_Action_ClientStatus.statusid = 'Available';
  IS_Action_ClientStatus.callback = function(error) {
    if (error) {
      console.error("IS_Action_ClientStatus failed.");
    } else {
      console.log("IS_Action_ClientStatus succeeded.");
    }
  }
}

Example 1

Example 1 paints a button that sets the client status to the "Available".  

<head>
    <script language=javascript>
        function IS_Event_PreviewTimeoutStopped(args) {
            var id = args.interactionId;
            // insert other code here as needed...
        }
    </script>
</head>

Example 2

This status button example invokes a user-defined script function named "SetClientStatus" to change the agent's client status to "Available". When the button is clicked, the actual element that fires the event is a <meta> element in the non-visible <head> section of the document.  The <meta> element in the <head> section of the HTML page instantiates the action as a non-visual object. 

<head>
    <meta name="IS_Action_ClientStatus">
    <script language=javascript>
        function SetClientStatus(StatusId) {
            IS_Action_ClientStatus.statusid = StatusId;
            IS_Action_ClientStatus.click();
        }
    </script>
</head>
<body>   <input type=button value="Available" onclick="SetClientStatus('Available');" </body>

Example 3

<head>
    <meta name="IS_Action_ClientStatus">
    <script language=JavaScript>
        function IS_ChangeUserStatus(p_statusString, p_dtUntilDateTime) {
            IS_Action_ClientStatus.statuskey = p_statusString;
            if (p_dtUntilDateTime != null) {
                IS_Action_ClientStatus.until = p_dtUntilDateTime;
            }
            IS_Action_ClientStatus.click();
        }
    </script>
</head>
<body>     <input type=button value="Available" onclick="IS_ChangeUserStatus('Available');"> </body>