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

---
id: 1714f8d3-2db6-4bb6-9945-c0d5d1826c26
---

# Workflow actions and enrollment types

> Review the different action and enrollment event types for the v4 automation API.

export const PostmanCard = ({title, collectionId}) => {
  return <div className="card-condensed-cta">
      <Card title={title ? title : "Postman collection"} href={`https://app.getpostman.com/run-collection/${collectionId}`} horizontal={true} cta="Run in Postman" icon={<svg xmlns="http://www.w3.org/2000/svg" width={25} height={25} preserveAspectRatio="xMidYMid" viewBox="0 0 256 256">
              <path fill="#FF6C37" d="M254.953 144.253c8.959-70.131-40.569-134.248-110.572-143.206C74.378-7.912 10.005 41.616 1.047 111.619c-8.959 70.003 40.569 134.248 110.572 143.334 70.131 8.959 134.248-40.569 143.334-110.7Z" />
              <path fill="#FFF" d="m174.2 82.184-54.007 54.007-15.229-15.23c53.11-53.11 58.358-48.503 69.236-38.777Z" />
              <path fill="#FF6C37" d="M120.193 137.47c-.384 0-.64-.128-.895-.384l-15.358-15.229a1.237 1.237 0 0 1 0-1.792c54.007-54.006 59.638-48.887 71.028-38.649.255.256.383.512.383.896s-.128.64-.383.896l-54.007 53.878c-.128.256-.512.384-.768.384Zm-13.437-16.509 13.437 13.438 52.087-52.087c-9.47-8.446-15.87-11.006-65.524 38.65Z" />
              <path fill="#FFF" d="m135.679 151.676-14.718-14.718 54.007-54.006c14.46 14.59-7.167 38.265-39.29 68.724Z" />
              <path fill="#FF6C37" d="M135.679 152.956c-.384 0-.64-.128-.896-.384l-14.718-14.718c-.256-.256-.256-.512-.256-.896s.128-.64.384-.895L174.2 82.056a1.237 1.237 0 0 1 1.791 0 15.58 15.58 0 0 1 4.991 11.902c-.256 14.206-16.38 32.25-44.28 58.614-.383.256-.767.384-1.023.384Zm-12.926-15.998c8.19 8.319 11.646 11.646 12.926 12.926 21.5-20.476 42.36-41.464 42.488-55.926.128-3.327-1.152-6.655-3.327-9.214l-52.087 52.214Z" />
              <path fill="#FFF" d="m105.22 121.345 10.878 10.878c.256.256.256.512 0 .768-.128.128-.128.128-.256.128l-22.524 4.863c-1.152.128-2.175-.64-2.431-1.791-.128-.64.128-1.28.512-1.664l13.053-13.054c.256-.256.64-.384.768-.128Z" />
              <path fill="#FF6C37" d="M92.934 139.262c-1.92 0-3.327-1.536-3.327-3.455 0-.896.384-1.792 1.024-2.432l13.053-13.054c.768-.64 1.792-.64 2.56 0l10.878 10.878c.768.64.768 1.792 0 2.56-.256.256-.512.384-.896.512l-22.524 4.863c-.256 0-.512.128-.768.128Zm11.902-16.51-12.542 12.543c-.256.256-.383.64-.128 1.024.128.383.512.511.896.383l21.116-4.607-9.342-9.342Z" />
              <path fill="#FFF" d="M202.739 52.238c-8.191-7.935-21.373-7.679-29.307.64-7.935 8.318-7.679 21.372.64 29.306A20.678 20.678 0 0 0 199.155 85l-14.59-14.59 18.174-18.172Z" />
              <path fill="#FF6C37" d="M188.405 89.223c-12.158 0-22.012-9.854-22.012-22.012 0-12.158 9.854-22.012 22.012-22.012 5.631 0 11.134 2.176 15.23 6.143.255.256.383.512.383.896s-.128.64-.384.895L186.357 70.41l13.566 13.566c.512.512.512 1.28 0 1.792l-.256.256c-3.327 2.047-7.295 3.199-11.262 3.199Zm0-41.337c-10.75 0-19.452 8.703-19.324 19.453 0 10.75 8.702 19.452 19.452 19.324 2.944 0 5.887-.64 8.575-2.047l-13.438-13.31c-.256-.256-.384-.512-.384-.896s.128-.64.384-.895l17.149-17.15c-3.456-2.943-7.807-4.479-12.414-4.479Z" />
              <path fill="#FFF" d="m203.122 52.622-.255-.256-18.301 18.044 14.461 14.462c1.408-.896 2.816-1.92 3.967-3.072a20.51 20.51 0 0 0 .128-29.178Z" />
              <path fill="#FF6C37" d="M199.155 86.28c-.384 0-.64-.128-.896-.384l-14.589-14.59c-.256-.256-.384-.512-.384-.896s.128-.64.384-.895l18.173-18.173a1.237 1.237 0 0 1 1.791 0l.384.256c8.575 8.574 8.575 22.396.128 31.098-1.28 1.28-2.687 2.432-4.223 3.328-.384.128-.64.256-.768.256Zm-12.798-15.87 12.926 12.926c1.024-.64 2.048-1.536 2.816-2.304 7.294-7.294 7.678-19.196.64-26.875L186.357 70.41Z" />
              <path fill="#FFF" d="M176.375 84.488a7.879 7.879 0 0 0-11.134 0l-48.247 48.247 8.063 8.063 51.062-44.792c3.328-2.816 3.584-7.807.768-11.134-.256-.128-.384-.256-.512-.384Z" />
              <path fill="#FF6C37" d="M124.929 142.077c-.384 0-.64-.128-.896-.383l-8.063-8.063a1.237 1.237 0 0 1 0-1.792l48.247-48.247a9.115 9.115 0 0 1 12.926 0 9.115 9.115 0 0 1 0 12.926l-.384.384-51.063 44.792c-.128.255-.384.383-.767.383Zm-6.143-9.342 6.27 6.271 50.167-44.024c2.816-2.304 3.072-6.527.768-9.342-2.303-2.816-6.526-3.072-9.342-.768-.128.128-.256.256-.512.384l-47.351 47.48Z" />
              <path fill="#FFF" d="M80.009 187.637c-.512.256-.768.768-.64 1.28l2.175 9.214c.512 1.28-.256 2.816-1.663 3.2-1.024.384-2.176 0-2.816-.768l-14.077-13.95 45.943-45.943 15.87.256 10.75 10.75c-2.56 2.175-18.045 17.149-55.542 35.961Z" />
              <path fill="#FF6C37" d="M78.985 202.61c-1.024 0-2.048-.383-2.688-1.151l-13.95-13.95c-.255-.256-.383-.512-.383-.896 0-.383.128-.64.384-.895l45.944-45.944c.256-.256.64-.384.895-.384l15.87.256c.383 0 .64.128.895.384l10.75 10.75c.256.256.384.64.384 1.024s-.128.64-.512.896l-.895.767c-13.566 11.902-31.995 23.804-54.902 35.194l2.175 9.086c.384 1.664-.384 3.456-1.92 4.352-.767.384-1.407.512-2.047.512Zm-14.078-15.997 13.182 13.054c.384.64 1.152.896 1.792.512.64-.384.896-1.152.512-1.792l-2.176-9.214c-.256-1.152.256-2.176 1.28-2.688 22.652-11.39 40.952-23.163 54.39-34.81l-9.47-9.47-14.718-.256-44.792 44.664Z" />
              <path fill="#FFF" d="m52.11 197.62 11.006-11.007 16.38 16.381-26.107-1.791c-1.151-.128-1.92-1.152-1.791-2.304 0-.512.128-1.024.512-1.28Z" />
              <path fill="#FF6C37" d="m79.497 204.146-26.236-1.791c-1.92-.128-3.199-1.792-3.071-3.712.128-.768.384-1.535 1.024-2.047L62.22 185.59a1.237 1.237 0 0 1 1.792 0l16.38 16.38c.385.385.512.897.257 1.408-.256.512-.64.768-1.152.768Zm-16.381-15.74-10.11 10.11c-.384.255-.384.895 0 1.151.127.128.255.256.511.256l22.652 1.536-13.053-13.054ZM104.452 146.557c-.768 0-1.28-.64-1.28-1.28 0-.384.128-.64.384-.896l12.414-12.414a1.237 1.237 0 0 1 1.792 0l8.062 8.063c.384.384.512.768.384 1.28-.128.384-.512.767-1.023.895l-20.477 4.352h-.256Zm12.414-11.902-8.446 8.446 13.821-2.943-5.375-5.503Z" />
              <path fill="#FFF" d="m124.8 140.926-14.077 3.071c-1.024.256-2.048-.384-2.303-1.408-.128-.64 0-1.28.511-1.791l7.807-7.807 8.063 7.935Z" />
              <path fill="#FF6C37" d="M110.467 145.277a3.168 3.168 0 0 1-3.2-3.2c0-.895.385-1.663.897-2.303l7.806-7.807a1.237 1.237 0 0 1 1.792 0l8.062 8.063c.384.384.512.768.384 1.28-.128.384-.512.767-1.023.895l-14.078 3.072h-.64Zm6.399-10.622-6.91 6.91c-.257.257-.257.512-.129.768s.384.384.768.384l11.774-2.56-5.503-5.502ZM203.25 64.907c-.256-.767-1.151-1.151-1.92-.895-.767.255-1.151 1.151-.895 1.92 0 .127.128.255.128.383.768 1.536.512 3.455-.512 4.863-.512.64-.384 1.536.128 2.048.64.512 1.536.384 2.048-.256 1.92-2.432 2.303-5.503 1.023-8.063Z" />
            </svg>} />
    </div>;
};

export const ScopesList = ({scopes = [], description = "This API requires one of the following scopes:"}) => {
  if (!scopes || scopes.length === 0) {
    return null;
  }
  const sortedScopes = scopes.sort((a, b) => a.localeCompare(b));
  return <div>
      <div className="text-sm mb-2">{description}</div>
      <div>
        {sortedScopes.map((scope, index) => <div key={index}>
            <code>
              <span className="text-xs">{scope}</span>
            </code>
          </div>)}
      </div>
    </div>;
};

<PostmanCard collectionId="26126890-fa03fc34-c80a-40be-9049-c38244c7f524" />

<Accordion title="Scope requirements">
  <ScopesList
    scopes={[
  'automation'
]}
  />
</Accordion>

When using the [workflows v4 API](/api-reference/legacy/automation/workflows/guide), you'll need to set up actions and enrollment triggers for your workflows. The sections below provide an overview of the different action types and enrollment criteria when using the v4 endpoints.

<Warning>
  **Please note:**

  This API is currently in beta and is subject to change based on testing and feedback. By using these endpoints you agree to adhere to HubSpot's [Developer Terms](https://legal.hubspot.com/hs-developer-terms) & [Developer Beta Terms](https://legal.hubspot.com/hubspot-beta-terms). You also acknowledge and understand the risk associated with testing an unstable API.
</Warning>

## Action types

Each workflow specification consists of a list of actions. Each action contains a set of required properties:

* `actionId`: a unique ID that identifies this action, provided as a string.
* `actionTypeId`: a predefined value that specifies the action type (e.g., `"0-1"` designates a `DELAY` action). A list of actions and their associated `actionTypeId` is provided in the section below.
* `actionTypeVersion`: a number that designates the version of the action. For all built-in action types (e.g., a delay, email notification, etc.), the `actionTypeVersion` will be `0`.
* `connection`: for non-branching actions, this property is an object that specifies the subsequent action, and contains two nested properties:
  * `edgeType`: to proceed directly to the next action, this property should be set to `"STANDARD"`. If you have a branch in your workflow, you can go to an action in a different branch by setting the `edgeType` to `"GO-TO"`.
  * `nextActionId`: the ID of the subsequent action in the workflow.
* `type`: for non-branching actions, this should be set to `SINGLE_CONNECTION`.
* `fields`: an object that specifies the data required by the action (e.g., how long to delay an enrolled object for a `DELAY` action). The structure of this property depends on the action type. Consult the sections and example actions below for the fields each action type expects.

### Action type IDs

The table below details the available action types along with the associated `actionTypeId`.

* Branches and *Go to* actions do not have an associated `actionTypeId`.
* For integration actions, you can add the action to your workflow, then make a `GET` request to `/automation/v4/flows/{flowId}` to retrieve the `actionTypeId`.

<Info>
  Note that some actions have the same type ID, such as *Delay until a calendar date* and *Delay until a date property*. These actions are split into their own table rows to match how they appear in the workflow action sidebar.
</Info>

| Action                                         | Action type ID | Description                                                                                                                                  |
| ---------------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Delay until a calendar date                    | `0-35`         | Delay enrolled records until a specific date. Use this delay when you want an action to execute only on a specific date.                     |
| Delay until a date property                    | `0-35`         | Delay enrolled records until a specific date or datetime property. Use this when you want an action to execute based on a specific property. |
| Delay until an event occurs                    | `0-29`         | Delay enrolled records until a specified event occurs, such as a page visit or form submission.                                              |
| Delay for a set amount of time                 | `0-1`          | Delay enrolled records for a specific amount of days, hours, or minutes before moving to the next action.                                    |
| Delay until a day of week                      | `0-1`          | Delay enrolled records until a specific day of the week.                                                                                     |
| Delay until a specific time of day             | `0-1`          | Delay enrolled records until a specific time of day.                                                                                         |
| Go to workflow                                 | `0-15`         | Enroll record in another workflow of the same type while remaining in the original.                                                          |
| Enroll in a sequence                           | `0-46510720`   | Automatically enroll contacts in a sequence.                                                                                                 |
| Send Email                                     | `0-4`          | Send automated marketing emails to contacts enrolled in the workflow.                                                                        |
| Send in-app notification                       | `0-9`          | Send a notification to specified users or teams, appearing in the HubSpot notification center/app.                                           |
| Send an internal email notification            | `0-8`          | Send an internal email to selected users or teams, configurable with tokens and rich formatting.                                             |
| Send internal marketing emails                 | `0-23`         | Send automated emails internally to other HubSpot users in your account.                                                                     |
| Send survey                                    | `0-199186210`  | Automatically send a custom survey to enrolled contacts. (BETA)                                                                              |
| Send WhatsApp message                          | `0-25085031`   | Send WhatsApp messages to opted-in contacts with a valid WhatsApp number.                                                                    |
| Send SMS message                               | `0-40900952`   | Send SMS to enrolled or associated contacts.                                                                                                 |
| Unenroll from sequence                         | `0-4702372`    | Automatically unenroll contacts from their current sequence.                                                                                 |
| Assign conversation owner                      | `0-44475148`   | Change the inbox and ownership assignment for a conversation.                                                                                |
| Validate and format phone number               | `0-225935194`  | Format phone numbers for calling compatibility.                                                                                              |
| Enrich Record                                  | `0-177946906`  | Enrich contacts or companies with additional data.                                                                                           |
| Edit records                                   | `0-5`          | Set, edit, copy, or clear property values for enrolled or associated records.                                                                |
| Create record                                  | `0-14`         | Automatically create CRM records, including contacts, companies, deals, tickets, leads, and custom objects.                                  |
| Create task                                    | `0-3`          | Automatically create a new HubSpot task for a record.                                                                                        |
| Create note                                    | `0-169425243`  | Automatically create and associate a note with the enrolled record.                                                                          |
| Delete contact                                 | `0-18224765`   | Automatically delete enrolled contacts.                                                                                                      |
| Increase or decrease property value            | `0-5`          | Change a numeric value in a number property by a specified amount.                                                                           |
| Manage communication subscriptions             | `0-43347357`   | Update the subscription status, legal basis, and communication consent for a contact.                                                        |
| Rotate record to owner                         | `0-11`         | Evenly distribute enrolled records (e.g. leads, tickets) to selected users or teams.                                                         |
| Create associations                            | `0-63189541`   | Create new CRM record associations.                                                                                                          |
| Apply association labels                       | `0-73444249`   | Add a label to already-associated CRM records.                                                                                               |
| Update association labels                      | `0-61139484`   | Replace existing or append new labels to associations.                                                                                       |
| Remove association labels                      | `0-61139476`   | Clear all current association labels.                                                                                                        |
| Stop tracking intent signals                   | `0-219161394`  | Deactivate ongoing intent signals tracking and enrichment.                                                                                   |
| Track intent signals                           | `0-219160146`  | Activate intent signal tracking & enrichment.                                                                                                |
| Data Agent: Custom prompt (BETA)               | `0-172351286`  | Analyze, summarize, or categorize data via custom AI prompts.                                                                                |
| Data Agent: Research (BETA)                    | `0-216647524`  | Generate and extract research data using associated record properties or transcripts.                                                        |
| Data Agent: Fill Smart Property (BETA)         | `0-201091202`  | Run AI smart-properties and populate the corresponding data.                                                                                 |
| Summarize record (BETA)                        | `0-195318603`  | Summarize data from records and associations, use the output in emails or further actions.                                                   |
| Infer company value proposition and ICP (BETA) | `0-207702619`  | Generate selling profiles, including target persona, value prop, and more.                                                                   |
| Enroll in prospecting agent (BETA)             | `0-219292676`  | Automatically enroll contacts in HubSpot’s AI prospecting agent.                                                                             |
| Unenroll in prospecting agent (BETA)           | `0-217709844`  | Remove contacts from the prospecting agent.                                                                                                  |
| Use a custom LLM (BETA)                        | `0-218870680`  | Connect custom Large Language Models (LLMs) to drive AI-powered workflow actions.                                                            |
| Add to ads audience                            | `0-30`         | Add contacts to a new or existing ads audience (created via workflows).                                                                      |
| Add to static list                             | `0-63809083`   | Add records (contacts, companies, deals) to static lists.                                                                                    |
| Remove from ads audience                       | `0-30`         | Remove records from an ads audience.                                                                                                         |
| Remove from static list                        | `0-63863438`   | Remove records from a static list.                                                                                                           |
| Set marketing contact status                   | `0-31`         | Mark contact as marketing or non-marketing. Changes to non-marketing contacts will only occur on the renewal date.                           |
| Send Slack notification                        | `1-179507819`  | Send a Slack message via integrated Slack workspace.                                                                                         |
| Create an Asana task                           | `1-100451`     | Create an Asana task from HubSpot workflow logic.                                                                                            |
| Create a Trello Card                           | `1-2825058`    | Create a Trello card from HubSpot workflow logic.                                                                                            |
| Create Salesforce task                         | `0-19`         | Creates a Salesforce task tied to the enrolled contact for Salesforce users.                                                                 |
| Set Salesforce campaign                        | `0-18`         | Associate contacts with a Salesforce campaign (contact-based workflows only).                                                                |

## Action fields

The `fields` property of your action depends on the corresponding action type.

* The actions available depend on your account's subscriptions. Learn more about the [available actions in workflows](https://knowledge.hubspot.com/workflows/choose-your-workflow-actions).
* To confirm the fields required for a specific action, you can [create the workflow](https://knowledge.hubspot.com/workflows/create-workflows) with that action using the workflows tool, then make a `GET` request to `/automation/v4/flows/{flowId}` for that workflow.

The sections below outline the required fields for common actions in a workflow.

<Note>
  In the example code blocks below, note that the `nextActionId` field values are demonstrative, and should contain the ID of the next action in your particular workflow.
</Note>

### Delay until a specific date or date-based property

The code below specifies a *Delay until a calendar date* action, but can also be used with a *Delay until a date property* action.

Based on whether you're delaying until a preconfigured date or a date-based property of the enrolled record, you'll need to specify the sub-properties of the `date` field accordingly:

* If you're delaying until a specific calendar date, provide `STATIC_VALUE` for the `type` sub-property, then provide the calendar date for the `staticValue` sub-property as a unix timestamp.
* To delay until a date-based property of the enrolled record, provide `OBJECT_PROPERTY` for the `type` sub-property, then specify the property to use as the `propertyName`.

```json theme={null}
{
  "type": "SINGLE_CONNECTION",
  "actionId": "5",
  "actionTypeVersion": 0,
  "actionTypeId": "0-35",
  "connection": {
    "edgeType": "STANDARD",
    "nextActionId": "7"
  },
  "fields": {
    "date": {
      "type": "STATIC_VALUE",
      "staticValue": "1719446400000"
    },
    "delta": "0",
    "time_unit": "DAYS",
    "time_of_day": {
      "hour": 12,
      "minute": 0
    }
  }
}
```

### Delay a set amount of time

The code below specifies a *Delay for a set amount of time* action.

```json theme={null}
{
  "type": "SINGLE_CONNECTION",
  "actionId": "5",
  "actionTypeVersion": 0,
  "actionTypeId": "0-35",
  "connection": {
    "edgeType": "STANDARD",
    "nextActionId": "7"
  },
  "fields": {
    "delta": "720",
    "time_unit": "MINUTES"
  }
}
```

### Send an automated marketing email to an enrolled contact

The action definition below sends an automated marketing email with an ID of `12345678` to an enrolled contact.

```json theme={null}
{
  "type": "SINGLE_CONNECTION",
  "actionId": "4",
  "actionTypeVersion": 0,
  "actionTypeId": "0-4",
  "connection": {
    "edgeType": "STANDARD",
    "nextActionId": "10"
  },
  "fields": {
    "content_id": "12345678"
  }
}
```

### Set property

The action definition below sets the `hs_lead_status` property to `"IN_PROGRESS"`.

```json theme={null}
{
  "type": "SINGLE_CONNECTION",
  "actionId": "2",
  "actionTypeVersion": 0,
  "actionTypeId": "0-5",
  "connection": {
    "edgeType": "STANDARD",
    "nextActionId": "4"
  },
  "fields": {
    "property_name": "hs_lead_status",
    "association": {
      "associationCategory": "HUBSPOT_DEFINED",
      "associationTypeId": 1
    },
    "value": {
      "staticValue": "IN_PROGRESS"
    }
  }
}
```

### Create task

The action definition below creates an unassigned task:

```json theme={null}
{
  "type": "SINGLE_CONNECTION",
  "actionId": "1",
  "actionTypeVersion": 0,
  "actionTypeId": "0-3",
  "fields": {
    "task_type": "TODO",
    "subject": "Check in with lead",
    "body": "<p>Remember to sync up with new lead!</p>",
    "associations": [
      {
        "target": {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 10
        },
        "value": {
          "type": "ENROLLED_OBJECT"
        }
      }
    ],
    "use_explicit_associations": "true",
    "priority": "NONE"
  }
}
```

### Create a new record

The action definition below creates a new deal and associates it with the contact enrolled in the workflow:

```json theme={null}
{
  "type": "SINGLE_CONNECTION",
  "actionId": "2",
  "actionTypeVersion": 0,
  "actionTypeId": "0-14",
  "connection": {
    "edgeType": "STANDARD",
    "nextActionId": "3"
  },
  "fields": {
    "object_type_id": "0-3",
    "properties": [
      {
        "targetProperty": "dealstage",
        "value": {
          "type": "STATIC_VALUE",
          "staticValue": "appointmentscheduled"
        }
      },
      {
        "targetProperty": "dealname",
        "value": {
          "type": "STATIC_VALUE",
          "staticValue": "New deal"
        }
      },
      {
        "targetProperty": "amount",
        "value": {
          "type": "STATIC_VALUE",
          "staticValue": "1000"
        }
      }
    ],
    "associations": [
      {
        "target": {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 3
        },
        "value": {
          "type": "ENROLLED_OBJECT"
        }
      }
    ],
    "use_explicit_associations": "true"
  }
}
```

### Add an enrolled object to a static list

The action definition below adds an enrolled contact to a static list, specified as the `listId`.

```json theme={null}
{
  "actionId": "3",
  "actionTypeVersion": 0,
  "actionTypeId": "0-63809083",
  "fields": {
    "listId": "123"
  },
  "type": "SINGLE_CONNECTION"
}
```

### Remove an enrolled object from a static list

The action definition below removes an enrolled contact from a static list, specified as the `listId`.

```json theme={null}
{
  "actionId": "3",
  "actionTypeVersion": 0,
  "actionTypeId": "0-63863438",
  "fields": {
    "listId": "123"
  },
  "type": "SINGLE_CONNECTION"
}
```

### Branching actions

Branching actions differ from other actions in that they don't follow the standard action structure. Branching action definitions don't have `fields` or `connection` properties. There are two types of branching actions: list branch actions and static branch actions. Both types must also define a default branch using the `defaultBranchName` and `defaultBranch` properties.

#### List branch actions

List branch actions include a `listBranches` property that specifies a set of filter branches to segment enrolled objects. Each `filterBranch` is configured using the syntax and formatting outlined in the [list filters documentation](/api-reference/legacy/crm/lists/list-filters).

```json theme={null}
{
  "actionId": "6",
  "listBranches": [
    {
      "filterBranch": {},
      "connection": {
        "edgeType": "STANDARD",
        "nextActionId": "7"
      }
    },
    {
      "filterBranch": {},
      "branchName": "Some branch name",
      "connection": {
        "edgeType": "GOTO",
        "nextActionId": "4"
      }
    }
  ],
  "defaultBranchName": "Fall-through branch",
  "defaultBranch": {
    "edgeType": "STANDARD",
    "nextActionId": "8"
  }
}
```

#### Static branch actions

Static branch actions include an `inputValue` definition, which supports different shapes for the input values of the branch. It also includes a list of `staticBranches`, which defines which actions come next in the branch.

```json theme={null}
{
  "actionId": "1",
  "inputValue": {
    "propertyName": "example_property"
  },
  "staticBranches": [
    {
      "branchValue": "example_value_1",
      "connection": {
        "edgeType": "STANDARD",
        "nextActionId": "2"
      }
    },
    {
      "branchValue": "example_value_1",
      "connection": {
        "edgeType": "STANDARD",
        "nextActionId": "3"
      }
    }
  ],
  "defaultBranchName": "Fall-through branch",
  "defaultBranch": {
    "edgeType": "STANDARD",
    "nextActionId": "4"
  }
}
```

## Enrollment criteria

You can configure the conditions for objects to be enrolled in your workflow within the `enrollmentCriteria` property of your workflow specification.

* The data you specify varies based on whether your enrollment is event-based or list-based. You can specify the enrollment type by setting the `type` of `enrollmentCriteria` to either `EVENT_BASED` or `LIST_BASED`.
* You can specify the re-enrollment settings for objects enrolled in your workflow by setting the `shouldReEnroll` field to `true` or `false`.

Learn more about [workflow enrollment triggers](https://knowledge.hubspot.com/workflows/set-your-workflow-enrollment-triggers).

### Event-based enrollment

Event-based workflows will enroll objects when specific events occur, such as when a form is submitted.

* You can configure the criteria for which events will trigger enrollment by defining a list of `eventFilterBranches`. Each `eventFilterBranch` definition specifies a qualifying event (e.g., a form submission) using an `eventTypeId` that corresponds to that event.
* Most events will have the same values for the following fields:
  * `operator`: `"HAS_COMPLETED"`
  * `filterBranchType`: `"UNIFIED_EVENTS"`
  * `filterBranchOperator`: `"AND"`

The table below defines each `eventTypeId` that corresponds to the event you can configure for your workflow.

<Warning>
  The *Segment membership change* event enrollment trigger does not have an associated `eventTypeId`. Instead, it uses `IN_LIST` / `NOT_IN_LIST` operators to determine segment membership.
</Warning>

| Event                                         | ID          | Description                                                                                                                                                                                                                                                  |
| --------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Ad interaction                                | `4-1553675` | Triggers when an ad is interacted with.                                                                                                                                                                                                                      |
| Call ended                                    | `4-1741072` | Triggers when a call has ended. This includes both calls initiated through HubSpot or through third-party integrations, such as Aircall.                                                                                                                     |
| Call started                                  | `4-1733817` | Triggers when a call is initiated. This includes both calls initiated through HubSpot or through third-party integrations, such as Aircall.                                                                                                                  |
| CRM Object created                            | `4-1463224` | Triggers when a new object is created in the CRM. You must use refinement criteria to filter out unwanted objects from enrollment.                                                                                                                           |
| Playbook log                                  | `4-1814177` | Triggers when a playbook is logged on a record in the CRM.                                                                                                                                                                                                   |
| Property value changed                        | `4-655002`  | Triggers when a property value is updated on a record in the CRM. This trigger represents exactly one property changing from one value to another.                                                                                                           |
| Custom event occurs                           | `6-2117363` | Triggers when a custom event occurs with an existing contact record. Custom events triggers will only enroll existing records.                                                                                                                               |
| Clicked link in email                         | `4-666288`  | Triggers when a contact clicks a link in a marketing email. When further defining your email event enrollment triggers, both Raw URL and Original URL criteria will include any query parameters added by the user and tracking parameters added by HubSpot. |
| Email bounced                                 | `4-5470331` | Triggers when a one-to-one or marketing email is sent to a contact and bounces.                                                                                                                                                                              |
| Email delivered                               | `4-665536`  | Triggers when a one-to-one or marketing email is delivered to a contact.                                                                                                                                                                                     |
| Email sent                                    | `4-667638`  | Triggers when a marketing email, or one-to-one email, is sent to a contact. This event will only trigger for one-to-one emails if sent through a hosted inbox.                                                                                               |
| Opened email                                  | `4-666440`  | Triggers when a contact opens a marketing email.                                                                                                                                                                                                             |
| Replied to email                              | `4-665538`  | Triggers when a contact replies to a marketing email.                                                                                                                                                                                                        |
| Updated email subscription status             | `4-666289`  | Triggers when a contact updates their email subscription status.                                                                                                                                                                                             |
| Form interaction                              | `4-1639799` | Triggers when a contact interacts with a form field. This event fires before form submission.                                                                                                                                                                |
| Form submission                               | `4-1639801` | Triggers when a form is submitted.                                                                                                                                                                                                                           |
| Form view                                     | `4-1639797` | Triggers when a contact views a form. Will only trigger for visitors that are associated with existing contact records.                                                                                                                                      |
| Meeting booked                                | `4-1720599` | Triggers when a contact books a meeting through the HubSpot meetings tool or when a meeting activity is associated with the contact.                                                                                                                         |
| Meeting outcome change                        | `4-1724222` | Triggers when a meeting outcome is changed in the account.                                                                                                                                                                                                   |
| Contact finished viewing a document           | `4-1522438` | Triggers when a contact has finished viewing a sales document. This occurs when the user completes the view by clicking out of the document.                                                                                                                 |
| Contact viewed a document                     | `4-1522436` | Triggers when a contact views a sales document. This represents the initial view of a document, regardless of whether the contact finished viewing it.                                                                                                       |
| Document shared with contact                  | `4-1522437` | Triggers when a sales document is shared with a contact.                                                                                                                                                                                                     |
| Contact booked a meeting through a sequence   | `4-675773`  | Triggers when a contact books a meeting through a sequence.                                                                                                                                                                                                  |
| Contact enrolled in a sequence                | `4-675777`  | Triggers when a contact is enrolled in a sequence.                                                                                                                                                                                                           |
| Contact finished sequence                     | `4-675778`  | Triggers when a contact finishes a sequence.                                                                                                                                                                                                                 |
| Contact unenrolled from sequence              | `4-675776`  | Triggers when a contact is unenrolled from a sequence.                                                                                                                                                                                                       |
| Contact unenrolled from sequence via workflow | `4-1497402` | Triggers when a contact is unenrolled from a sequence via a workflow. Other unenrollment sources do not trigger this event.                                                                                                                                  |
| Contact unenrolled from sequence manually     | `4-675775`  | Triggers when a contact is manually unenrolled from a sequence. Other unenrollment sources do not trigger this event.                                                                                                                                        |
| Delivering SMS failed                         | `4-1752910` | Triggers when an SMS message wasn't delivered to a contact.                                                                                                                                                                                                  |
| Link in SMS clicked                           | `4-1722276` | Triggers when a contact clicks a link in an SMS message.                                                                                                                                                                                                     |
| Sending SMS failed                            | `4-1752904` | Triggers when an SMS message wasn't sent to a contact.                                                                                                                                                                                                       |
| SMS delivered                                 | `4-1721168` | Triggers when an SMS message is delivered to a contact.                                                                                                                                                                                                      |
| SMS dropped                                   | `4-1725149` | Triggers when a SMS message is dropped for a contact.                                                                                                                                                                                                        |
| SMS sent                                      | `4-1719453` | Triggers when an SMS message is sent to a contact.                                                                                                                                                                                                           |
| CTA click                                     | `4-1555805` | Triggers when a contact clicks a CTA or Web interactive.                                                                                                                                                                                                     |
| CTA viewed                                    | `4-1555804` | Triggers when a contact views a CTA or Web interactive.                                                                                                                                                                                                      |
| CTA click (legacy)                            | `4-100216`  | Triggers when a contact clicks a CTA (legacy).                                                                                                                                                                                                               |
| CTA view (legacy)                             | `4-100215`  | Triggers when a contact views a CTA (legacy).                                                                                                                                                                                                                |
| Page visited                                  | `4-96000`   | Triggers when a contact views a landing page or website page. Will only trigger for visitors that are associated with existing contact records.                                                                                                              |
| Website or Email Media Play                   | `4-675783`  | Triggers when a contact plays a media file embedded in your content (e.g., on a website page, email, etc.)                                                                                                                                                   |
| Achieved workflow goal                        | `4-1753168` | Triggers when a contact meets a workflow goal.                                                                                                                                                                                                               |
| Enrolled in workflow                          | `4-1466013` | Triggers when an object is enrolled in a workflow.                                                                                                                                                                                                           |
| Unenrolled from workflow                      | `4-1466014` | Triggers when an object is unenrolled from a workflow.                                                                                                                                                                                                       |

The example code below defines the `enrollmentCriteria` to enroll contacts who successfully submitted a form:

```json theme={null}
"enrollmentCriteria": {
  "shouldReEnroll": true,
  "type": "EVENT_BASED",
  "eventFilterBranches": [
    {
      "filterBranches": [],
      "filters": [],
      "eventTypeId": "4-1639801",
      "operator": "HAS_COMPLETED",
      "filterBranchType": "UNIFIED_EVENTS",
      "filterBranchOperator": "AND"
    }
  ],
  "listMembershipFilterBranches": []
}
```

### Filter-based enrollment

Workflows with filter-based enrollment will enroll records when the configured criteria is met.

* The criteria is configured by setting the `listFilterBranch` field of your `enrollmentCriteria`, based on which objects should qualify for enrollment in your workflow. Within a `listFilterBranch`, you can define the specific filter criteria using a list of `filterBranches`.
* Learn more about the [syntax and formatting](/api-reference/legacy/crm/lists/list-filters) for defining a `listFilterBranch`.

For example, the `enrollmentCriteria` below defines the criteria for when a contact's *City* property is equal to *Dublin*:

```json theme={null}
"enrollmentCriteria": {
  "shouldReEnroll": false,
  "type": "LIST_BASED",
  "listFilterBranch": {
    "filterBranches": [
      {
        "filterBranches": [],
        "filters": [
          {
            "property": "city",
            "operation": {
              "operator": "IS_EQUAL_TO",
              "includeObjectsWithNoValueSet": false,
              "values": [
                "Dublin"
              ],
              "operationType": "MULTISTRING"
            },
            "filterType": "PROPERTY"
          }
        ],
        "filterBranchType": "AND",
        "filterBranchOperator": "AND"
      }
    ],
    "filters": [],
    "filterBranchType": "OR",
    "filterBranchOperator": "OR"
  },
  "unEnrollObjectsNotMeetingCriteria": false,
  "reEnrollmentTriggersFilterBranches": []
}
```
