Feedback

  • Contents
 

IS_Action_Close

Definition

Each campaign script is displayed on its own tab page in Interaction Scripter.  IS_Action_Close closes the current tab page. If on a Dialer call, close is only performed once the current call is disconnected/transferred and dispositioned. Scripter will recognize click events from any HTML element whose name has an associated action documented in this API (e.g.: "IS_Action_CallComplete"). If the script needs to associate several buttons with the same action, then define the action using a meta element and call the click event on the meta element from the button(s).

Attributes

[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_Close() {
  IS_Action_Close.callback = function(error) {
    if (error) {
      console.error("IS_Action_Close failed.");
    } else {
      console.log("IS_Action_Close succeeded.");
    }
  }
}

Example 1

This example creates a button that closes the current tab page

<body>
    <input type=button name="IS_Action_Close" value="Close">
</body>

Example 2

This status button example invokes a user-defined script function named "Close" to close the current tab page. 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_Close">
    <script language="JavaScript">
        function IS_CloseTab() {
            IS_Action_Close.click();
        }
    </script>
</head>
<body>     <input type=button value="Close Tab" onclick="IS_CloseTab();"> </body>