# List run assignments `GET` `/api/v1/crm-connections/{crm_connection_id}/retrievals/runs/{run_id}/assignments` Returns paginated assignment records for a retrieval run. Each assignment includes the assigned record, new/previous owner. ## Path parameters | Name | Type | Required | Description | |------|------|----------|-------------| | crm_connection_id | string | yes | UUID of the CRM connection | | run_id | string | yes | Salesforce ID of the retrieval run | ## Query parameters | Name | Type | Required | Description | |------|------|----------|-------------| | limit | string | no | Maximum number of assignments to return per page (default: 50). | | next_records_url | string | no | Cursor returned by a previous response to fetch the next page of assignments. When provided, all other query params are ignored. | | sort_by | string | no | Field to sort assignments by: assigned_at (default), record_name, new_owner_name, previous_owner_name, created_at, or updated_at | | sort_direction | string | no | Sort direction: DESC (default) or ASC | ## Response `200 OK` — `application/json` | Field | Type | Description | |-------|------|-------------| | assignments | array[object] | Assignment records | | assignments.id | string | Salesforce ID of the assignment record | | assignments.name | string | Record name | | assignments.created_at | string | ISO-8601 creation timestamp | | assignments.updated_at | string | ISO-8601 last-modified timestamp | | assignments.assignment_type | string | Assignment type: Queue, Direct, or Other | | assignments.assigned_time | string | ISO-8601 timestamp when the assignment was made | | assignments.assigned_by | object | User who triggered the assignment | | assignments.assigned_by.id | string | Salesforce User ID | | assignments.assigned_by.name | string | User display name | | assignments.record | object | The CRM record that was assigned | | assignments.record.id | string | Salesforce ID of the assigned record | | assignments.record.type | string | Salesforce object type (Account, Contact, Lead, Opportunity) | | assignments.record.field | string | Salesforce field updated by the assignment | | assignments.record.name | string | Name of the assigned record | | assignments.new_owner | object | User the record was assigned to | | assignments.new_owner.id | string | Salesforce User ID | | assignments.new_owner.name | string | User display name | | assignments.previous_owner | object | Previous owner (null if record had no prior owner) | | assignments.previous_owner.id | string | Salesforce User ID | | assignments.previous_owner.name | string | User display name | | assignments.queue | object | Queue context (null for non-Queue assignments) | | assignments.queue.id | string | Salesforce Queue ID | | assignments.queue.name | string | Queue name | | assignments.queue.item_id | string | Salesforce ID of the associated Gradient Works queue item | | assignments.request_id | string | Request ID associated with this assignment | | assignments.flow | object | Flow context (null when the assignment was not triggered by a Salesforce Flow) | | assignments.flow.name | string | Name of the flow that ran | | assignments.flow.version | number | Version of the flow that ran | | assignments.flow.version_durable_id | string | Durable ID of the flow version | | assignments.flow.interview_guid | string | GUID of the flow interview | | assignments.distribution | object | Distribution run that produced this assignment (null if not from a distribution) | | assignments.distribution.id | string | Salesforce ID of the run | | assignments.distribution.name | string | Name of the distribution or retrieval definition | | assignments.retrieval | object | Retrieval run that produced this assignment (null if not from a retrieval) | | assignments.retrieval.id | string | Salesforce ID of the run | | assignments.retrieval.name | string | Name of the distribution or retrieval definition | | assignments.detail | string | Additional assignment detail | | assignments.book_definition_matches | array[object] | Target books and segments matched for this assignment. Only populated for distribution assignments when include_book_matches=true; null for retrievals and manual or queue assignments. | | 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. | ## Errors | Status | Description | |--------|-------------| | 400 | Bad Request | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 502 | Bad Gateway |