Feedback

  • Contents
 

IS_Action_Transfer

Definition

This call control action transfers the call specified by the call ID attribute. It provides the ability to either do a blind transfer or a consult transfer on the current call that is on the users queue. The agent can either talk with the recipient before transferring the call (consult transfer) or transfer the call directly to the recipient without consultation (blind transfer). 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_Transfer element has the following attributes:

callid

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

consult

Flags that this transfer is the beginning of a two-stage consult transfer call (e.g. "True").

recipient

If Consult call, the call ID of the recipient, otherwise the number of this recipient (e.g. "555-1212" or "101"). IS_Action_Transfer fails without a valid recipient. In the examples below, the agent who receives the transferred call must be running Interaction Scripter. If the call is transferred to an agent who is not running Interaction Scripter, the record must be dispositioned by the transferring agent first. See also: IS_Action_WriteData and Dialer disposition actions if you are writing an outbound call script.

audience

This parameter is used with Interaction Connect scripts only. It toggles between participants of a consult transfer call. Use this parameter only after a consult transfer has been initiated. See Example 5 below.

neither

Places both parties of the conference on hold.

caller

Enables communication between the agent and the original party. The consulted party is placed on hold.

consultant

Enables communication between the agent and the consulted party. The original party is placed on hold.

both

Enables 3 way communication between the original party, agent, and consulted party.

See also IS_Action_CompleteConsult.

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, IS_Action_Transfer's callback property won't execute statements in its function code block until the transfer completes successfully.

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

function IS_Action_Transfer() {
  IS_Action_Transfer.callid = 1234;
  IS_Action_Transfer.consult = False;
  IS_Action_Transfer.recipient = '377-522-2222';
  IS_Action_Transfer.callback = function(error) {
    if (error) {
      console.error("The Transfer action failed.");
    } else {
      console.log("The Transfer action was a success");
    }
  }
}

Statements inside the callback function block (highlighted above) 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.


Example 1

This is an example of a "Transfer to Ext. 101" button that transfers the current call to the user queue& at extension 101. This is an example of a blind transfer, where the call is transferred without consulting beforehand.

<body>
    <input type=button name="IS_Action_Transfer" value="Transfer to Ext. 101" consult="False" recipient="101">
</body>

Example 2

This is an example of a "Transfer to Ext. 101" button that invokes the "BlindTransfer" script function. The "BlindTransfer" script function transfers the current call to the specified number (in this example, extension 101). This is an example of a blind transfer, where the call is transferred without consulting beforehand.

<head>
    <meta name="IS_Action_Transfer">
    <script language="javascript">
        function IS_BlindTransfer(p_Number) {
            IS_Action_Transfer.recipient = p_Number;
            IS_Action_Transfer.consult = false;
            IS_Action_Transfer.click();
        }
    </script>
</head>
<body>     <input type=button value="Transfer To 101" onclick="IS_BlindTransfer('101');"> </body>

Example 3

This example sets up a Consult transfer.

<head>
    <meta name="IS_Action_Transfer">
    <meta name="IS_Attr_CallId">
    <script language="javascript">
        function Transfer(number) {
            scripter.callObject.id = -1;
            scripter.callOjbect.dial(number, false);
            IS_Action_Transfer.consult = true;
            IS_Action_Transfer.recipient = scripter.callobject.id;
            Alert("Press OK when ready to continue");
            scripter.callObject.id = IS_Attr_CallId.value;
            scripter.callObject.pickup();
            IS_Action_Transfer.click();
        }
    </script>
</head>
<body>
    <input type=button value="Consult Transfer to 101" onclick="Transfer('101');">
</body>

Example 4

function ConsultTransfer(p_Number) {
    var p_mCallObj = scripter.createCallObject();
    var iRes1 = confirm("Would you like to call the 3rd party?");

    // user selected OK, so let's call the 3rd party     if (iRes1) {         p_mCallObj.dial(p_Number, false);
        // set up the consult transfer         IS_Action_Transfer.consult = true;
        // set up the recipient call object         IS_Action_Transfer.recipient = p_mCallObj.id;
        var iRes2 = confirm("Press OK when you are ready to transfer the call");
        //Transfer call to third party         if (iRes2) {             scripter.callObject.id = IS_ATTR_CallId.value;
            // pick up the call, it is probably on hold             scripter.callObject.pickup();
            // now execute the Consult transfer that has been set up             IS_Action_Transfer.click();
        } else {             // they did not want to transfer, so lets disconnect the 3rd party             // call and pick up the original call             // disconnect 3rd party call             p_mCallObj.disconnect();
            // pick up original call             scripter.callObject.id = IS_ATTR_CallId.value;             scripter.callObject.pickup();         }     } }

Example 5 (Interaction Connect only)

This example shows how to use the audience parameter in a script for Interaction Connect to toggle between different legs of a consult transfer call.

IS_Action_Transfer.recipient = "1234";
IS_Action_Transfer.consult = true; 
IS_Action_Transfer.click(); // A consult transfer is initiated. The agent is speaking with the consulted party and the original party has been placed on hold.
IS_Action_Transfer.audience = "caller"; IS_Action_Transfer.click(); // The agent is now speaking with the original party, and the consulted party is placed on hold. IS_Action_Transfer.audience = "neither"; IS_Action_Transfer.click(); // Both parties of the conference are placed on hold.
IS_Action_Transfer.audience = "both"; IS_Action_Transfer.click(); // The agent is now speaking with both parties of the conference.