> For the complete documentation index, see [llms.txt](https://docs.distro.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.distro.so/guides/territory-routing.md).

# Route by territory and company size

Use a rulebook to make segment routing understandable and repeatable.

## Define the policy

Write the business rules first. For example: named accounts retain their owner; EMEA enterprise goes to the EMEA enterprise queue; EMEA smaller companies go to the EMEA growth queue; missing geography goes to review.

Create the queues and routing profiles before wiring the workflow. Choose which country and company-size fields you trust.

## Build

Start from the lead trigger, match ownership and enrich the chosen fields if needed. Apply a rulebook with the specific rules before broader fallback rules.

Use separate person-country and company-country fields when they mean different things. Normalize your field mapping rather than mixing country codes and display names in the same condition.

Route the resulting owner/queue, then schedule or send the appropriate follow-up. A Rulebook decision chooses the destination; Route performs the assignment.

## Test boundaries

Test each territory, a size exactly at the threshold, a named account that would otherwise match a segment, and missing country or size.

Check which rule matched and why. Do not silently classify missing headcount as a small company unless that is an explicit business choice.

After a controlled live test, review assignments within each queue. Fairness is measured within the relevant assignment pool; totals across different territories can legitimately differ.

See [Rulebooks](/routing/rulebooks.md) and [Routing profiles](/routing/profiles.md).


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://docs.distro.so/guides/territory-routing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
