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

# Route a lead to its Salesforce owner

Use Salesforce matching to preserve the owner your team intends, then handle missing or ineligible ownership explicitly.

## Prepare

Connect [Salesforce](/integrations/salesforce.md), map member Salesforce identities and create the fallback queue.

Choose the policy for Lead versus Contact versus Account ownership. An existing Account does not necessarily mean a person is an existing Contact.

## Build

Match the relevant object using the supported criteria. On Matched, use the returned owner and resolve its Salesforce user identity to a Distro member.

Apply the rulebook or direct routing policy, then schedule or assign. On No match, missing owner mapping or ineligibility, route through the fallback you configured.

If the journey updates ownership, use an explicit Salesforce Update with the correct object record ID and owner field. Assignment inside Distro alone does not rewrite Salesforce.

## Check before publishing

Test an existing Lead, an existing Contact with a different Account owner, an unmapped owner, a no-match prospect and an unavailable host.

Inspect the matched object and ID, mapped owner, assignment and destination write separately. Validate required fields and Salesforce rules for any create/update operation.

A Convert Lead action changes the Salesforce journey and has its own required mappings; it is not an automatic consequence of matching an Account.

See [CRM workflow steps](/workflows/crm-steps.md) and [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/salesforce-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.
