Troubleshooting Sitecore Marketing Automation Plan Enrollment

Mark Gibbons
3 min readNov 10, 2019

--

Plan enrollment in the Marketing Automation engine is not as intuitive as you may expect.

I’ve created dozens of Marketing Automation plans in the past which are in production use. It seems pretty straightforward on the surface — when you create a new plan, you need to specify conditions that will be evaluated to enroll contacts.

Plan Entry Activity

How does the automation engine evaluate this rule set?

I had made an assumption that once you activate a plan, this entry rule set will be evaluated every 20 seconds or so (as specified in the default worker config). Which is somewhat true — however it will only be evaluated against contacts in the [xdb_ma_pool].[AutomationPool] table of the Marketing Automation database.

How do contacts get in the AutomationPool table?

To simplify — they can only get there by one of two ways. The XdbContactEventWatcher which runs on the xConnect Collection instance, or you can manually call the Marketing Automation Operations API and enroll them by hand.

XdbContactEventWatcher — aka the xConnect Contact Event Plugin

This is where the magic happens. Whenever an operation is submitted to xConnect, this event plugin will kick in and save almost everything about it to the AutomationPool table. Some examples:

  • An anonymous visitor session expires. The session end processor submits the contact and all interactions to xConnect. The plugin creates entries in the AutomationPool table for this to be processed.
  • You call IdentifyAs() on a contact. The Tracker submits this Identifier to xConnect. The plugin creates an entry in the AutomationPool table for this to be processed.
  • You have a Goal set up as a Live Event. The Tracker submits this interaction immediately to xConnect. The plugin creates an entry in the AutomationPool table for this to be processed.
  • You have a background processor (such as Data Exchange Framework) which updates one or more Facets on a contact. The plugin creates an entry in the AutomationPool table for this to be processed.

I think you get it. Basically just about everything will be sent to the AutomationPool whether you have any plans or not, whether you have any conditions that would ever meet them or not.

So what does this mean for me?

If you’ve created a plan and are sitting there wondering why contacts are not getting enrolled in it, then here’s some steps to try and pinpoint the issue:

  • Check logs for any errors on the Marketing Automation Service, xConnect Collection, xConnect Search, and of course your Content Delivery server(s). Look for errors regarding session submissions, contact processing, connection issues to databases or the above services. A great resource for verifying your environment is here.
  • If all the above seems to be running smoothly then it’s likely that your expected contacts are not getting submitted to xConnect from the time after you have activated the automation plan.

How can I trigger contacts to be processed by the Automation Engine?

Basically — they need to be submitted to xConnect somehow. A few options here:

  • You could “touch” them somehow — for example if you’re syncing via Data Exchange Framework then it will create / update your contacts which will submit them to xConnect whether they are changed or not. Or you could create your own admin page / background process that will do something similar. Note that the contact will require at least one Facet or Interaction event to be associated with it for it to be added to the AutomationPool.
  • In Sitecore 9.1+ you can enroll contacts directly from a Contact List.
  • Write some code to enroll contacts via the Marketing Automation Operations API

Further Reading

--

--

Mark Gibbons
Mark Gibbons

Written by Mark Gibbons

Technical Architect @ Aceik | Sitecore Technology MVP 2020 - 2024 with a love for all things #Sitecore / Twitter twitter.com/markgibbons25

No responses yet