The Queue API (Advanced Work Assignment) provides methods to route a document to a queue.

This API is provided within the sn_awa namespace.

Requires the following:
  • Advanced Work Assignment plugin (com.glide.awa)
  • Role: awa_integration_user or admin

Queue - get(String queue_id)

Gets a queue record by sys_id.

Table 1. Parameters
Name Type Description
queue_id String Represents sys_id of queue record from awa_queue table
Table 2. Returns
Type Description
Boolean True if queue record exists, false otherwise.

Example

var queue = sn_awa.Queue.get("<queue_id>");
var workItem = queue.route({ 
    document_sys_id: "<sys_id>",
    document_table: "<table>"
});

Queue – route(Object options)

Routes an active work item to the queue object.

If an active work item does not exist for the specified document, this method creates a work item and set its fields accordingly.

Table 3. Parameters
Name Type Description
options Object Contains document sys_id and table associated with work item:
  • document_sys_id: "<sys_id>"
  • document_table: "<table>", e.g., interaction
Table 4. Returns
Type Description
Boolean True if successful, error message otherwise.

Example

var queue = sn_awa.Queue.get("<queue_id>");
var workItem = queue.route({ 
    document_sys_id: "<sys_id>",
    document_table: "<table>"
});