# Client Assignment

{% hint style="info" %}
The Client Assignment automatically assigns Technicians to Clients according to a flexible configuration that is based on Status and if needed, on specific [Client Groups](https://rollouter.gitbook.io/guide/rollout-managers/working-with-clients/client-groups) within that Status.

It ensures efficient and consistent Client distribution while freely allowing adjustments and also manual overrides when required.
{% endhint %}

The Client Assignment can be configured under `Rollout -> Client Assignment`, by Users who are at least `Rollout Manager`.

This feature is only available in  `Enterprise` Rollout projects.

***

## Configuration

On the Client Assignment page, all Inventories within the Rollout are listed with an indicator, whether or not an Client Assignment is active.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FWDhrykPiFUc7NGIKM79d%2Fimage.png?alt=media&#x26;token=cde1f378-5467-437c-9c85-3c73fede4ebf" alt=""><figcaption></figcaption></figure>

By selecting an Inventory, the corresponding Client Assignment configuration page opens up. For a new Project, the Assignment is <mark style="color:red;">disabled</mark>, i.e. empty.

The Client Assignment Configuration reflects the Inventory's [Workflow](https://rollouter.gitbook.io/guide/rollout-managers/setup/workflows) and all Users who are at least `Technician` and assigned to the Rollout.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FcLgN6GY63ue8IeThtV37%2Fimage.png?alt=media&#x26;token=2b791dd6-9478-487a-bbca-c61c05acf224" alt=""><figcaption></figcaption></figure>

Its possible to further refine the Configuration by adding Client Groups per Workflow Status by using the `+ Client Group` button.

In the resulting modal, Client Groups can be selected.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FEoAUtc2hDLA62VEipWLk%2Fimage.png?alt=media&#x26;token=18b32e86-6101-418f-85b3-2f330d81242d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The Client Groups must be configured for each Status individually.
{% endhint %}

After confirming the Client Groups with the `Add` button, the Client Assignment Configuration displays every Group as a seperate box within a Status.

To remove Client Groups from a status, simply press the `x` button.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2F8PT2VedapbNDmfzX9jRk%2Fimage.png?alt=media&#x26;token=a938cab0-c18a-464b-ac8f-5241d61ab997" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The `All other Clients` box is displayed be default and cannot be removed.

In case there are no Client Groups, it will say `All Clients` instead.
{% endhint %}

The boxes within the Configuration can be filled by simply utilizing drag & drop, choosing the responsible Users from the right-hand side Technicians table.

Each User can be responsible for several Groups within one Status.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FPhVbea7RFkSRSqXzlUBQ%2Fimage.png?alt=media&#x26;token=519d5133-ecfa-45b7-9bbf-d6a436103690" alt=""><figcaption></figcaption></figure>

After finishing the Client Assignment Configuration it must be saved using the `Update Assignment` button.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FrtsK2YlKtFZptri16ZRA%2Fimage.png?alt=media&#x26;token=bfcabf8f-d3f1-4842-8856-8e88e3d030d5" alt=""><figcaption></figcaption></figure>

In the resulting modal, the User has the choice between simply saving the Configuration or choosing between the two additional options:

| Additional Options                        | Effect when selected                                                                                                                                                                                                                                                                                                                                           |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Update assignees immediately after saving | All Clients **without** Assignee will immediately get assigned according to the Configuration.                                                                                                                                                                                                                                                                 |
| Override already assigned clients         | <p>All Clients - <strong>with</strong> or <strong>without</strong> Assignee - will immediately get (re-)assigned according to the Configuration.<br><br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> This can be conveniently used to remove all Assignees by first resetting the Configuration and then executing this option.</p> |

{% hint style="success" %}
Without any of the additional options, the Configuration will take effect upon **all future Status changes**.
{% endhint %}

The `Reset` button will return the Configuration to its empty state.

***

## Assignment Logic

### Distribution

The Clients get distributed according to the Configuration **evenly** between **all responsible** Technicians.\
For 3 Technicians responsible this would mean on Status change:

* `Client A` -> `Technician 1`
* `Client B` -> `Technician 2`
* `Client C` -> `Technician 3`
* `Client D` -> `Technician 4`
* and so on...

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2F67lR0eC1rxxu3cC7rk4q%2Fimage.png?alt=media&#x26;token=3e44f15d-4ddc-49a8-a53b-cb0264a2b9ec" alt=""><figcaption></figcaption></figure>

### Client Groups

It is possible that one Client is part of several Client Groups, that are also part of our Client Assignment Configuration. In this case, the Assignment is determined by the [Client Group](https://rollouter.gitbook.io/guide/rollout-managers/working-with-clients/client-groups#client-group-order) **highest in order**.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2Fz6jSkwQqasvUT9RqfxMc%2Fimage.png?alt=media&#x26;token=b60f977d-7b61-473b-9d7e-90ffd1de819c" alt=""><figcaption></figcaption></figure>

In the exemplary Configuration above, the following Assignees result:

| Client Group(s)                                                                                                                                         | Assignee       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| <mark style="color:red;">Management</mark>                                                                                                              | `Technician_1` |
| <mark style="color:red;">Management</mark>, <mark style="color:green;">Finance & Controlling</mark>                                                     | `Technician_1` |
| <mark style="color:green;">Finance & Controlling</mark>                                                                                                 | `Technician_3` |
| <mark style="color:purple;">Human Resources</mark>, <mark style="color:green;">Finance & Controlling</mark>                                             | `Technician_2` |
| <mark style="color:red;">Management</mark>, <mark style="color:purple;">Human Resources</mark>, <mark style="color:green;">Finance & Controlling</mark> | `Technician_1` |

The [Client Group order](https://rollouter.gitbook.io/guide/rollout-managers/working-with-clients/client-groups#client-group-order) also determines the graphical arrangement in the Client Assignment Configuration's Workflow status columns.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FMcKKQwAQUgbfNuZb5AP3%2Fimage.png?alt=media&#x26;token=c884f591-ba20-40d5-8fff-43b1ef7cadc3" alt=""><figcaption><p>Inventory -> Client Groups</p></figcaption></figure>

### On Client creation

[Manually created Clients](https://rollouter.gitbook.io/guide/rollout-managers/setup/inventories/creating-clients) are always set to the first Status, and will get assigned to a Technician according to the Configuration in place.

For [imported Clients](https://rollouter.gitbook.io/guide/rollout-managers/setup/inventories/importing-clients), several outcomes are possible, depending on data-source and mapping.

| Import cases                                    | Result                                  |
| ----------------------------------------------- | --------------------------------------- |
| Assignee mapped                                 | Assignee as in the source               |
| Assignee not mapped                             | Assignee as in the Configuration        |
| Assignee mapped but no value in the source      | No Assignee (Assignee as in the source) |
| Assignee mapped but invalid value in the source | Import fails                            |

{% hint style="info" %}
This logic also applies to import-updates on Clients, imported values always have priority.
{% endhint %}

### On Client Moving

When [moving a Client](https://rollouter.gitbook.io/guide/rollout-managers/working-with-clients/client-detail-view/moving-clients) into an Inventory with an active Assignment, the User must decide whether or not to keep the previous Assignee.

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FNXsVAzsUWdRvacSuWVhw%2Fimage.png?alt=media&#x26;token=6d261aa3-6fe8-4944-89d9-20eb353a07c6" alt=""><figcaption></figcaption></figure>

* If `Keep assignee` is checked, the Assignee won't change upon moving, regardless of the selected Status
* If `Keep assignee` is unchecked, the Assignee will be decided based on the Configuration in place and according to the selected Status

{% hint style="info" %}
With an active Assignment in the target Inventory, `Keep Assignee` is unchecked by default.
{% endhint %}

***

## Notifications & History

For all changes through the Client Assignment, both the old and the new Assignee receive corresponding Notifications. These Notifications display the `System` as responsible for the change:

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2F4ecloYXRteL2BQ3X6UrX%2Fimage.png?alt=media&#x26;token=bfe7c0ba-03d4-44a4-81c2-dd6c722a4c45" alt=""><figcaption></figcaption></figure>

The same applies to the various [Histories](https://rollouter.gitbook.io/guide/rollout-managers/working-with-clients/client-detail-view/history):

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FltN97kkA910Rty5k2QRA%2Fimage.png?alt=media&#x26;token=0935fb63-100c-434c-937d-6bb6443b8c15" alt=""><figcaption></figcaption></figure>
