---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Queue - Global

# Queue - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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
{#c_QueueAPI__ul_mxn_2kp_2gb}

## Queue - get(String queue_id) {#ariaid-title2}

Gets a queue record by sys_id.
{#r_queue_get__table_t4k_y54_3gb__entry__3}

| Name | Type | Description |
|-|-|-|
| queue_id | String | Represents sys_id of queue record from awa_queue table |
[Table 1. Parameters]

{#r_queue_get__table_t4k_y54_3gb} {#r_queue_get__table_u4k_y54_3gb__entry__2}

| Type | Description |
|-|-|
| Boolean | True if queue record exists, false otherwise. |
[Table 2. Returns]

{#r_queue_get__table_u4k_y54_3gb}  

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

## Queue -- route(Object options) {#ariaid-title3}

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.
{#r_QueueAWA_route__table_hqw_pbm_yfb__entry__3}

| 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 {#r_QueueAWA_route__ul_xjk_4qv_dgb} |
[Table 3. Parameters]

{#r_QueueAWA_route__table_hqw_pbm_yfb} {#r_QueueAWA_route__table_iqw_pbm_yfb__entry__2}

| Type | Description |
|-|-|
| Boolean | True if successful, error message otherwise. |
[Table 4. Returns]

{#r_QueueAWA_route__table_iqw_pbm_yfb}  

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


