# Importing Clients

To import Clients using the Inventory import, please select one of your Rollouts and go to `Inventory` -> `Import` then click on "New Import". Only users who are at least Rollout Manager can access and manage imports.

The import process is divided into three steps:

1. [File and Inventory selection](#id-1.-file-and-inventory-selection)
2. [Assigning the columns of the file to the Custom Fields of the Inventory](#id-2.-column-field-assignment)
3. [Summary and approval](#id-3.-summary-and-approval)

***

## 1. File and Inventory selection

In the first step, please select the Inventory you want to import Clients into and the file that contains your Clients. The importer supports Excel and CSV:

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FaSgfZPenu5MU1Ke0NG3Y%2Fimage.png?alt=media&#x26;token=0009dfe6-bc4b-44be-8cea-47622d3b223b" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Please be aware that active filters or hidden rows/columns inside of your Excel file as well as uncommon CSV delimiters might cause problems during the import. In case you are uncertain, please ask your Key Account Manager to review your file.
{% endhint %}

In case you are unsatisfied with the result of your import, you can duplicate your Inventory to keep the settings (Workflow and Custom Fields), delete the old one and repeat the import.

***

## 2. Column-Field assignment

In the second step you assign the columns of your file to the Custom Fields of the Inventory. Like this, the importer is able to create each row (Client) together with its Custom Field values:

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FKnKPqmAinBzd4MfgClFn%2Fimage.png?alt=media&#x26;token=4cfe5303-1444-42b3-85ec-73a56ff27c08" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To the **left of the arrow**, you will see the name of the column which should be defined in the **first row of your file**. To the **right of the arrow** you can select a **default or Custom Field** you want the importer to assign the values to while the Clients (rows) are being created.
{% endhint %}

Here is how the Excel file looked liked for the example above:

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2F6XdsMi9gRZIVpJe3eq4C%2Fimage.png?alt=media&#x26;token=9e68baa2-d233-4e03-85b9-8951ead748f9" alt=""><figcaption><p>The first row must always contain the name/description of the column.<br>The importer will not consider the first row as a Client.</p></figcaption></figure>

### Importing Default Fields

<div align="left"><figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2Fo5OlIhpLObvKdVELVZXg%2Fimage.png?alt=media&#x26;token=86b4c750-b132-47aa-84ca-e958c3b8e499" alt="" width="209"><figcaption></figcaption></figure></div>

Every option that is above the gray line represents a default field. Some of them have certain requirements to be considered while importing them:

| Default Field | Description                                         | Requirements                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status        | The Workflow status of the Client.                  | <mark style="background-color:yellow;">The value inside of your file must exactly match the name of one of your Workflow statuses for the import to succeed.</mark>                                                                                                                                                                                                                                 |
| Assignee      | The user (technician) to be assigned to the Client. | <p><mark style="background-color:yellow;">The user must successfully be found by Name, Email or Rollouter user ID for the import to succeed:</mark><br><br><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FWsWgAHogBgjqIen1hGAK%2Fimage.png?alt=media&#x26;token=9c82a51b-7cf3-4f82-a970-53be45014d63" alt=""></p> |
| Client User   | The end user owning the Client.                     | <p><mark style="background-color:yellow;">The user must successfully be found by Name, Email or Rollouter user ID for the import to succeed:</mark><br><br><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2F4x9zwrKykTrjIMZlxlXA%2Fimage.png?alt=media&#x26;token=a0d5d7a9-36c0-4b29-b750-3fca4a289354" alt=""></p> |
| Name          | The name of the Client.                             | <mark style="background-color:yellow;">A Client name can only occur once per Rollout.</mark>                                                                                                                                                                                                                                                                                                        |
| Description   | The description of the Client.                      | -                                                                                                                                                                                                                                                                                                                                                                                                   |
| Client flag   | A red note that is displayed on top of the Client.  | -                                                                                                                                                                                                                                                                                                                                                                                                   |

### Importing Multi-Selection fields / Client Groups

{% hint style="info" %}
For Custom Fields of type `Multi-Selection` or Client Groups, the importer can interpret multiple values in one cell if you separate them with a comma.

Example: `Client Group 1, Client Group 2`
{% endhint %}

### Updating existing Clients

When enabling the `Update existing clients` setting, the importer behaves differently:

* No errors are thrown anymore for rows where the `Name` already exists
  * The Custom Field Values of these Clients are then updated
* Clients that do not exist are still being created

{% hint style="info" %}
To identify which Clients to update, the importer always uses the default field `Name`.
{% endhint %}

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FqPUTaXXXyfdpZScqIZ5L%2Fimage.png?alt=media&#x26;token=00f089f8-e562-4086-a9cf-f321fe5bfc2d" alt=""><figcaption><p>In this example we are updating the Client Groups of all existing Clients or create new ones.</p></figcaption></figure>

#### Advanced Client Links

In case you are updating Clients with active [Advanced Client Links](https://rollouter.gitbook.io/guide/rollout-managers/setup/client-links/advanced-client-links), the importer takes care of two possible scenarios:

| Scenario                                                                                              | Behaviour                                                                                             |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| There are conflicts **between the file to import and your existing Inventory**                        | :white\_check\_mark: The values to import always have priority and the linked Clients will be updated |
| There are conflicts **between multiple Clients withing the import file** and the values are not equal | :x: The import fails with error feedback for each row of the linked Clients                           |

## 3. Summary and approval

The third step summarizes your import:

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FY7tCj9Ui5ZRuTh863bi8%2Fimage.png?alt=media&#x26;token=11e7946e-ab81-4416-b0e1-51474b2213b7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Approval**

Imports require an approval from another Rollouter Manager+ based on a 4 eyed principle. In case you are Administrator or the only Rollout Manager of the Rollout, you can approve the import yourself.
{% endhint %}

### Import statuses

Imports have four different statuses which are explained below:

| Status                                                             | Description                                                                                                                                                                                        |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="background-color:orange;">Incomplete</mark>           | The second step (Column-Field assignment) is empty. It is required to import at least the names of the Clients.                                                                                    |
| <mark style="background-color:purple;">Waiting for Approval</mark> | The import is ready to be started. After an approval, your file is processed based on your Column-Field assignment.                                                                                |
| <mark style="background-color:purple;">In Progress</mark>          | Your file is being processed. Depending on the amount of rows, this step can take some time.                                                                                                       |
| <mark style="background-color:red;">Failed</mark>                  | <p>One or more rows could not be imported. The import was cancelled and no Clients have been created.<br><br>Please read <a href="#resolving-import-errors">Resolving import errors</a> below.</p> |
| <mark style="background-color:green;">Completed</mark>             | The processing was successfully completed and all Clients have been created.                                                                                                                       |

### Resolving import errors

After an import has <mark style="background-color:red;">Failed</mark>, you can make adjustments on your Column-Field assignment to resolve them and restart the import through another approval. If you made changes to your file or decide to select another Inventory, you need to create a new import.

In the summary of your import, all the failing rows are displayed together with the name of the column which caused the error:

<figure><img src="https://750384937-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIeSHc7pNZWey2rD63q9j%2Fuploads%2FpiQsSY2ZFRxdtt8h0Csx%2Fimage.png?alt=media&#x26;token=6c15e255-7e05-44cb-8b66-c806b3fbd048" alt=""><figcaption><p>Here, the column "Hostname" which was assigned to the default field "Name" was causing an error for rows 2, 3, 4, 11, 12 and 16.</p></figcaption></figure>

{% hint style="info" %}
The row number does not exclude the first row with the names of the columns. So the first Client row would be row number 2.
{% endhint %}

#### Reasons why importing a row can fail:

| Field                                                                                                                                           | Fail reasons                                                                                                                                                                                                                                                                                                                 |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status                                                                                                                                          | The status to import does not match any of the Workflow statuses of the Inventory.                                                                                                                                                                                                                                           |
| Assignee                                                                                                                                        | The user was not found using the selected attribute (Name, Email or user ID) for the search.                                                                                                                                                                                                                                 |
| Client User                                                                                                                                     | The user was not found using the selected attribute (Name, Email or user ID) for the search.                                                                                                                                                                                                                                 |
| Name                                                                                                                                            | <p>The Client name already exists inside of the Rollout project.<br><br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> In case it is appropriate, this can be resolved by enabling "<a href="#updating-existing-clients">Update existing clients</a>".</p>                                          |
| Description                                                                                                                                     | -                                                                                                                                                                                                                                                                                                                            |
| Client flag                                                                                                                                     | -                                                                                                                                                                                                                                                                                                                            |
| Custom Field (`selection` or `multi-selection`)                                                                                                 | <p>The value you are trying to import does not exist in the corresponding Custom Fields' options.<br><br><span data-gb-custom-inline data-tag="emoji" data-code="2139">ℹ️</span> To resolve it, you can either add the value to the options of the Custom Field or check off the checkbox "Create option if not exists".</p> |
| Shared Custom Fields ([of Advanced Client Links](https://rollouter.gitbook.io/guide/rollout-managers/setup/client-links/advanced-client-links)) | <p>Your file to import contains multiple Custom Field value updates for Custom Fields that are shared by an active Advanced Client Link.<br><br>The import fails because each shared Custom Field to import needs to have the same value (applies only to directly linked Clients).</p>                                      |
