# Role Mapping

## Mapping Discord Roles and CMS Ranks

In the `Administration` panel of the CMS, navigate to `Integrations` > `Discord` > `Role Mapping`

Configure your CMS x Discord [One-to-One](#one-to-one-mapping) and [Category](#category-mapping) mappings below.

## One-to-One Mapping

<figure><img src="https://986342217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgJnyZgUQPWpA5p9njAAR%2Fuploads%2FV1cI3nb0gHGdm0uWGIKp%2Fone-to-one%20(2).png?alt=media&#x26;token=bb6ab71a-b45e-4c6a-8f07-75e7b2a29efe" alt="" width="375"><figcaption><p>CMS x Discord: One-to-One Mapping</p></figcaption></figure>

<details>

<summary>One-to-One Mapping Explained</summary>

One-to-one mapping allows you to map a CMS rank to one or more Discord roles. Adding or removing a one-to-one mapped rank in the CMS will add or remove the Discord role and vice versa.

This mapping type is the most common.

* CMS: `Admin` rank
* Discord: `Admin` role in one or more Discord guilds

![](https://986342217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgJnyZgUQPWpA5p9njAAR%2Fuploads%2Fbsn8XjnFtwfNKQrJbThj%2Fimage.png?alt=media\&token=ab9a21eb-fbb7-4f0a-8888-113cf9104d0d)

</details>

## Category Mapping

<figure><img src="https://986342217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgJnyZgUQPWpA5p9njAAR%2Fuploads%2FRHjPVcbR3oaEYFONwdgc%2Fcategory.png?alt=media&#x26;token=b545119c-6082-4707-974b-6e2c7e7b4649" alt="" width="375"><figcaption><p>CMS x Discord: Category Mapping</p></figcaption></figure>

<details>

<summary>Category Mapping Explained</summary>

Category mapping allows you to map multiple CMS ranks to a single Discord role. If a user has any of the CMS ranks they will receive the Discord role. If a user has none of the CMS ranks the Discord role will be removed.

This mapping type is best used for role categories.

* CMS: Multiple staff ranks `Moderator`, `Admin` and `Director`
* Discord: A general `Staff` role

![](https://986342217-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgJnyZgUQPWpA5p9njAAR%2Fuploads%2Fyqa4AjBPrIwVFJeHNCzN%2Fimage.png?alt=media\&token=3bc90036-15ca-4ec1-b9dd-9b9d5e930c42)

</details>

## Syncing the Role Map

{% hint style="info" %}
After modifying the mapping, your community will automatically be re-synced.\
This may take a couple of minutes to complete.
{% endhint %}

While changes are automatic, you can also manually re-sync users with the `/sync` command.

Setting the flag `community` to `Yes` will sync your entire community including any linked guilds. Setting it to no or running `/sync` by itself will only sync the server you run it in.
