> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/documentation/use-octoxlabs/settings/discovery-settings/discovery-ordering.md).

# Discovery Ordering

Rank adapters per field so OctoXLabs keeps the value from the source you trust most when several sources describe the same asset or user.

When several adapters report the same device or user, each may give a different value for the same field, for example a hostname or an operating system. **Discovery Ordering** lets you rank the adapters for each field. Aggregation then uses the ranking to decide which adapter's value ends up in the merged record. Use it when one source is more accurate than another, for example when an endpoint management tool is more reliable for the operating system than a network scanner.

Ordering is available for two inventories: **Device ordering** and **User ordering**.

### Before you begin

* Required permission to open the page: `configurations.view_discoverysettings`. To change, save or reset an ordering you need `configurations.change_discoverysettings`. Without it the chips are read-only.
* At least one adapter connection must exist so there is something to rank. See Connect an adapter.

Go to the gear icon in the top bar > **Settings** > **Discovery Settings** > **Discovery Ordering**. Choose **Device ordering** or **User ordering**.

### How the ranking is read

The tab lists one block per field. Each block shows the adapters that can provide that field, as chips from left to right and top to bottom. The adapter at the start of the list has the highest priority: its value is used when it has one, and later adapters are used only where earlier ones have no value. Only adapters that actually map the field can appear in its list.

{% hint style="info" %}
The next discovery applies a new ordering. Existing aggregated data is not rewritten until then.
{% endhint %}

### Change an ordering

{% stepper %}
{% step %}

#### Open the inventory tab

Select **Device ordering** or **User ordering**. If the tab shows "No ordering yet", use **Reset Configuration** first to build it from your connected adapters.
{% endstep %}

{% step %}

#### Drag adapters

Drag the adapter chips within a field block to put the most trusted adapter first. Each field is ranked on its own.
{% endstep %}

{% step %}

#### Save

Click **Save**. A message confirms that the ordering has been saved.
{% endstep %}
{% endstepper %}

**Reset Configuration** asks "Are you sure you want to reset this inventory's ordering?" and rebuilds the ordering for that inventory from the adapters that currently have connections: for each field, the adapters are listed alphabetically by adapter slug. Any custom ranking for that inventory is lost.

### Verify the result

* After saving, reload the page: the chips keep the order you set.
* After the next discovery, open an asset or user that several adapters report and check that the field shows the value from the highest-ranked adapter that had one.

### Troubleshooting

| Symptom or error message                                                              | Cause                                                     | Fix                                                   |
| ------------------------------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------- |
| No chips to drag                                                                      | The role lacks `configurations.change_discoverysettings`. | Add the permission.                                   |
| `No ordering yet. Add a connection or reset to build it from the connected adapters.` | The inventory has no ordering.                            | Add a connection, or click **Reset Configuration**.   |
| `Ordering must be a non-empty object of field -> adapter list.`                       | The save request was empty.                               | Reload the page and try again.                        |
| `<adapter> does not provide <field> for <inventory>.`                                 | A listed adapter does not map that field.                 | Reset the ordering.                                   |
| `Ordering is not available for the <inventory> inventory.`                            | Only device and user inventories support ordering.        | Use the **Device ordering** or **User ordering** tab. |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Discovery Schedule</strong></td><td>Decide when discovery runs.</td><td></td></tr><tr><td><strong>Discovery and Aggregation</strong></td><td>How merged records are built.</td><td></td></tr><tr><td><strong>Data rules</strong></td><td>Assign custom field values to matching devices.</td><td></td></tr></tbody></table>
