Feedback

  • Contents
 

IS_Action_CompleteConsult

Definition

This action ends a consult call in scripts for Interaction Connect only.

When a consult transfer action is called from a custom script in Scripter.NET, an IceLib call is made to complete the consult interaction. The consulted party and the original party are connected and the agent is removed from the call.

But in Interaction Connect, an Interaction Center Web Services (ICWS) call must be made to start a consult interaction before the consult transfer can be completed. Because of this difference in client behavior, developers should use the "IS_Action_CompleteConsult" action to cancel or complete a consult transfer.

Attributes

action

Set this attribute to "complete" to complete the consult call, or "cancel" to cancel the consult call.

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

Example

To create a consult transfer:

IS_Action_Transfer.consult = true;
IS_Action_Transfer.recipient = "1234";
IS_Action_Transfer.click(); // This will initiate the call to "1234". 
// The dialer call is placed on hold and the agent is speaking with the consulted party.

At this point, the "audience" attribute of an IS_Action_Transfer can be used to toggle between participants of the consult interaction.

To complete the consult transfer:

IS_Action_CompleteConsult.action = "complete";
IS_Action_CompleteConsult.click();

To cancel the consult transfer:

IS_Action_CompleteConsult.action = "cancel";
IS_Action_CompleteConsult.click();