> 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/guides/marketo.md).

# Marketo

Route Marketo leads with Distro - capture Marketo forms with the tracker, or call a workflow from a Marketo webhook.

Distro works with Marketo through the tracker, a webhook, and your CRM's sync. Marketo has no card under **Integrations**, and Distro doesn't sign in to Marketo.

| Direction                             | How                                                                           | Distro trigger                               |
| ------------------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------- |
| Marketo form on your site → Distro    | The tracker detects Marketo Forms 2.0 embeds                                  | **New form submission** on the detected form |
| Something changes in Marketo → Distro | A Marketo webhook posts to a Distro endpoint                                  | **Webhook received**                         |
| Distro → Marketo                      | Your CRM sync, or **Call Webhook** to a service that calls Marketo's REST API | Any workflow                                 |

Send each event through one path. A form captured by the tracker *and* sent by a Marketo webhook runs two workflows and can be routed twice.

## Capture Marketo forms

Add the tracker to the pages (or landing-page template) that hold your Marketo forms, then review the detected form under **Forms** and map its fields, such as `Email` and `Company`. Start a workflow from **New form submission**; add **Show Scheduler** to offer a meeting right after submit. See [Connect an existing form](/forms/existing-forms.md).

## Route leads that cross a score threshold

{% stepper %}
{% step %}

### Create the endpoint

Create a workflow with **Webhook received**, bearer authentication. Copy the endpoint URL and secret.
{% endstep %}

{% step %}

### Create the Marketo webhook

In Marketo, add a webhook to the URL with **Request Type** `POST`, **Request Token Encoding** `JSON`, and a custom header `Authorization: Bearer <secret>`. Use a template like:

```json
{"email": "{{lead.Email Address}}", "first_name": "{{lead.First Name}}", "last_name": "{{lead.Last Name}}",
 "company": "{{company.Company Name}}", "lead_score": "{{lead.Lead Score}}", "marketo_id": "{{lead.Id}}"}
```

{% endstep %}

{% step %}

### Give Distro a sample and the email field

Paste the template with example values as the sample, and set **Lead email field** to `email`.
{% endstep %}

{% step %}

### Build the routing

**Match Salesforce Record** on `Lead` by email. On **Matched**, alert the current owner's channel. On **Not matched**, **Assign from Queue**, **Create Salesforce Record** with the assignee as owner, and **Notify in Slack** the assignee with the score and company.
{% endstep %}

{% step %}

### Call it from a smart campaign

In Marketo, add **Call Webhook** to the campaign that runs when **Score is Changed** crosses your threshold, then activate it.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
Keep Marketo credentials out of **Call Webhook**. To write back through Marketo's REST API, call a service you run that holds the credentials, and authenticate that call with an API key or bearer token.
{% endhint %}


---

# 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/guides/marketo.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.
