> ## 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.

# Building a Play

> Learn the fundamentals of creating Plays in Unify.

export const PlayBuilderCompanyHandleDark = () => <svg className="hidden dark:block" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" fill="#403C2A" />
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" stroke="#404040" />
    <g clip-path="url(#clip0_2769_1689)">
      <path d="M5.75 16.25H16.25" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.25 8.66663H9.83333" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.25 11H9.83333" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.25 13.3334H9.83333" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M12.167 8.66663H12.7503" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M12.167 11H12.7503" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M12.167 13.3334H12.7503" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M6.91699 16.25V6.91667C6.91699 6.60725 7.03991 6.3105 7.2587 6.09171C7.47749 5.87292 7.77424 5.75 8.08366 5.75H13.917C14.2264 5.75 14.5232 5.87292 14.7419 6.09171C14.9607 6.3105 15.0837 6.60725 15.0837 6.91667V16.25" stroke="#FFEE9A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    </g>
    <defs>
      <clipPath id="clip0_2769_1689">
        <rect width="14" height="14" fill="white" transform="translate(4 4)" />
      </clipPath>
    </defs>
  </svg>;

export const PlayBuilderCompanyHandleLight = () => <svg className="block dark:hidden" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" fill="#FFFAE6" />
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" stroke="#E2E2E2" />
    <g clip-path="url(#clip0_2769_1689)">
      <path d="M5.75 16.25H16.25" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.25 8.66663H9.83333" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.25 11H9.83333" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.25 13.3334H9.83333" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M12.167 8.66663H12.7503" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M12.167 11H12.7503" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M12.167 13.3334H12.7503" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M6.91699 16.25V6.91667C6.91699 6.60725 7.03991 6.3105 7.2587 6.09171C7.47749 5.87292 7.77424 5.75 8.08366 5.75H13.917C14.2264 5.75 14.5232 5.87292 14.7419 6.09171C14.9607 6.3105 15.0837 6.60725 15.0837 6.91667V16.25" stroke="#887115" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    </g>
    <defs>
      <clipPath id="clip0_2769_1689">
        <rect width="14" height="14" fill="white" transform="translate(4 4)" />
      </clipPath>
    </defs>
  </svg>;

export const PlayBuilderPersonListHandleDark = () => <svg className="hidden dark:block" width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M1 11C1 5.20101 5.70101 0.5 11.5 0.5C17.299 0.5 22 5.20101 22 11C22 16.799 17.299 21.5 11.5 21.5C5.70101 21.5 1 16.799 1 11Z" fill="#323F3E" />
    <path d="M1 11C1 5.20101 5.70101 0.5 11.5 0.5C17.299 0.5 22 5.20101 22 11C22 16.799 17.299 21.5 11.5 21.5C5.70101 21.5 1 16.799 1 11Z" stroke="#404040" />
    <g clip-path="url(#clip0_2769_1947)">
      <path d="M12.083 12.1667C12.083 10.5558 13.3889 9.25 14.9997 9.25C16.6105 9.25 17.9163 10.5558 17.9163 12.1667V12.4583" stroke="#9DE6E2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M15 9.25C15.9665 9.25 16.75 8.4665 16.75 7.5C16.75 6.5335 15.9665 5.75 15 5.75C14.0335 5.75 13.25 6.5335 13.25 7.5C13.25 8.4665 14.0335 9.25 15 9.25Z" stroke="#9DE6E2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M5.08301 15.6667V15.0833C5.08301 12.8282 6.91118 11 9.16634 11C11.4215 11 13.2497 12.8282 13.2497 15.0833V15.6667" stroke="#9DE6E2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.16634 11C10.455 11 11.4997 9.95529 11.4997 8.66665C11.4997 7.37798 10.455 6.33331 9.16634 6.33331C7.87768 6.33331 6.83301 7.37798 6.83301 8.66665C6.83301 9.95529 7.87768 11 9.16634 11Z" stroke="#9DE6E2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    </g>
    <defs>
      <clipPath id="clip0_2769_1947">
        <rect width="14" height="14" fill="white" transform="translate(4.5 4)" />
      </clipPath>
    </defs>
  </svg>;

export const PlayBuilderPersonListHandleLight = () => <svg className="block dark:hidden" width="23" height="22" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M1 11C1 5.20101 5.70101 0.5 11.5 0.5C17.299 0.5 22 5.20101 22 11C22 16.799 17.299 21.5 11.5 21.5C5.70101 21.5 1 16.799 1 11Z" fill="#F0FBFA" />
    <path d="M1 11C1 5.20101 5.70101 0.5 11.5 0.5C17.299 0.5 22 5.20101 22 11C22 16.799 17.299 21.5 11.5 21.5C5.70101 21.5 1 16.799 1 11Z" stroke="#E2E2E2" />
    <g clip-path="url(#clip0_2769_1947)">
      <path d="M12.083 12.1667C12.083 10.5558 13.3889 9.25 14.9997 9.25C16.6105 9.25 17.9163 10.5558 17.9163 12.1667V12.4583" stroke="#0F837B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M15 9.25C15.9665 9.25 16.75 8.4665 16.75 7.5C16.75 6.5335 15.9665 5.75 15 5.75C14.0335 5.75 13.25 6.5335 13.25 7.5C13.25 8.4665 14.0335 9.25 15 9.25Z" stroke="#0F837B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M5.08301 15.6667V15.0833C5.08301 12.8282 6.91118 11 9.16634 11C11.4215 11 13.2497 12.8282 13.2497 15.0833V15.6667" stroke="#0F837B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
      <path d="M9.16634 11C10.455 11 11.4997 9.95529 11.4997 8.66665C11.4997 7.37798 10.455 6.33331 9.16634 6.33331C7.87768 6.33331 6.83301 7.37798 6.83301 8.66665C6.83301 9.95529 7.87768 11 9.16634 11Z" stroke="#0F837B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    </g>
    <defs>
      <clipPath id="clip0_2769_1947">
        <rect width="14" height="14" fill="white" transform="translate(4.5 4)" />
      </clipPath>
    </defs>
  </svg>;

export const PlayBuilderPersonHandleDark = () => <svg className="hidden dark:block" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" fill="#323F3E" />
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" stroke="#404040" />
    <path d="M6.91699 15.6667V15.0833C6.91699 12.8282 8.74516 11 11.0003 11C13.2555 11 15.0837 12.8282 15.0837 15.0833V15.6667" stroke="#9DE6E2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M11.0003 11.0002C12.289 11.0002 13.3337 9.95547 13.3337 8.66683C13.3337 7.37816 12.289 6.3335 11.0003 6.3335C9.71166 6.3335 8.66699 7.37816 8.66699 8.66683C8.66699 9.95547 9.71166 11.0002 11.0003 11.0002Z" stroke="#9DE6E2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
  </svg>;

export const PlayBuilderPersonHandleLight = () => <svg className="block dark:hidden" width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" fill="#F0FBFA" />
    <path d="M0.5 11C0.5 5.20101 5.20101 0.5 11 0.5C16.799 0.5 21.5 5.20101 21.5 11C21.5 16.799 16.799 21.5 11 21.5C5.20101 21.5 0.5 16.799 0.5 11Z" stroke="#E2E2E2" />
    <path d="M6.91699 15.6667V15.0833C6.91699 12.8282 8.74516 11 11.0003 11C13.2555 11 15.0837 12.8282 15.0837 15.0833V15.6667" stroke="#0F837B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
    <path d="M11.0003 11.0002C12.289 11.0002 13.3337 9.95547 13.3337 8.66683C13.3337 7.37816 12.289 6.3335 11.0003 6.3335C9.71166 6.3335 8.66699 7.37816 8.66699 8.66683C8.66699 9.95547 9.71166 11.0002 11.0003 11.0002Z" stroke="#0F837B" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
  </svg>;

## Actions and triggers

The building blocks of Plays are called *actions*. Each action is a different
step of a Play, each representing a different task that can be automated in
Unify.

Every Play starts with a special type of action called a *trigger*. A trigger is
the starting point which defines when the Play should run and what data should
be provided to it.

<Frame caption="An empty Play showing the trigger selection panel.">
  <img src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/play-trigger.png?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=b84850735993e7c46cc25f2a9bd67217" width="2880" height="2048" data-path="images/reference/plays/play-trigger.png" />
</Frame>

Here are a few of the triggers you can choose from:

* **Record enters an Audience**: Run a Play once on every company or person that
  "enters" an Audience. Audiences can be reused across multiple Plays.
* **Record matches criteria**: Run a Play once on every company or person that
  matches a set of filters. This trigger is similar to the audience trigger, but
  it doesn't require you to create a separate audience. Useful when you don't
  need to create a reusable audience.
* **Manual**: Only run a Play when it is manually triggered. For example, you
  can send individual companies or people to a Play, or you can send an entire
  audience.

Once the trigger is selected, you can start adding additional actions to the
Play. Each action performs a different task. Actions can be chained together or
perform branching logic based on the results of the previous action.

Here are some commonly used actions:

* **AI Agent qualification**: Perform AI-powered research to answer qualifying
  questions about a company or person.
* **Prospect for new People**: Find new people at a company matching specific
  personas. You can specify a limit on the number of people to find.
* **Sequence enrollment**: Enroll a person in a Sequence. You can route people
  to different mailboxes and Sequences based on their persona.
* **Write to Salesforce or HubSpot**: Sync a company or person to Salesforce or
  HubSpot. This will create or update a record in your CRM.

You can find details about the full set of available triggers and actions in the
reference sections below:

<Card title="Triggers" icon="zap" iconType="sharp-regular" href="/reference/plays/triggers" horizontal>
  See the full list of triggers available in Unify and how to use them.
</Card>

<Card title="Actions" icon="play-circle" iconType="sharp-regular" href="/reference/plays/actions" horizontal>
  See the full list of actions available in Unify and how to use them.
</Card>

<Card title="Play settings" icon="rotate-right" iconType="sharp-regular" href="/reference/plays/play-settings" horizontal>
  Configure play-level settings such as rerun behavior.
</Card>

## Inputs and outputs

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                                 |
| :-------------------------------------------------------------------------: | - | :------------------------------------ |
|     {<PlayBuilderPersonHandleLight />}{<PlayBuilderPersonHandleDark />}     |   | A single person record.               |
| {<PlayBuilderPersonListHandleLight />}{<PlayBuilderPersonListHandleDark />} |   | A list of one or more person records. |
|    {<PlayBuilderCompanyHandleLight />}{<PlayBuilderCompanyHandleDark />}    |   | 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.

## Connecting actions

To connect two actions, click on the output symbol of the first action and drag
the connection to the input symbol of the second action.

<Frame caption="Connect two actions by dragging a connection line between them.">
  <video autoPlay muted loop playsInline className="w-full aspect-video dark:hidden" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/draw-connection-light.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=37e6d321718e6ca91064c2797a06e42c" data-path="images/reference/plays/draw-connection-light.mp4" />

  <video autoPlay muted loop playsInline className="hidden w-full aspect-video dark:block" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/draw-connection-dark.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=0da77a575ba6dbdb667e2656764d8e12" data-path="images/reference/plays/draw-connection-dark.mp4" />
</Frame>

When adding a new action to the Play Builder, you can drag it on top of another
action to automatically connect them.

<Frame caption="Drag a new action onto another action to quickly connect them.">
  <video autoPlay muted loop playsInline className="w-full aspect-video dark:hidden" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/drag-and-drop-light.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=a68834a16044eb4f63b7c3951bf03b34" data-path="images/reference/plays/drag-and-drop-light.mp4" />

  <video autoPlay muted loop playsInline className="hidden w-full aspect-video dark:block" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/drag-and-drop-dark.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=82b46126a9a4cbe00d40f989af75e92b" data-path="images/reference/plays/drag-and-drop-dark.mp4" />
</Frame>

Another shortcut for connecting actions is to move any action near to another
action. Once the input and output symbols are close enough, they will
automatically be connected.

<Frame caption="Move an action near another action to automatically connect them.">
  <video autoPlay muted loop playsInline className="w-full aspect-video dark:hidden" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/drag-to-connect-light.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=021fdffb3cf7318941b9724f792ccace" data-path="images/reference/plays/drag-to-connect-light.mp4" />

  <video autoPlay muted loop playsInline className="hidden w-full aspect-video dark:block" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/drag-to-connect-dark.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=15ebad7cca464ed3f0fb08056e6ed037" data-path="images/reference/plays/drag-to-connect-dark.mp4" />
</Frame>

To delete a connection, click on the connection line and press the **Backspace**
or **Delete** key.

<Frame caption="Delete a connection by clicking on it and pressing the backspace key.">
  <video autoPlay muted loop playsInline className="w-full aspect-video dark:hidden" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/delete-connection-light.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=d652e69c963a2c55ae5b25688d33f503" data-path="images/reference/plays/delete-connection-light.mp4" />

  <video autoPlay muted loop playsInline className="hidden w-full aspect-video dark:block" src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/delete-connection-dark.mp4?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=eb58839cb879f849219a7c98d7174b5c" data-path="images/reference/plays/delete-connection-dark.mp4" />
</Frame>

## Save and publish

When you first create a Play, it is automatically saved as a draft. You can
leave and return later to finish building the Play without losing your progress.

Once you're ready to start running the Play, you can publish it. Published Plays
will run automatically based on the trigger you've selected. To publish a Play,
click the **Publish** button in the top right corner of the Play Builder.

<Frame caption="The confirmation shown when publishing a Play.">
  <img src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/play-publish-modal.png?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=8c606c3f5d7fcd5c88275e1599200800" width="2880" height="2048" data-path="images/reference/plays/play-publish-modal.png" />
</Frame>

After publishing a Play, you can still make changes to it. Any changes you make
will be saved as a new draft. You can publish the new draft at any time by
clicking the **Publish** button again. You can also discard the draft and revert
to the last published version.

If you want to temporarily stop a Play from running, you can pause it by
toggling the pause button to the left of the **Publish** button. Pausing a Play
will prevent it from running until you resume it.

## View logs

Once a Play starts running, you can view the logs to see which companies and
people the Play has run on. In the top left corner of the Play Builder, click
on **Logs** to see the full history of Play executions.

<Frame caption="The logs view showing the history of Play executions.">
  <img src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/play-logs-table.png?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=64399fad0d6eeb815b02dc18bf6da612" width="2880" height="2048" data-path="images/reference/plays/play-logs-table.png" />
</Frame>

Within the logs view, you can see the status of each Play execution, including
in-progress, completed, and failed executions. You can click on any row of the
logs table to see more details about that specific execution.

<Frame caption="The details view showing the results of a single Play run.">
  <img src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/play-logs-details.png?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=1d8180d94a2444af4a65c469c5772882" width="2880" height="2048" data-path="images/reference/plays/play-logs-details.png" />
</Frame>

The exact path this record took through the Play is highlighted on the right
side of the details view. You can see exactly which actions ran and what the
results were at each step.

## View metrics

You can view metrics for each Play to see how it's performing over time. In the
top left corner of the Play Builder, click on **Metrics** to see overview
metrics and charts for the Play and its actions.

<Frame caption="Overview metrics for the play.">
  <img src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/play-metrics-overview.png?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=09e325d3f07b6ad29e379e4a2a4f9540" width="2880" height="2048" data-path="images/reference/plays/play-metrics-overview.png" />
</Frame>

You can click on any action to see detailed information about how it's
performing. For example, clicking on an Agent qualification action will let you
measure how many records are being qualified over time and why.

<Frame caption="Detailed metrics about an AI Agent qualification action.">
  <img src="https://mintcdn.com/unify-19/FV7_ax32WGUYsOt7/images/reference/plays/play-metrics-agent-qualification.png?fit=max&auto=format&n=FV7_ax32WGUYsOt7&q=85&s=2af9777c1e699157ee41ca0f565a8976" width="2880" height="2048" data-path="images/reference/plays/play-metrics-agent-qualification.png" />
</Frame>

The action-specific metrics pages will also show you the records that have
passed through that action and their results.
