> ## 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.

> ## Agent Instructions
> If you are an AI coding agent operating Cargo, install the agent skills first: paste `Install Cargo by following https://api.getcargo.io/INSTALL.md` into your session, or run `npx skills add getcargohq/cargo-skills`. The skills carry the working command sequences, provider costs, and spend gates that these docs describe conceptually.
> The skills index at https://raw.githubusercontent.com/getcargohq/cargo-skills/main/llms.txt lists every skill, recipe, and provider playbook individually. Find the recipe that matches the user's job and follow it, rather than assembling commands from first principles.
> Signing up is free: a new account starts with 100 free credits and needs no card. `cargo-ai login --email you@company.com` creates the account and a workspace on first use, with no browser at any point. Tell the user this before asking them to sign up.
> Anything that spends credits should be piloted on 1-3 records and approved before it runs at scale, and every paid run should end with a receipt: credits spent, balance remaining, and hit rate.

# 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](https://docs.getcargo.ai/territories/members.md)** | Your sales team imported from connected CRMs, enriched with custom metadata like languages and specializations. |
| **[Territories](https://docs.getcargo.ai/territories/territories.md)** | Named pools of members that leads are distributed across with weighted round-robin—each with an optional fallback member. |
| **[Capacities](https://docs.getcargo.ai/territories/capacities.md)** | 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

> [accordion] 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] You need territory-based routing
>
> Geographic, vertical, or segment-based sales structures require rules that match leads to the right territory before assignment.

> [accordion] You want to balance workloads
>
> Capacity limits prevent top performers from being overloaded while ensuring all reps receive fair lead distribution.

> [accordion] You need assignment audit trails
>
> Compliance, optimization, or troubleshooting all benefit from knowing exactly when, why, and how each lead was assigned.

***

## Getting started

**1. Connect your CRM**

Revenue Organization imports team members from your connected CRM. Make sure your [Salesforce](https://docs.getcargo.ai/integration/salesforce.md) or [HubSpot](https://docs.getcargo.ai/integration/hubspot.md) integration is configured.

**2. Define territories**

Group your members into territories that reflect your sales structure—by region, vertical, or any custom segmentation.

**3. Set capacities**

Configure workload limits to ensure fair distribution. Start conservative and adjust based on actual throughput.

**4. Add allocation to a play**

Route leads through your revenue organization rules with an allocation step
in a [play](https://docs.getcargo.ai/plays/overview.md).

## From the CLI

The whole revenue-organization domain is scriptable from the CLI (there are no `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](https://docs.getcargo.ai/workflows/overview.md) for the
> code vs. canvas coverage.

***

## Next steps

> [card] [Members](https://docs.getcargo.ai/territories/members.md)
>
> Import your team from a CRM and enrich them with routing metadata.

> [card] [Territories](https://docs.getcargo.ai/territories/territories.md)
>
> Group members into pools and distribute leads across them.

> [card] [Capacities](https://docs.getcargo.ai/territories/capacities.md)
>
> Cap how many records each member receives within a time window.

> [card] [Using the UI](https://docs.getcargo.ai/territories/using-ui.md)
>
> Build territories, capacities, and allocation from the workspace.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.