- Contents
Interaction Scripter Developer's Guide
Queue.connect Method
Definition
This method connects to a specific CIC queue. Starting in 2018 R3, this method is asynchronous, meaning that it can accept a single optional callback argument that takes no parameters. In addition, Queue.connect no longer supports Line Queue as a Type parameter. Scripts for Scripter .NET do not need to specify a callback, but scripts for Connect must specify it.
Syntax
Queue.connect(Type, Name);
Prototype
Queue.connect(
[in] int Type,
[in] string Name
)
Input Parameters
- Type
-
Type is an integer representing a queue type. Valid values for queue types are:
3
Station queue
9
User queue
10
Workgroup queue
- Name
-
The name of the queue that you wish to connect to the queue object.
Return Values
None.
Example
Connect to a queue, using a callback to wait asynchronously for the connection to be made.
// Connect a queue
var queue = scripter.myQueue;
queue.connect(9, 'user1', function() {
queue.startObjectIdsEnum(function(result) {
while (result.hasMoreElements()) {
console.log('Id:', result.nextElement());
}
});
});
See also Queue.callObjectAddedHandler.