Feedback

  • Contents
 

IS_Action_Hold

Definition

This action places the current call (or the call specified by the callid attribute) on hold. To take a call off hold, an agent must invoke the IS_Action_Pickup element. The current or active call of the current campaign in the queue is assumed to be the target of this action, if the callid attribute is not set. 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

The IS_Action_Hold element has the following attribute:

[callid]

The callid to which this action applies (e.g. "89900001").  The callid is optional. Dialer scripts use the current Dialer callid by default.  A "debug mode" error is logged for non-Dialer scripts if callid attribute is not specified.

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

Example 1

This is an example of a "Hold" button that allows the agent to hold a call.

<body>
    <input type=button name="IS_Action_Hold" value="Hold">
    <input type=button name="IS_Action_Pickup" value="Pickup">
</body>

Example 2

This example places the call specified by the callid attribute on hold.

<head>
    <meta name="IS_Action_Hold">
    <script language="javascript">
        function IS_HoldCall(p_page, p_CallId) {
            if (p_CallId != null) {
                IS_Action_Hold.callid = p_CallId;
            }
            IS_Action_Hold.click();
            if (p_page != null) location.href = p_page;
        }
    </script>
</head>
<body>     <input type=button value="Put Call On Hold" onclick="IS_HoldCall();"> </body>

Example 3

This is an example of a toggle-style "Hold" button that invokes the "Hold" script function.  Note that <meta> elements in the <head> section of the HTML& document instantiate the actions as non-visual objects.

<head>
    <meta name="IS_Action_Hold">
    <meta name="IS_Action_Pickup">
    <script language=javascript>
        var onHold = false;
        function ToggleHold() {
            if (onHold) {
                onHold = false;
                IS_Action_Pickup.click();
            } else {
                onHold = true;
                IS_Action_Hold.click();
            }
        }
    </script>
</head>
<body>     <input type=button value="Hold" onclick="ToggleHold();"> </body>