marketing Automation custom action Sitecore How-To Alexei

Sitecore 9: Custom Marketing Automation Action - Introduction

With Sitecore 9, xConnect and Marketing Automation release we are witnessing a new era creating automated campaigns with Sitecore.

Building automation plans is now easy and user friendly. Marketers need little knowledge of Sitecore to make use of Automation campaigns. They can use Marketing automation campaigns to establish relationships with contacts by adopting various communication actions across various channels. The number of conditions that can be used to evaluate contacts has drastically increased. I am sure we will see more built in conditions and actions once EXM, CRM Connectors and Sitecore Commerce products are released for Sitecore 9.

The following image illustrates sample automation plan where contact gender is evaluated and contact behavior profile is changed.

marketing Automation

Before creating new automation campaigns, Marketers need to ensure all required conditions and actions are in place. Nevertheless, every project is unique, and developers are there to help marketers enable custom engagement criterias and automation scenarios. Thanks to opened, developer friendly Sitecore architecture, developers can create and deploy new conditions and actions with reasonable efforts.

Sitecore 9 has excellent documentation that covers Marketing Automation Engine. I strongly recommend you start with a quick overview to learn about new data flow and APIs. While creating custom conditions is something very similar to Sitecore 8 approach, creating custom action (or to be precise activity type) is something covered in a number of documentation pages. Its great to see such a detailed documentation, but!

Sit tight! As a traditional backend developer, you will need to understand and use a number of relatively new technologies and tools like AngularJS, Webpack and Typescript.

These technologies are not new to Frontend developers, but normally are not in scope of work for Sitecore developers. Essentially you will create action type logic in c# and action type UI and UI logic in AngularJS.

This series of posts is intended to release some stress from traditional backend developers creating custom action types.

Thanks to support from Alistair Deneys @adeneys I can share a starter-kit kind of project with all backend and frontend assets combined and integrated.

In order to create custom action type we will need to do the following steps:

Basics first...

Let’s start with basics. The following image illustrates sample Marketing Automation plan and its major elements.

marketing Automation

Contacts will be enrolled in the above automation plan once entry condition is met which is a “Register” goal triggered. Next contact is immediately assigned 10 points of engagement value by “Increase engagement value” marketing action. On the image above, Goal triggered action is selected, which is a Listener type of action. Listener action type evaluates all external triggers that take place for the contact within specified 10 days delay to check if particular event or condition is met (Product purchase goal in my example). If there was no product purchased within 10 days it will move the contact to a conditional decision point which was in my example “where the contact's profile is marked as ‘Do not market’”. Assuming decision point is evaluated to false, another custom action to Send promo email is fired. If, however, contact purchased a product within 10 days, it will be enrolled in a different automation plan (for example to cross sell complementary products) which is done by “Move to another campaign” action.

Action types are classified in a number of categories based on its behaviour and purpose. Once an action is selected a corresponding action type editor is shown on the right hand side, providing marketer with UI to modify action parameters.

It is also essential to understand when and how contact’s plan and activity enrollment can be triggered, follow the link to learn the options.

Browse to part 2 to learn how to create Activity Type backend logic and definition item.