> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Model your sales team structure and automate lead distribution across territories and capacities

Revenue Organization in Cargo provides a complete system for managing your sales team structure and automating lead distribution. It keeps your team hierarchy synchronized with your CRM while giving you fine-grained control over how leads flow to the right reps.

***

## Core concepts

Revenue Organization consists of three interconnected components that work together to route leads intelligently:

| Concept                                                        | Description                                                                                                               |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **Members**                                                    | Your sales team imported from connected CRMs, enriched with custom metadata like languages and specializations.           |
| **[Territories](/reference/revenue-organization/territories)** | Named pools of members that leads are distributed across with weighted round-robin—each with an optional fallback member. |
| **[Capacities](/reference/revenue-organization/capacities)**   | Workload limits that ensure fair distribution and prevent rep overload.                                                   |

***

## How it works

```mermaid theme={null}
flowchart LR
    A[New Lead] --> B[Allocation Node]
    B --> C{Match Rules}
    C --> D[Territory]
    C --> E[Email Domain]
    C --> F[Connector Match]
    D --> G[Available Rep]
    E --> G
    F --> G
    G --> H[CRM Assignment]
```

1. **Leads enter** through a play trigger
2. **Matching rules** determine which reps are eligible
3. **Capacity checks** filter to available team members
4. **Round-robin** distributes evenly among eligible reps
5. **Assignment syncs** back to your CRM

***

## Key features

| Feature                  | Description                                                                                               |
| ------------------------ | --------------------------------------------------------------------------------------------------------- |
| **CRM sync**             | Team members automatically import and stay synchronized with Salesforce, HubSpot, or other connected CRMs |
| **Territory routing**    | Route leads based on geographic regions, industry verticals, or company size segments                     |
| **Capacity management**  | Set daily, weekly, or custom limits per rep to balance workloads                                          |
| **Fallback rules**       | Ensure every lead gets assigned, even when primary routing fails                                          |
| **Allocation history**   | Full audit trail of every assignment with links to the triggering play run                                |
| **Model-based capacity** | Calculate availability from real pipeline data like open deals                                            |

***

## When to use Revenue Organization

<AccordionGroup>
  <Accordion title="You have multiple sales reps">
    Any team with more than one rep benefits from automated routing. Even simple round-robin distribution eliminates manual assignment work.
  </Accordion>

  <Accordion title="You need territory-based routing">
    Geographic, vertical, or segment-based sales structures require rules that match leads to the right territory before assignment.
  </Accordion>

  <Accordion title="You want to balance workloads">
    Capacity limits prevent top performers from being overloaded while ensuring all reps receive fair lead distribution.
  </Accordion>

  <Accordion title="You need assignment audit trails">
    Compliance, optimization, or troubleshooting all benefit from knowing exactly when, why, and how each lead was assigned.
  </Accordion>
</AccordionGroup>

***

## Getting started

<Steps>
  <Step title="Connect your CRM">
    Revenue Organization imports team members from your connected CRM. Make sure your [Salesforce](/integration/salesforce) or [HubSpot](/integration/hubspot) integration is configured.
  </Step>

  <Step title="Define territories">
    Group your members into territories that reflect your sales structure—by region, vertical, or any custom segmentation.
  </Step>

  <Step title="Set capacities">
    Configure workload limits to ensure fair distribution. Start conservative and adjust based on actual throughput.
  </Step>

  <Step title="Add allocation to a play">
    Route leads through your revenue organization rules with an allocation step
    in a [play](/plays/overview).
  </Step>
</Steps>

## From the CLI

The whole revenue-organization domain is scriptable from the CLI (there are no CDK `define*` builders for it yet):

```bash theme={null}
cargo-ai revenue-organization member list
cargo-ai revenue-organization territory create \
  --label "West" --color orange \
  --members '[{"uuid":"<member-uuid>","weight":1}]'
cargo-ai revenue-organization capacity create --name "AE Capacity" --color purple
cargo-ai revenue-organization allocation list
```

<Note>
  Lead allocation itself is currently configured as a step in the visual play
  editor (the **Allocate** node) — see [Workflows](/workflows/overview) for the
  code vs. canvas coverage.
</Note>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Territories" icon="map" href="/reference/revenue-organization/territories">
    Group members into pools and distribute leads across them.
  </Card>

  <Card title="Capacities" icon="gauge" href="/reference/revenue-organization/capacities">
    Cap how many records each member receives within a time window.
  </Card>

  <Card title="Build a play" icon="play" href="/plays/overview">
    Create workflows that trigger lead allocation.
  </Card>

  <Card title="Salesforce integration" icon="cloud" href="/integration/salesforce">
    Connect your CRM to import team members automatically.
  </Card>
</CardGroup>
