Queue a Script to launch at the end of a script run
The Queue Scripts code allows an additional script or scripts to be queued after the current script is completed (effectively queuing multiple activities). For example, a survey script could be queued based on the customer completing an order page, or an agent break script triggered once a sale has been completed. The Queue Script feature is used to link scripts by:
Depending on how the system is configured the Activity button will contain the existing and new script names, allowing the agent to navigate backwards and forwards between the old and new script, and view data from each as necessary:
The code listed below should be placed in JavaScript or JavaScript - Button controls, and not using a Calculate control (which continues to fire the code and will queue up multiple scripts).
There is no visibility of the actual script queue in the Agent Desktop, and there is no return value using the Queue object code.
ExampleIn this example an inbound script is opened, and data is passed from the current to the destination script using variables:
Script.Queue.QueueInboundCall(true, '123456',[var_CLI],
{
var_variableInDestinationScript:[var_variableInCurrentScript]
});
Or if a control name was being used, the code would look like this:
Script.Queue.QueueInboundCall(true, '123456',[var_CLI],
{
CustomerName:[CustomerName]
});
Code breakdown:
|