Hands up if you have played with the Martketing Automation editor in Sitecore
And hands up if you’ve built an actual MA plan in production ?
I’ve been working with Marketing Automation for much of this year, found it fascinating and kinda fun.
Lots to learn but very satisfying when it all comes together and seeing the end users put the plans into action.
Front end code is Angular. Back end is C#.
Add to Sitecore via the Sitecore Content Management interface
Deploy all the necessary pieces (there are a few!)
But first a quick bit of background on Marketing Automation
Engagement plans were kinda clunky and were part of CM
The new MA UI is MUCH nicer and more intuitive
Engine is separate from XM (Experience Manager) and is part of Experience Platform
Separate process
Can run as:
Windows Service
Console App
Azure WebJob
So, what is an Activity Type ?
- it’s an element in a Marketing Automation plan that performs an action based on xDB contact data
Most people think of Marketing Actions when they hear the phrase “custom activity types” but all of these are Activity Types.
There’s a corresponding Sitecore item in the tree for each of these.
They are themed by colour.
You could create your own custom Activity Type Classification, however there would be some CSS and HTML requirements.
Editor is the entire pane
Parameters are passed back and forth from UI to Sitecore/.NET code
Can branch into what are called “Paths” based on decisions made in the Activity TYpe
So now we know what an Activity Type is and the pieces that make up an Automation Plan, how do we create our own ?
Ok so let’s get into the tricky bit – front end dev.
On screen walkthrough of files
On screen walkthrough of files
On screen walkthrough of files
On screen walkthrough of files
tsconfig.json is the TypeScript compiler config
tsconfig-aot.json is the configuration for our Angular compilation.
AOT is Ahead of Time compilation
There is a “files” section and a “genDir” which tells the AOT compiler what to compile and where to put the object code
Webpack bundles up our modules.
Watch out for read-only folders
Switch to code
Properties MUST be public for parameters to be passed from the editor
Note the return type
Nuget packages Sitecore.Xdb.MarketingAutomation.Core
Facets
Using appSettings (in Engineroot\AppSettings folder
This is a bit fiddly. Best to set up some special deployment pipelines or some scripts to ensure everything is in the right place.
Because if it isn’t, you will find out pretty quickly!
(Discuss and show the various pieces that need to be deployed and where)
(Discuss and show the various pieces that need to be deployed and where)
(Discuss and show the various pieces that need to be deployed and where)
If time permits, look at a custom predicate in the solution