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

# Adding a scheduler to Marketo forms in Default

> Show a Default booking calendar after a visitor submits an embedded Marketo form: how the Pixel detects Marketo Forms 2.0 forms, how it skips the Marketo follow-up page, field mapping, and troubleshooting.

Default can show a booking calendar the moment a visitor submits an embedded Marketo form on
your website. The Default Pixel captures the submission through Marketo's Forms 2.0 API, a
Default workflow picks the host, and the calendar opens on the same page. Marketo keeps
receiving the submission as it normally does.

For the full path from submission to booked meeting, see
[How Default books a meeting from a form submission](/forms/scheduler).

## Marketo forms in Default at a glance

| Question | Answer |
| - | - |
| Which Marketo forms work? | Forms embedded on your page with Marketo's Forms 2.0 script. |
| How does Default get the submission? | The Pixel hooks into Marketo's Forms 2.0 API on your page. There is no per-form code to add. |
| When does Default capture it? | After Marketo accepts the submission. |
| Does Marketo still receive the submission? | Yes. |
| Does Default need a Marketo connection? | No. The Pixel reads the form on your page. |
| What happens to Marketo's follow-up page? | For a form wired to a scheduler, Default skips it so the calendar can open. Other Marketo forms still go to their follow-up page. |
| How does Default identify the form? | By the form element's `id`, such as `mktoForm_1234`. |

## How the Pixel detects a Marketo form

The Pixel works with Marketo's Forms 2.0 API. When it finds the Marketo script on the page, it
waits for each Marketo form to be ready, then listens for the form's successful submission.
If the Marketo script loads after the Pixel, the Pixel notices the change on the page and
connects then.

The Pixel also recognizes a `<form>` element as a Marketo form when any of these is true:

* Its `id` starts with `mktoForm_`.
* It has the `mktoForm` class.
* Its `action` URL points at `marketo.com` or `mktoweb.com`, or a subdomain of either.
* It contains a field named `munchkinId`, or an element whose `id` starts with `Mkto`.

Catalog mode uses these rules to find Marketo forms on the page. The Pixel's plain-HTML capture
skips forms that match them, so each Marketo submission reaches Default once.

## How Default handles the Marketo follow-up page

After a successful submission, Marketo normally sends the visitor to the form's follow-up
page. That page load would close the calendar before it opens.

For a Marketo form wired to a **Display Scheduler** workflow, the Pixel tells Marketo to skip
the follow-up page, so the visitor stays on your page and the calendar opens. Marketo forms with
no scheduler workflow keep their normal follow-up page.

To send visitors to a thank-you page after the scheduler, set these on the **Display
Scheduler** node:

| Field | When it applies |
| - | - |
| **Add redirect on meeting booked** | After the visitor books, following the **Redirect delay** (10 seconds by default, up to 300). |
| **Add redirect on meeting not booked** | After the visitor closes the calendar or the booking time runs out. |

Each redirect has **URL Parameters** that can carry values from the workflow.

## Before you start

| Requirement | Where |
| - | - |
| The Pixel installed in the `<head>` of every page with the Marketo form | See [Set up the Pixel and Forms SDK](/pixel-sdk-setup). |
| The page's domain connected in **Signals** | See [Signals](/forms/signals). Connecting `example.com` also covers subdomains such as `go.example.com`. |
| An email field on the Marketo form | A submission without an email address does not start a workflow. |
| A scheduling event with hosts | See [Events](/events). |
| Admin access in Default | Adding forms and mapping fields need admin access. |

## Add a scheduler to a Marketo form

<Steps>
  <Step title="Install the Pixel on the form's pages">
    Add the Pixel snippet to the `<head>` of every page where the Marketo form appears. If the
    form also runs on Marketo landing pages on your own subdomain, add the snippet to those
    pages too.
  </Step>

  <Step title="Add the form with Catalog forms">
    In **Signals**, open the domain's menu and select **Catalog forms**. Start on the page with
    the Marketo form and select **Open catalog mode**. Select **Add form** on the Marketo form,
    name it, and confirm. The form is active right away. See
    [Your forms](/forms/your-forms#add-forms-from-your-site).
  </Step>

  <Step title="Map the Marketo fields">
    In **Forms**, open the form and select **Map fields**. Map at least the email field to the
    person's email, then the fields your routing uses. A mapping belongs to the field name, so
    it also applies to your other forms with a field of that name. See
    [Field mapping for Marketo forms](#field-mapping-for-marketo-forms).
  </Step>

  <Step title="Build the workflow">
    In **Workflows**, add a **Form Submission** trigger and set **Connected Form** to the
    Marketo form. Add a **Display Scheduler** node and choose the **Event**. Set the redirects
    that replace Marketo's follow-up page, then add follow-up steps on the **Booked** and
    **Not booked** branches.
  </Step>

  <Step title="Publish and test">
    Select **Publish**, then turn on the [deployment switch](/workflows#the-enabled-switch) so the
    status reads **Live**.
    Reload the form's page, so the Pixel learns the form now has a scheduler, then submit it with
    a test email. The page stays put and the calendar opens.
  </Step>
</Steps>

## Field mapping for Marketo forms

Default receives the values Marketo submits, under the field names the Marketo form uses. Map
those names to Default person and company fields in **Map fields**.

* **Email:** Default finds the person's email in a field named `Email` or `email`, or in any
  field with "email" in its name.
* **Sensitive fields:** fields whose names contain words such as `password`, `token`, `key`, or
  `auth` are never captured. See
  [Privacy & data handling](/forms/privacy#fields-never-captured).
* **Unmapped fields:** Default keeps them on the submission, and the workflow can read them.

Mapping applies to new submissions only. A mapping belongs to the field name, not to 1 form:
**Map fields** lists only this form's fields, but a change there applies on every form in your
workspace with a field of that name.

## How Marketo forms behave with the scheduler

* **The loading indicator shows after every Marketo submission.** On a form with no scheduler
  workflow, Marketo's follow-up page then loads as usual.
* **The follow-up page is skipped only for scheduler forms.** The Pixel checks this against the
  list of scheduler forms it loads with the page. A workflow published after the page loaded
  takes effect on the next page load.
* **Early identification works for Marketo forms.** Marketo renders the form in your page, so
  the Pixel sends the email to Default as soon as the visitor leaves the email field. The
  calendar is ready sooner after submit.
* **Forms inside a cross-origin iframe are out of reach.** The Pixel cannot read into a frame
  served from another domain. Embed the Marketo form directly in your page.

## Route Marketo form leads to the right rep

The **Display Scheduler** node decides who the visitor books with:

* **A team:** create a Team event with a [queue](/queues) as a host. The queue's policy picks
  the rep when the visitor books.
* **The existing owner:** find the lead's record in Salesforce or HubSpot with **Match Record**
  before the scheduler, turn off **Use event hosts**, and pass the owner as the host. Set a
  **Fallback Host** for when the owner is away.
* **A rule:** a [Rules of Engagement](/rules-of-engagement) node picks the owner, and
  **Latest resolved user** becomes the host.

See [Routing picks the host](/forms/scheduler#step-3-routing-picks-the-host) for every option.

## Troubleshoot Marketo forms

| What you see | What to check |
| - | - |
| The Marketo follow-up page loads instead of the calendar | Confirm the workflow is published, live, and contains the **Display Scheduler** node. Reload the page before you test, and load the Pixel in the page `<head>`. |
| Catalog mode shows no badge on the Marketo form | Check that the Marketo form has loaded on the page, and that it has no `data-default-ignore` attribute on it or a wrapper. |
| Submissions do not appear on the form in **Forms** | Confirm the form was added with **Catalog forms**, is active, and that the domain shows **Active** in **Signals**. |
| The workflow does not start | Confirm the Marketo form has an email field, and that **Connected Form** is this form. |
| Visitors stay on the form page after they close the calendar | Default skips Marketo's follow-up page for scheduler forms. Set **Add redirect on meeting not booked** to your thank-you page. |

### Check what the Pixel sees

1. Before the Pixel loads, set `window.__defaultPixel__logging__verbose = true` on the page.
2. Open the browser console and show verbose messages.
3. Load the page, then submit the Marketo form with a test email.

| Console message | What it means |
| - | - |
| `[Default.com] [Listener] Found Marketo platform` | The Pixel found Marketo's Forms 2.0 script. |
| `[Default.com] [Listener] Found Marketo form submission: <form id>` | The Pixel captured the submission. |
| `[Default.com] [Listener] Blocked Marketo follow-up URL for scheduler form: <form id>` | The form is wired to a scheduler, and the Pixel skipped the follow-up page. |
| `[Default.com] [Listener] Marketo not detected on page` | Marketo's script had not loaded when the Pixel started. The Pixel connects when Marketo appears. If no Marketo message follows, check the Marketo embed. |

Related: [Sales scheduling software from Default](https://www.default.com/product/sales-scheduling-software)


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