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

# Set up companies

> Create client or brand records, attach agents, choose defaults, and verify call attribution.

Use Companies to separate the clients or brands served by one Zelto
organization. By the end of this guide, each new call will either carry an exact
per-call company or fall back to its agent's default company.

## Prerequisites

* Your agents already exist in Zelto. See the [Quickstart](/docs/quickstart) if
  you have not connected a provider yet.
* An organization owner or admin has enabled **Companies** in **Settings →
  Organization**. If you are a member and it does not appear in the sidebar,
  ask an owner or admin to enable it.
* You know whether your integration can send a stable client or brand id on
  every call. Use that signal whenever one agent serves several companies.

## 1. Create each company

Open **Companies** in the sidebar and select **New company**. Enter the client or
brand name and create it. Company names must be unique within your organization.

You can also use the **+** beside Companies in the sidebar, or create a company
from the **Companies** field in an agent's settings.

## 2. Attach the agents that work for it

Open the company, switch to the **Agents** tab, select **Add agents**, and choose
every agent that handles work for that client. An agent can belong to several
companies.

You can make the same assignment from **Agents → \[agent] → Settings →
Companies**. Removing an attachment does not delete the agent or its calls.

## 3. Choose a default when you need a fallback

In the **Agents** tab, select the star beside an attached agent to make this its
default company. Each agent can have at most one default.

Use a default when all or most calls for that agent belong to one company and
the provider does not send a company id. Do not rely on a default to split a
shared agent's calls between clients; send a per-call identifier instead.

## 4. Send a company id with shared-agent calls

If you upload calls to `/webhooks/calls`, add `companyExternalId` at the top
level of each call body:

```json theme={null}
{
  "agent": {
    "externalId": "shared-support-agent",
    "name": "Shared Support"
  },
  "companyExternalId": "acme-bank",
  "call": {
    "externalId": "call-001"
  },
  "transcript": {
    "turns": [
      { "role": "assistant", "content": "How can I help?" },
      { "role": "user", "content": "I have a question about my account." }
    ]
  }
}
```

Use one stable value per client. If Zelto has not seen the value before, it
creates a company with that value as its temporary name and remembers the
mapping. Rename it from the Companies page; later calls keep using the same
company.

LiveKit workers can send the canonical `companyExternalId` or a supported
top-level metadata key such as `company_id`, `cliente_id`, `empresa_id`, or
`project_id`. They can also send `metadata.contexto.company_id` as a string or
safe JSON integer, such as `42`. Numeric IDs become decimal strings; fractional
or unsafe integers are ignored. A valid canonical `companyExternalId` takes
precedence over top-level metadata IDs, which take precedence over the nested
field. String IDs remain case-sensitive and preserve leading zeros.

## 5. Verify the result

Place or upload a new call, then:

1. Open **Companies** and confirm the company's **Calls (7d)** count increased.
2. Select the company in the sidebar.
3. Open **Conversations** and confirm the call appears.
4. Return to **All agents** to clear the company scope.

## Troubleshooting

### Companies is missing

The feature is not enabled for your organization. An organization owner or admin
can enable it in **Settings → Organization**.

### A call is unattributed

Check that the payload carries a non-empty, stable `companyExternalId`. If it
does not, confirm that the call's agent has a default company. A company
membership without a default is not enough to attribute the call.

### A shared agent's calls all go to one company

The provider is probably sending no per-call company id, so every call is using
the agent's default. Send `companyExternalId` for each call instead.

### Existing calls do not appear under the company

Company assignment happens during ingestion. Creating a company, attaching an
agent, or choosing a default does not rewrite earlier calls. Ask your Zelto
contact about backfilling historical attribution.

### Other pages include activity from another company

**Conversations** filters by the company stored on each call. Other
company-scoped pages can filter by attached agents, so a shared agent may bring
in activity from another company. Use Conversations when you need exact
call-level separation.

## Related

* [Companies](/docs/companies) — the full model and attribution rules.
* [Agents](/docs/agents) — how Zelto identifies and manages agents.
* [Conversations](/docs/conversations) — filter the exact calls attributed to a
  company.
* [Custom and other providers](/docs/integrations/api-call-upload) — complete
  call upload examples and validation rules.
