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

# Playbooks

> Automate actions when visitors match an audience: sync CRM records, send Slack alerts, and more.

Playbooks run automations when a visitor or account matches an audience. Each playbook reads as a sentence: **When** this audience matches, **Then** these actions run. Playbook actions execute when a session ends.

A session ends when a visitor closes the page containing the demo, or after 30 minutes of inactivity.

## Create a playbook

Navigate to **Integrations** and open the **Playbooks** tab. Click **Create playbook** to choose your starting point.

### Start from a recipe

Recipes are pre-configured playbooks for common use cases. Select a recipe from **Popular recipes** or click **Browse all recipes** to see the full gallery. Recipes are available for Slack, Email, HubSpot, Salesforce, and Marketo.

If the recipe uses an integration you haven't connected yet, Navattic starts the connection flow before opening the builder.

Some recipes need input before they open, such as a Slack channel or an email address. Fill in the required field, then click **Confirm** to open the builder with those settings pre-filled.

### Start from scratch

Click **Blank playbook** to open the builder with an empty **When** card and an empty **Then** card.

## The When/Then builder

The builder has two sections: **When** and **Then**.

### When

The **When** card defines the audience that triggers the playbook.

1. Choose a scope: **Visitor** or **Account**. Switching scope clears the audience and all actions.
2. Select a preset or a saved audience:
   * **Visitor presets**: Everyone, Identified, Engaged, Repeat
   * **Account presets**: Everyone, Engaged, Multiple visitors
3. A live count shows how many visitors currently match: "N visitors match · X% of all visitors."

Presets are real saved audiences. Editing a preset affects every playbook that uses it.

To use a custom audience, select it from the saved-audience dropdown or click **Create audience** to build one inline.

### Then

The **Then** section contains one card per action. Each card lets you configure the integration, the action type, and any required fields.

Click **Add action** to open the action menu. Actions are grouped by integration. If an integration isn't connected, a **Connect** badge appears. Click it to connect without leaving the builder.

### Save and activate

Click **Save** to save the playbook. The **Save** button is disabled until the playbook has an audience and at least one action with all required fields filled in. A tooltip explains what is still missing.

Use the **Active/Inactive** toggle at the top of the builder to turn the playbook on or off. The toggle state is saved when you click **Save**.

## Playbook health

Each playbook in the table shows a health chip when something needs attention:

| Health | Chip | Meaning |
| :- | :- | :- |
| Broken | Broken | The audience references a deleted or archived demo, or an action's integration is disconnected or failing. |
| Stale | No matches · Nd | The playbook is active but has had no matching runs in 30 days while the workspace had sessions. |
| Healthy | (none) | No issues detected. |

Address broken playbooks promptly: their actions are not running.

## Test run

To test a playbook without waiting for real visitor traffic, open it in the builder and select **Test run** from the overflow menu. The overflow menu is the three-dot icon next to the Active/Inactive toggle. Test runs appear in the Runs view with a **Test** badge.

## Replay

Use **Replay** to send past visitor and account data through a playbook retroactively. Open the playbook and select **Replay** from the overflow menu. Set the start and end dates and the delay between sessions, then confirm.

## Runs

The **Runs** tab inside a playbook shows its run history. Each row includes the visitor email, status, audience match, started time, and duration.

Statuses: Completed, Failed, In progress, Queued, Initiated, Did not run, Hidden account.

A stats strip at the top shows total runs, success rate, failed count, and median duration for the selected date range (default 30 days). Use the search box to filter by visitor email or playbook name, and the status filter to narrow the list.

Click a run row to open the detail drawer, which shows an activity timeline with each action as a step. Failed steps open by default. Use **Show debug** to see more detail, or **Copy logs** to share with support.

## Audiences

Audiences are saved visitor and account filters. They are created and managed in the **Audiences** tab of the Integrations hub.

### Default audiences

These audiences are created automatically for every workspace:

**Visitor audiences**

| Audience | Description |
| :- | :- |
| Identified visitors | Visitors with an email address |
| Engaged visitors | Visitors who advance one or more steps in a demo |
| Repeat visitors | Visitors with at least two unique sessions |

**Account audiences**

| Audience | Description |
| :- | :- |
| Engaged accounts | Accounts with at least one engaged visitor |
| Accounts with multiple visitors | Accounts with more than one unique visitor |

### Create a custom audience

In the **Audiences** tab, click **Create audience**. Name the audience, choose a scope (Visitor or Account), and build your filters. A live members table shows who currently matches. Click **Create audience** to save.

You can also use **Describe your audience** (Copilot) to generate filters from a plain-text description. Review the generated filters before saving.

Editing an audience that is used by active playbooks triggers a confirmation: the change affects all playbooks using it.

### Filter by form submission

You can target visitors based on which Navattic form they submitted. When a visitor submits a native Navattic form, Navattic records the form automatically as the visitor's **Last submitted form** property.

To build a form-based audience:

1. In the audience builder, add a **Visitor** filter.
2. Choose **Last submitted form** from the property list.
3. Select one or more forms by name, or choose **exists** to match any visitor who submitted any form.

A live members table shows who currently matches as you build the filter.

<Note>
  This filter covers native Navattic forms only. Forms embedded via HubSpot, Marketo, or Pardot are not included.
</Note>

## Actions reference

Playbook actions run when a session ends. Actions are available at the visitor level and, for Account Based Engagement, at the account level.

### Visitor-based actions

| Integration | Actions |
| :- | :- |
| HubSpot | Sync contact, Timeline events |
| Salesforce | Sync contact, Sync lead, Submit session object |
| Pardot | Sync lead |
| Marketo | Sync visitor |
| Slack | Send visitor message |
| Segment | Segment event |
| Webhook | Webhook event |
| Email | Send visitor message |

### Account-based actions

Account-based actions require Account Based Engagement. Contact [success@navattic.com](mailto:success@navattic.com) to learn more.

| Integration | Actions |
| :- | :- |
| HubSpot | Sync company, Timeline events |
| Salesforce | Sync account, Send notification to Opportunity Owner |
| Pardot | Sync account |
| Slack | Send account message |
| Segment | Segment event |
| Webhook | Webhook event |
| Email | Send account message |

### Sync modes

The following sync modes are available on CRM actions:

| Mode | Behavior |
| :- | :- |
| Update and create | Creates new records and updates existing ones. |
| Only update existing | Updates existing records only. No new records are created. |
| Only first session | Triggers only for the first session of each visitor or account. |

**Timeline events contact sync mode (HubSpot only)**

When using the HubSpot **Timeline events** action, an additional **Contact sync mode** controls whether Navattic creates new HubSpot contacts:

* **All visitors (create contacts)**: Timeline events attach to the contact record, creating it if one doesn't exist.
* **Only existing contacts**: Timeline events only send for visitors who already have a matching contact in HubSpot.

See [HubSpot](/integrations/hubspot#timeline-events-contact-sync-mode) for details.

## FAQs

<AccordionGroup>
  <Accordion title="Why does my new playbook show 0 runs?">
    Playbook runs are not recorded retroactively. A new playbook starts counting from when it was created. Use **Replay** to process past sessions.
  </Accordion>

  <Accordion title="Can I retroactively run a playbook?">
    Yes. Open the playbook in the builder and select **Replay** from the overflow menu. Set the start date, end date, and delay between sessions.
  </Accordion>

  <Accordion title="Why isn't internal traffic generating a playbook run?">
    If you have Hidden Accounts configured to exclude your domain, internal sessions are filtered out. To test, use **Test run** from the builder's overflow menu instead of browsing the demo yourself. To check Hidden Accounts, go to **Settings** > **Hidden Accounts**.

    When a session from a hidden domain does trigger a run, the run shows a **Hidden account** status instead of Completed.
  </Accordion>

  <Accordion title="How do I prevent duplicate Slack messages?">
    After selecting **Send visitor message to Slack** as the action, toggle on **Only first session**. This sends the alert only on a visitor's first session.
  </Accordion>

  <Accordion title="I can't see my Slack channel when creating a Slack playbook.">
    Make sure the Navattic bot has been added to the channel. Send `@navattic` in the channel to add it. Also confirm you are a Slack admin and the channel is public. Use the **Use ID** toggle to search by channel ID if the name doesn't appear.
  </Accordion>

  <Accordion title="How can I use webhooks to send data to Zapier?">
    Use the [Webhook](/integrations/webhook) integration with a Zap URL. See [Zapier's documentation](https://help.zapier.com/hc/en-us/articles/8496288690317-Trigger-Zaps-from-webhooks) for setup steps.
  </Accordion>

  <Accordion title="When exactly does a session end?">
    A session ends when a visitor navigates away from the demo or closes the page. As a fallback, Navattic checks all open sessions every 15 minutes and closes any that have had no activity in the past 30 minutes, using the time of the last activity event as the close time.
  </Accordion>
</AccordionGroup>


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