# List queues `GET` `/api/v1/crm-connections/{crm_connection_id}/queues` Return Gradient Works queues for the given Salesforce CRM connection. Supports filtering by assignment policy, target book queue flag, async flag, capacity meter, and name search. Default page size is 50. Pass next_records_url from one response into the next request to paginate through large result sets. ## Path parameters | Name | Type | Required | Description | |------|------|----------|-------------| | crm_connection_id | string | yes | UUID of the CRM connection | ## Query parameters | Name | Type | Required | Description | |------|------|----------|-------------| | policy | string | no | Filter by assignment policy. Comma-separated list of: Adaptive, Round Robin, Schedule First Available. | | is_target_book_queue | string | no | When true, returns only target book queues (Type__c = 'Target Book'). When false, returns only standard queues (Type__c is null or any other value). Omit to return all queues. | | is_async | string | no | Filter by whether assignments are processed asynchronously | | capacity_meter_id | string | no | Filter by the Salesforce ID of the linked capacity meter | | query | string | no | Search by queue name (min 2 characters) | | sort_by | string | no | SOQL field on GradientWorks__Queue__c (or a dotted relationship path) to sort by, e.g. GradientWorks__Capacity_Meter__r.Name. Default: LastModifiedDate. | | sort_direction | string | no | ASC or DESC | | limit | string | no | Maximum number of queues to return (default: 50). | | next_records_url | string | no | Cursor returned by a previous response to fetch the next page. When provided, all other query params are ignored. | ## Response `200 OK` — `application/json` | Field | Type | Description | |-------|------|-------------| | queues | array[object] | List of queue records | | queues.id | string | Salesforce ID of the queue record | | queues.name | string | Queue name | | queues.type | string | Raw value of the Salesforce Type__c field. Typically null (standard queue) or 'Target Book' (target book queue); other values may appear if set directly in Salesforce. | | queues.assignment_policy | string | Assignment policy: Adaptive, Round Robin, or Schedule First Available | | queues.assignment_field | string | Field on the assigned record that stores the assigned user | | queues.capacity_meter | object | Linked capacity meter (null if none) | | queues.capacity_meter.id | string | Salesforce ID of the capacity meter | | queues.capacity_meter.name | string | Capacity meter name | | queues.last_assignment_time | string | ISO-8601 timestamp of the most recent assignment | | queues.next_slot_index | number | Next round-robin slot index | | queues.post_assignment_automation | string | API name of a Flow to execute after assignments complete for this queue | | queues.async_assignment | boolean | Whether assignments for this queue are always performed asynchronously. Target book queues always use asynchronous assignment. | | queues.standard_queue_id | string | Salesforce ID of the linked standard Group (Queue) | | queues.user_weight_field | string | Field on User used to weight round-robin distribution | | queues.user_maximum_capacity | number | Default maximum capacity per user for this queue's members | | queues.user_maximum_capacity_field | string | DEPRECATED — name of the field on User formerly used to source per-user maximum capacity. No longer read by the managed package; retained for troubleshooting only. | | queues.user_used_capacity_field | string | DEPRECATED — name of the field on User formerly used to source per-user used capacity. No longer read by the managed package; retained for troubleshooting only. | | queues.created_at | string | ISO-8601 creation timestamp | | queues.updated_at | string | ISO-8601 last-updated timestamp | | next_records_url | string | Pass this value as next_records_url on the next request to fetch the following page. Null when all records have been returned. Only present when limit exceeds Salesforce's per-page maximum (2000 records). | ## Errors | Status | Description | |--------|-------------| | 400 | Bad Request | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 502 | Bad Gateway |