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

# Create a play

> Build a website visitor outreach workflow.

## Overview

Create a play that finds prospects at companies visiting your website, enrolls
eligible people in a sequence, and syncs their records to your CRM.

Before you begin, set up [website visitor tracking](https://docs.unifygtm.com/reference/signals/website-visitors.md),
define your [personas](https://docs.unifygtm.com/tutorials/how-to-use-personas.md), and
[create and publish a template sequence](https://docs.unifygtm.com/reference/sequences/create-a-sequence.md)
with a connected sending mailbox. The CRM action also needs a workspace CRM
connection with bidirectional syncs enabled.

## Walkthrough

**1. Create a play**

Open [Plays](https://app.unifygtm.com/dashboard/plays) and click **New Play**.

![This is what the plays tab will look like before creating any plays.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/plays-tab-empty.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=cff29c75d17bdbf3027f07ab3436d35b)

This is what the plays tab will look like before creating any plays.

![When you create a play, you will be prompted to give it a name.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/plays-tab-new.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=e58d97141cac834403326072d465b2d7)

When you create a play, you will be prompted to give it a name.

![Once the play is created, you will see the play builder.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-new.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=6ba2735b3691266d12815fe96566a4ed)

Once the play is created, you will see the play builder.

**2. Choose a trigger**

Once you've created a new play, you will see the play builder. The first step
when building any play is to choose a *trigger*. The trigger lets you specify
exactly when the play should run and which companies or people it should run on.

In the center of the builder, you will see an action that says **Select a trigger**.
Click on it to show the trigger configuration panel. For this play, choose the
**Website visitors** template.

![Select a trigger type or a template from the configuration panel.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-trigger-selection.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=626c8d9051dcc830b29cec3b3ef5186c)

Select a trigger type or a template from the configuration panel.

![This is where you define the criteria for companies that this play will run on.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-trigger-configuration.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=2b206749d5a5ce26f820f6ae9292a32e)

This is where you define the criteria for companies that this play will run on.

Here you have the option to further filter and refine the companies that this
play will run on. For example, if you only want to run this play on companies
with more than 100 employees, you can add a filter on **Employee Count**.

You can learn more about the available filters and how to use them in the tutorial
[Create an audience](https://docs.unifygtm.com/reference/lists/create-an-audience.md). You can always
return later to add or modify filters. Click **Done** to finish configuring the
trigger.

**3. Add actions**

Add prospecting, sequence enrollment, and CRM sync actions. Use a loop to run
the enrollment and sync actions for each person found.

### Prospect for people

Start by adding a prospecting action. This action will take the company coming
from the trigger and search for relevant prospects. Drag the **Prospect for People**
action from the action list and drop it into the builder.

> [!TIP]
>
> If you drag and drop a new action on top of an existing action, it will
> automatically be connected to it.

![Drag and drop actions from the action list into the play builder.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-prospect-action.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=8a70d73cc70fdda3719cfee1e81ac4bd)

Drag and drop actions from the action list into the play builder.

Once added, you will see the prospecting options shown in the configuration
panel on the left. Here are the most important selections to make:

* **Max. prospects per company**: This is how many prospects you want to find at
  each company. We recommend starting with 2-4 prospects per company.
* **Personas**: These are the personas to search for. You can select from
  existing personas or create new ones. Unify will find people matching these
  personas in order, so list them in order of preference.

If you haven't defined any personas yet, you can learn how to do so in the
tutorial [How to create personas](https://docs.unifygtm.com/tutorials/how-to-use-personas.md).

### Loop

Next, add a **Loop** action. The prospecting action will return a list of people
found at the company, and the loop will run subsequent actions once for each
person in the list.

![Add a loop and connect it to the prospecting action.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-loop-action.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=0b1d2ae66f5b9cac90f2458dc80e1b3b)

Add a loop and connect it to the prospecting action.

Each action receives an input and produces an output. Actions in the play
builder have small colored symbols that represent what type of input and output
they expect.

Here's what each symbol represents:

| Symbol | Value |
| :-: | :- |
| | A single person record. |
| | A list of one or more person records. |
| | A single company record. |

Plays work by connecting each action's output to a matching input on another
action. This is how data flows through the play and how each action knows what
to do.

Most actions run on one record at a time. The **Loop** action is how you take a
list of records and run actions on them one by one.

### Sequence enrollment

Before adding this action, [create and publish a template sequence](https://docs.unifygtm.com/reference/sequences/create-a-sequence.md)
and connect a sending mailbox. Review its [ruleset](https://docs.unifygtm.com/reference/sequences/rulesets.md)
to apply exclusions and enrollment limits, then choose a
[send schedule](https://docs.unifygtm.com/reference/sequences/send-schedules.md) for your audience.

Place a **Sequence** action inside the loop to enroll each eligible person in
that sequence.

> [!TIP]
>
> Once you've dropped the action into the loop, you can drag it near the loop
> action to automatically connect them. You can also manually draw connections
> between the colored icons that represent action inputs and outputs.

Click **Add persona routing**. For this example, use the same sequence for all
people found by the prospecting action: select the sending mailbox and sequence
in the **Everyone** route, then click **Done**.

The routing dialog with one mailbox and sequence selected for everyone reaching the action.

When different personas need different messaging, add persona routes instead.
[Sequence routing](https://docs.unifygtm.com/reference/plays/actions.md#sequence) explains that option,
owner-based mailbox selection, and limits on enrollments per company.

### Sync to CRM

Finally, add an action to sync each new person to your CRM. Depending on which
CRM you've connected in Unify, you will see either a **Sync to Salesforce** or
**Sync to HubSpot** action.

![You can specify default field values or limit the number of people synced per company.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-hubspot.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=d42ba7dda013eb2ba49eceb901d9b779)

You can specify default field values or limit the number of people synced per company.

**4. Publish and view logs**

Once your play is ready, click **Publish** in the top right corner of
the play builder. This will activate the play and start running it on companies
that match the trigger criteria you defined earlier.

![The publish confirmation for the website visitor play.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-builder-publish.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=f9b85788f676e11eb97609bbe85b2c7d)

Publishing activates the play's trigger.

As the play starts to run on companies, you will see them appear in the logs.
Click on the **Logs** tab at the top of the play builder to view the logs.

![Logs show a detailed view of every company or person a play has run on.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-logs.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=0000cbd964af7144fda4bf0a96f48718)

Logs show a detailed view of every company or person a play has run on.

Click on any company to view the details of its run, including the exact actions
that were taken and the results of each action. Click on any action to view the
precise inputs, outputs, and result of that action.

![Click on any company to view exactly what the play did.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-logs-details.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=9020f1aad71fc48334b3846d4830c5c8)

Click on any company to view exactly what the play did.

![Click on any action within the log details to see its results.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-logs-details-prospect-action.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=91ad526c9c77c88ecf003a903a945f92)

Click on any action within the log details to see its results.

![You can use the action logs to inspect exactly how a play is working.](https://mintcdn.com/unify-19/QTxNj2fcd-br9FnE/images/tutorials/how-to-create-a-play/play-logs-details-sequence-action.png?fit=max\&auto=format\&n=QTxNj2fcd-br9FnE\&q=85\&s=765455e619d03172f32b7d50ae4fea94)

You can use the action logs to inspect exactly how a play is working.

A successful sequence action creates an enrollment. Emails then wait for the
sequence's schedule and the selected mailbox's capacity. If someone is skipped,
review the action's result for the reason. Track enrolled people in the
[enrollment table](https://docs.unifygtm.com/reference/sequences/enrollments.md), then filter
[sequence results](https://docs.unifygtm.com/reference/sequences/results.md) by this play to review its
outreach.

## Next steps

Use [play settings](https://docs.unifygtm.com/reference/plays/play-settings.md) to control reruns, or explore
other [triggers](https://docs.unifygtm.com/reference/plays/triggers.md) and [actions](https://docs.unifygtm.com/reference/plays/actions.md)
for your next workflow.


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