# Update Weight

This action allows you to build flows that update the weight values on users associated with a [Queue](/kb/routing/queues.md). This allows you to control the relative number of "slots" that the user receives for round robin assignment.

There are two ways of using this action. You can either specify explicit values to use for weight via `weightValue` or you can "join" data from a field on the User via `weightField`. The "join" method will retrieve the value for the specified field from each User and copy it over to the custom object that associates the User with the Queue.

The Users must already be associated with the Queue or they will be ignored.

## Inputs

| Name        | Required | Type        | Description                                                                               |
| ----------- | -------- | ----------- | ----------------------------------------------------------------------------------------- |
| queue       | Yes      | String      | The name or id of a Gradient Works queue                                                  |
| users       | No       | List\<User> | Limit updates to only these users. Leave blank to update all users assigned to the queue. |
| weight      | No       | Long        | Weight to assign to users                                                                 |
| weightField | No       | String      | Retrieve weight value from this field on User object                                      |

## Outputs

| Name    | Type                                                                              | Description                                        |
| ------- | --------------------------------------------------------------------------------- | -------------------------------------------------- |
| weights | List<[QueueUserWeight](/kb/automation-builder-kit-abk/models/queueuserweight.md)> | Information about the weights applied to each user |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gradient.works/kb/automation-builder-kit-abk/actions/users/updatequeueuserweightaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
