> For the complete documentation index, see [llms.txt](https://docs.fulfillmenttools.com/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fulfillmenttools.com/documentation/by-pillar/store-operations/assign-user-to-jobs.md).

# Assign user to jobs

Users can be assigned to fulfillmenttools jobs to designate responsibility for the work. This function helps distribute the workload in advance among different employees. The user must exist in the system before they can be assigned to a job.

{% hint style="warning" %}
Assigning a user to a job is for informational purposes only. fulfillmenttools doesn't restrict job interactions to the assigned user; any user with the appropriate permissions can interact with the job.
{% endhint %}

User assignment is available for the following job types:

* Pick jobs
* Pack jobs
* Handover jobs
* Service jobs
* Stow jobs

## Assignment during job creation

To assign one or more users when a job is created, include the `assignedUsers` array in the request body.

```http
POST https://ocff-{projectId}.api.fulfillmenttools.com/api/{JOB_ENTITY}
```

The `{JOB_ENTITY}` placeholder represents the specific job endpoint, such as `pickjobs` or `packjobs`. The body must include the `assignedUsers` array as shown in the following examples.

{% tabs %}
{% tab title="By `userId`" %}
This example assigns a user by their `userId`.

```json
{
  // Any job object
  ...
  "assignedUsers": [
    {
      "userId": "{USER_ID}"
    }
  ]
}
```

{% endtab %}

{% tab title="By `userName`" %}
This example assigns a user by their `userName`.

```json
{
  // Any job object
  ...
  "assignedUsers": [
    {
      "userName": "{USER_NAME}"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Updating assigned users

The `REPLACE_ASSIGNED_USERS` action updates the users assigned to a job. This action fully replaces the existing list of assigned users with the new list provided in the request body. If an empty array is provided, all current assignments are removed.

```http
POST https://ocff-{projectId}.api.fulfillmenttools.com/api/{JOB_ENTITY}/actions
```

The action body must conform to one of the following examples.

{% tabs %}
{% tab title="By `userId`" %}
This example replaces the assigned user list using a `userId`.

```json
{
  "name": "REPLACE_ASSIGNED_USERS",
  "assignedUsers": [
    {
      "userId": "{USER_ID}"
    }
  ],
  "version": 2
}
```

{% endtab %}

{% tab title="By `userName`" %}
This example replaces the assigned user list using a `userName`.

```json
{
  "name": "REPLACE_ASSIGNED_USERS",
  "assignedUsers": [
    {
      "userName": "{USER_NAME}"
    }
  ],
  "version": 2
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fulfillmenttools.com/documentation/by-pillar/store-operations/assign-user-to-jobs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
