> 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/routing/hubspot-owner.md).

# Route a lead to its HubSpot owner

Keep an existing HubSpot owner when they can receive the lead, and use a deliberate fallback when they cannot.

## Prepare

Connect [HubSpot](/integrations/hubspot.md), map member owner identities and create the fallback queue. Decide what to do with customers, open opportunities and unowned records before writing the rulebook.

## Build the decision

1. Start with the lead email and any usable company identifier.
2. Match the intended HubSpot object.
3. On **Matched**, read the owner returned by that match.
4. Resolve the owner to the mapped Distro member.
5. Apply your ownership policy and route or schedule with that member.
6. On No match, missing mapping or an ineligible owner, use the configured fallback path.

A matched company and a matched contact can have different owners. State which object's owner your policy uses; do not let the order of similarly named fields decide it accidentally.

## Test

| Case                                 | Check                                                         |
| ------------------------------------ | ------------------------------------------------------------- |
| Known contact, mapped eligible owner | Intended owner retained.                                      |
| Known contact, unmapped owner        | Fallback or explicit review, rather than a blank assignee.    |
| Company match only                   | Company policy followed; person ownership not invented.       |
| No CRM match                         | New-lead queue or intended No match outcome.                  |
| Owner unavailable                    | Availability/fallback policy matches the promised experience. |

Inspect the matched record, owner identity and final assignment in Logs. Updating CRM ownership afterward is a separate write step.

See [Ownership and fallback](/routing/ownership-and-fallback.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/routing/hubspot-owner.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.
