Feedback

  • Contents
 

IS_Action_RequestLogoff

Definition

This action requests an Agent logout. When the logoff request is granted, Interaction Scripter closes the outbound tab. It accepts an optional campaigns attribute, which can be used to request a logout for specific campaigns. If that attribute is not populated, then the action requests a logout for all campaigns. The format of the attribute is a list of campaign names separated by commas. If a campaign name contains a comma it can be escaped by encoding it for HTML e.g. ,

Attributes

The IS_Action_RequestLogoff element has these attributes:

campaigns

An optional list of campaign names separated by commas, to log out of.

[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_RequestLogoff() {
  IS_Action_RequestLogoff.campaigns = "Acme Collections";
  IS_Action_RequestLogoff.callback = function(error) {     if (error) {       console.error("IS_Action_RequestLogoff failed.");     } else {       console.log("IS_Action_RequestLogoff succeeded.");     }   } }

Example

This example creates a "Logoff" button that invokes the "IS_Action_RequestLogoff" script function.

<head>
    <meta name="IS_Action_RequestLogoff">
    <script language=javascript>
        function Logoff() {
            IS_Action_RequestLogoff.click();
        }
    </script>
</head>
<body>     <input type=button value="Logoff" onclick="Logoff();"> </body>