Feedback

  • Contents
 

IS_Action_PlaceCall

Definition

This action allows an agent to place another call from within the script that is loaded in Scripter.  The call can be placed to another extension or an external phone number.

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_PlaceCall element has the following attributes:

recipient

The number of this recipient (e.g. "555-1212", or "101").  IS_Action_PlaceCall fails without a valid recipient.

[page]

URL of page to open after the call is placed.

[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_PlaceCall() {
  IS_Action_PlaceCall.recipient = "555-1212";
  IS_Action_PlaceCall.callback = function(error) {     if (error) {       console.error("IS_Action_PlaceCall failed.");     } else {       console.log("IS_Action_PlaceCall succeeded.");     }   } }

Example 1

This is an example of a "Place a Call" button that allows the agent to place a call (in this case, to extension 101).

<body>
    <input type=button name="IS_Action_PlaceCall" value="Call Ext. 101" recipient="101">
</body>

Example 2

This is an example of a "Place a Call" button that invokes the "PlaceCall" script function. The "PlaceCall" script function places a call (in this case, to extension 101).

<head>
    <meta name="IS_Action_PlaceCall">
    <script language=javascript>
        function PlaceCall(recipient) {
            IS_Action_PlaceCall.recipient = recipient.value;
            IS_Action_PlaceCall.click();
        }
    </script>
</head>
<body>     <input type=button value="Call Ext. 101" onclick="PlaceCall('101');"> </body>

Example 3

<head>
    <meta name="IS_Action_PlaceCall">
    <script language="javascript">
        function IS_PlaceCall(p_Number, p_Page) {
            IS_Action_PlaceCall.recipient = p_Number;
            IS_Action_PlaceCall.click();
            if (p_Page != null) location.href = p_Page;
        }
    </script>
</head>
<body>     <input type=button value="Place Call" onclick="IS_PlaceCall(‘3178723000');"> </body>