> For the complete documentation index, see [llms.txt](https://docs.rox.com/development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rox.com/development/product/organization-level-configurations/crm-assignment-rules-configuration.md).

# CRM Assignment Rules Configuration

## Salesforce

## What You Need:

* A connected Salesforce in your Rox account
* Your raw DB and schema name\*&#x20;

Once your Salesforce instance is connected to Rox, you can configure assignment rules to control which accounts populate on your home page. This guide will walk you through setting up relationships and applying filters to ensure the right accounts flow into Rox.

First, navigate to **Settings -> Integration**, click the **Connected button** next to Salesforce, then click the **Edit Organization Settings** button to complete the following steps.

## How to Add Assignment Rules

1. Click on **Assignment Rules** on the left column
2. Add a Relationship:
   * Click the **+Add Relationship** button.
   * Configure the relationship based on how you want accounts to be assigned to each user.

The example below allows you to assign accounts based on the Salesforce Account Owner ID field.&#x20;

<img src="/files/REN9RZ7UJuu3jZhSq7Oj" alt="" height="318" width="498">

## How to Apply Account Filters

1. Scroll down to **Filters** and click **+Add Filter**

<figure><img src="/files/sRwHxGgDzDXPBzY9ZEOU" alt=""><figcaption></figcaption></figure>

2. **Define Filter Criteria**
   1. Name your **Filter**
   2. Select a **Filter Type** (Account or Contact)
   3. Define the criteria for which accounts should be included or excluded and write a SQL query using that logic under **Filter Condition**
   4. Click the **Create** button

Please see sample SQL queries below for reference.&#x20;

```sql
// include all accounts
SELECT comp.rox_id FROM customer_graphs.latest_company_v4 comp
```

```
// exclude deleted accounts
select c.rox_id from {Rox DB name}.customer_graphs.latest_company_v4 c
inner join {Rox DB name}.customer_graphs.latest_graph_v4 g on c.rox_id = g.rox_entity_id
inner join {Rox DB name}.{SFDC table name}.account a on g.rox_entity_data_source_id = a.id
where 1=1
    and not a.IS_DELETED
```

## How to Apply Assignment Relationships and Filters

Once Account Assignment Relationships and Filters have been created, you can assign them in the **Account Assignment** tab of the CRM Settings page.&#x20;

<figure><img src="/files/1lESbnmqruSbWJRXgL06" alt=""><figcaption></figcaption></figure>

From here, you can **Add a new Assignment Relaionship + Filter** to a user and edit an individual user's realtionships and filters as well.

<figure><img src="/files/v2DZ6yseJYSL1JEhBXcj" alt=""><figcaption></figcaption></figure>

<sub>\*If you haven't received these details, please reach out to <support@rox.com> regarding these.</sub>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rox.com/development/product/organization-level-configurations/crm-assignment-rules-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
