---
title: "Marketing Automation plan and activity enrollment"
slug: "marketing-automation-plan-and-activity-enrollment"
abstract: "Overview of the methods available to trigger the evaluation of a contact plan and activity enrollments."
---
# Marketing Automation plan and activity enrollment

There are various methods that you can use to trigger the evaluation of a contact’s plan and activity enrollments.

## xConnect event plugin

When an interaction is submitted to xConnect, the `XdbContactEventWatcher` service plugin assesses it .  The plugin adds a work item to the automation processing pool for any successful operation (add or update) concerning contacts, interactions, or facets.

### XdbContactEventWatcher settings

The `XdbContactEventWatcher` is an xConnect plugin. It is configured in the `c:\path\to\xConnect\App_Data\config\sitecore\MarketingAutomation\sc.XConnect.Service.Plugins.MarketingAutomation.xml` file. The default priority to set on new automation work items is 80. 

## Live event detection

You can register a live event request using the Marketing Automation Operations API. The tracker uses this to raise live events as soon as they happen rather than waiting for the session to end.

> [!note]
> Live event detection is specific to Marketing Automation. You cannot subscribe to a feed of live events from another part of the system.

## Manual enrollment

You can use the Marketing Automation Operations API to enroll a contact in a plan or activity The Marketing Automation Operations API replaces the `AutomationStateManager` class.

## Plan seeding

You can use the Marketing Automation Operations API to seed a plan with a contact list or segmented list.

<details>
<summary><h2>Scheduled enrollment</h2></summary>

You can use the [Marketing Operations API](https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-platform/automation-plans.html "Automation plans") to define plan enrollment schedules for particular contact lists or segmented lists. For example, you can choose to enroll all new contacts in a 'Welcome' plan every 24 hours.

</details>

## Timeout

The Automation Engine’s `ActivityTimeoutWorker` gets all activity enrollments that have expired when the enrollment’s `TimeoutDate` is greater than `DateTime.UtcNow`. By default, the worker runs every 30 seconds and adds work items into the pool with a priority value of 70.