SlideShare uma empresa Scribd logo
1 de 43
Presented by:
Andy Parry
Date:
November 6, 2019
Automate
everything!
Extending your Marketing Automation
toolkit with custom actions
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
#SitecoreSYM
01
02
03
04
05
06
07
08
Introduction
Activity types
Custom activity types and Sitecore
Building the front end code
Building the back end code
Deploying to Sitecore
Extending with custom predicates and services
Debugging and troubleshooting
Today’s agenda
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM
Introduction
Andy Parry
Sitecore lead at Insight in Perth, Australia
Co-organizer of SUG Perth
@handee_andee
LinkedIn https://www.linkedin.com/in/andy-parry/
Git https://github.com/parrya/ma-demo
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
So what are we covering today?
A technical
walkthrough of how to…
• Build a custom Activity Type to send SMS
- Front-end code
- Back-end code
• Add it to Sitecore
• Deploy it to Marketing Automation
• Try it out!
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Introduced in Sitecore 9
• Replaced “Engagement Plans” in Sitecore 8
• Rebuilt from the ground up for v9
• Angular UI
• Super cool
Some background on Marketing Automation
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM
The Marketing Automation engine
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Activity Types
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
“Activity Types” in Sitecore are the building
blocks of Marketing Automation plans.
They act on, or take actions based on, the
xDB contact enrolled in the plan.
Activity Types
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Activity Types
These are all Activity Types:
• Marketing actions
• Listeners
• Decision point
• Campaign entry
• Other
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Some more terminology
Currently 4 Activity Type
classifications:
• Marketing action
• Listeners
• Decision points
• Other elements
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Some more terminology
Activity Type Editor
Parameters
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Some more terminology
Activity Type Result
Paths
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Some more terminology
Sitecore items
• Activity Descriptors
• Paths
• Parameters
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Custom
Activity Types
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
1. Editor (Marketing Automation UI)
2. Sitecore items
3. .NET code (runs on the engine)
An Activity Type has three parts:
Elements of a custom Activity Type
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Custom Activity Type editor
ActivityActivity Editor
Angular components:
• Activity
- Read-only
- Describes the step
• Activity Editor
- Editable component
- Edit the step properties
• Deployed together as a “plugin”
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Sitecore Activity Type descriptor
Sitecore components
• Stored in: /sitecore/system/Settings/
Analytics/Marketing Automation/Activity Types/
Activity Type
• Properties
• Parameters
• Paths
• Implementation type
• Classification
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Custom activity type – .NET code
.NET components
Activity class
• Extends IActivity
• Accepts parameters
• Does the work!
• Returns ActivityResult
• Moves to next “path”
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Building
the front end
with Angular and webpack
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
TypeScript source code
• Activity
• Editor component
• Module (wraps the module)
• Plugin (exports deployable plugin artifact)
Elements of the front-end code
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Activity
• Describes the appearance of
the step in the plan
Elements of the front end code
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Editor
• Describes the UI of the editor
panel
• Handles the passing of
parameters
Elements of the front end code
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Module
• Wraps the code up into a
portable module
• This becomes a plugin
Elements of the front end code
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Package.json
• Dependencies on Sitecore
MA modules @ma-core
• Angular package versions
• Differences between
Sitecore 9.0, 9.1, 9.2
Elements of the front-end code
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Other project files
• tsconfig-aot.json
• tsconfig.json
• webpack.config.js
Elements of the front-end code
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Build the front end code
• npm install
• npm run dev
• Output artifacts are in /dist
• Plugin file to be deployed to Sitecore
If you build it….
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Building
the back end
with .NET and Sitecore
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Custom Activity Type – Back-end
Custom Activity Class
• Interface implementation
• Service dependency injection
• IActivityServices
(Sitecore built-in services)
• Parameters
• Invoke() method
• Activity Result
• NuGet packages
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Custom Activity Type – Back-end
SmsService – using Twilio
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Custom Activity Type – Back-end
Service injection in engine XML configs
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Custom Activity Type – Sitecore items
The Activity Type
Descriptor in
Sitecore:
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Deployment
Pushing the code & configs
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Deployment – What needs to go where?
We need to deploy to:
• Marketing Automation Engine
• Custom activity DLL
• XML configs
• App settings (if needed)
• Sitecore
• Activity Type descriptor (content item)
• CM Server
• Custom activity DLL
• Plugin JavaScript code
• Plugin descriptor config
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Sitecore MA service
• Activity Type DLL
• XML configs
- Service dependency injection
- Activity Type definition
• AppSettings.config
Deployment (continued)
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Sitecore CM server
• Activity editor UI plugin (JavaScript code)
/sitecore/shell/client/Applications/MarketingAutomation/plugins/
• Config file for plugin loading
/App-Config/Include/Project/MA.Demo.AutomationExtensions.plugins.config
• Activity Type DLL
/bin
• Content (Activity Type descriptor, including Implementation Type*)
/sitecore/system/Settings/Analytics/Marketing Automation/Activity Types/Send SMS Message
*Don’t forget to set the parameters, path, editor, object type
Deployment – What needs to go where?
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Extending
further
#SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Extending automation further
Where to from here?
• Create and use a custom predicate in a conditional
• Using the Framework Rules Engine (ICondition)
• Inspect custom facets and custom interactions in your predicate
• Enroll contacts in a plan with custom events
• Explore the Marketing Automation API
• Use Paths and Activity Results
• Use the Sitecore built in Services via IActivityService
• xConnect Client API
• Taxonomy Managers, Definition Managers, Reference Data Service Client API
• Activity enrollment service, Condition evaluation service
• Integrate the Editor UI with Sitecore content items (lookups)
• Integrate with line-of-business apps (e.g., Azure Service Bus, other APIs)
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM
Troubleshooting
Debugging and saving your sanity
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM
Debugging and troubleshooting tips
• You don’t have access to the Sitecore context!
• No access to retrieve items
• Use the API’s provided for this
• Ensure your activity ID is the same across
• Your config patch
• Sitecore Activity Descriptor item
• Angular package (also lower case)
• If using custom facets, you have to include a config so that the Engine
knows about them (contact loader)
• MA engine won't recycle on XML changes. Need to restart manually
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM
Debugging and troubleshooting tips
• Logging
• Ilogger
• Files are separate to the Sitecore logs
• In XP Single topology ([EngineRoot]App_DataLogs)
• In Azure PaaS scaled (webjobs)
• Debugging your code
• Attach to the MA engine for local debugging
• Azure PaaS: Use the Webjobs dashboard
© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM
Some key points
• The Engine is separate from Sitecore Experience Manager
• No Sitecore kernel or Master Database access
• Uses the “new” Rules Engine
• Use correct Angular package versions (see github)
• Easy to extend and integrate
Key takeaways
#SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.
Resources
• Github sample code:
https://github.com/parrya/ma-demo
Blogs and videos
• https://doc.sitecore.com/developers/92/sitecore
-experience-platform/en/activity-types.html
• https://www.brimit.com/blog/sitecore-9-custom-
marketing-automation-action
• https://www.linkedin.com/pulse/how-sitecore-9-
marketing-automation-works-deep-dive-
emmerzaal/
• https://www.youtube.com/watch?v=0HxUph2YL
Zc&list=PL1jJVFm_lGnyicywCcwcWa8RtsoiJEbC9
&index=5
Also, shout out to Alexei Vershalovich for his
excellent blog posts.
Thanks and questions!
Finally {}
Thank you
FOR DISCUSSION PURPOSES ONLY.
Sitecore Confidential and Proprietary. ©2019 Sitecore Corporation
A/S. Sitecore® and Own the Experience® are registered trademarks
of Sitecore Corporation A/S. All other brand names are the property
of their respective owners.

Mais conteúdo relacionado

Semelhante a Automate Everything!

Semelhante a Automate Everything! (20)

Sitecore: Session recommendation engine
Sitecore: Session recommendation engineSitecore: Session recommendation engine
Sitecore: Session recommendation engine
 
world's fastest delivery pipeline for Sitecore on Azure
world's fastest delivery pipeline for Sitecore on Azureworld's fastest delivery pipeline for Sitecore on Azure
world's fastest delivery pipeline for Sitecore on Azure
 
Destination Dollywood! Optimizing the Digital Experience
Destination Dollywood! Optimizing the Digital ExperienceDestination Dollywood! Optimizing the Digital Experience
Destination Dollywood! Optimizing the Digital Experience
 
Introducing the Sitecore Commerce 9 Connector for Microsoft D365
Introducing the Sitecore Commerce 9 Connector for Microsoft D365Introducing the Sitecore Commerce 9 Connector for Microsoft D365
Introducing the Sitecore Commerce 9 Connector for Microsoft D365
 
Sitecore Symposium 2018 - Cooking Up Smart Product Recommendations for Siteco...
Sitecore Symposium 2018 - Cooking Up Smart Product Recommendations for Siteco...Sitecore Symposium 2018 - Cooking Up Smart Product Recommendations for Siteco...
Sitecore Symposium 2018 - Cooking Up Smart Product Recommendations for Siteco...
 
Ten Sitecore 9 Form Features to Increase Conversions
Ten Sitecore 9 Form Features to Increase ConversionsTen Sitecore 9 Form Features to Increase Conversions
Ten Sitecore 9 Form Features to Increase Conversions
 
An Under-the-Hood Tour of Sitecore Experience Accelerator
An Under-the-Hood Tour of Sitecore Experience AcceleratorAn Under-the-Hood Tour of Sitecore Experience Accelerator
An Under-the-Hood Tour of Sitecore Experience Accelerator
 
Sitecore Symposium 2018 - Getting Value Out of Your Data
Sitecore Symposium 2018 - Getting Value Out of Your DataSitecore Symposium 2018 - Getting Value Out of Your Data
Sitecore Symposium 2018 - Getting Value Out of Your Data
 
Finding Value in Your Data: Sitecore Analytics
Finding Value in Your Data: Sitecore AnalyticsFinding Value in Your Data: Sitecore Analytics
Finding Value in Your Data: Sitecore Analytics
 
Romancing the Customer Experience | Sitecore Symposium 2016
Romancing the Customer Experience | Sitecore Symposium 2016Romancing the Customer Experience | Sitecore Symposium 2016
Romancing the Customer Experience | Sitecore Symposium 2016
 
SUGCON India Microsoft Bot Framework + Sitecore
SUGCON India Microsoft Bot Framework + SitecoreSUGCON India Microsoft Bot Framework + Sitecore
SUGCON India Microsoft Bot Framework + Sitecore
 
Accelerate your sitecore website delivery with sitecore sxa - sugcon india 2019
Accelerate your sitecore website delivery with sitecore sxa - sugcon india 2019Accelerate your sitecore website delivery with sitecore sxa - sugcon india 2019
Accelerate your sitecore website delivery with sitecore sxa - sugcon india 2019
 
Context Marketing on a Microsoft Scale
Context Marketing on a Microsoft ScaleContext Marketing on a Microsoft Scale
Context Marketing on a Microsoft Scale
 
Sitecore loves containers
Sitecore loves containersSitecore loves containers
Sitecore loves containers
 
Sitecore User Group - JSS & GraphQL
Sitecore User Group - JSS & GraphQLSitecore User Group - JSS & GraphQL
Sitecore User Group - JSS & GraphQL
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
SUGMEA - Sitecore Experience Platform - what's new in 9.3 preview
SUGMEA - Sitecore Experience Platform - what's new in 9.3 previewSUGMEA - Sitecore Experience Platform - what's new in 9.3 preview
SUGMEA - Sitecore Experience Platform - what's new in 9.3 preview
 
How to architect your E-commerce shop using Helix
How to architect your E-commerce shop using HelixHow to architect your E-commerce shop using Helix
How to architect your E-commerce shop using Helix
 
Make Me Over! Real-time Site Renovations
Make Me Over! Real-time Site RenovationsMake Me Over! Real-time Site Renovations
Make Me Over! Real-time Site Renovations
 
Data Mining with Sitecore xDB
Data Mining with Sitecore xDBData Mining with Sitecore xDB
Data Mining with Sitecore xDB
 

Último

一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
pxcywzqs
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
galaxypingy
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
Asmae Rabhi
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
gajnagarg
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 

Último (20)

Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 

Automate Everything!

  • 1. Presented by: Andy Parry Date: November 6, 2019 Automate everything! Extending your Marketing Automation toolkit with custom actions
  • 2. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM 01 02 03 04 05 06 07 08 Introduction Activity types Custom activity types and Sitecore Building the front end code Building the back end code Deploying to Sitecore Extending with custom predicates and services Debugging and troubleshooting Today’s agenda
  • 3. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM Introduction Andy Parry Sitecore lead at Insight in Perth, Australia Co-organizer of SUG Perth @handee_andee LinkedIn https://www.linkedin.com/in/andy-parry/ Git https://github.com/parrya/ma-demo
  • 4. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. So what are we covering today? A technical walkthrough of how to… • Build a custom Activity Type to send SMS - Front-end code - Back-end code • Add it to Sitecore • Deploy it to Marketing Automation • Try it out!
  • 5. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Introduced in Sitecore 9 • Replaced “Engagement Plans” in Sitecore 8 • Rebuilt from the ground up for v9 • Angular UI • Super cool Some background on Marketing Automation
  • 6. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM The Marketing Automation engine
  • 7. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Activity Types
  • 8. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. “Activity Types” in Sitecore are the building blocks of Marketing Automation plans. They act on, or take actions based on, the xDB contact enrolled in the plan. Activity Types
  • 9. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Activity Types These are all Activity Types: • Marketing actions • Listeners • Decision point • Campaign entry • Other
  • 10. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Some more terminology Currently 4 Activity Type classifications: • Marketing action • Listeners • Decision points • Other elements
  • 11. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Some more terminology Activity Type Editor Parameters
  • 12. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Some more terminology Activity Type Result Paths
  • 13. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Some more terminology Sitecore items • Activity Descriptors • Paths • Parameters
  • 14. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Custom Activity Types
  • 15. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. 1. Editor (Marketing Automation UI) 2. Sitecore items 3. .NET code (runs on the engine) An Activity Type has three parts: Elements of a custom Activity Type
  • 16. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Custom Activity Type editor ActivityActivity Editor Angular components: • Activity - Read-only - Describes the step • Activity Editor - Editable component - Edit the step properties • Deployed together as a “plugin”
  • 17. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Sitecore Activity Type descriptor Sitecore components • Stored in: /sitecore/system/Settings/ Analytics/Marketing Automation/Activity Types/ Activity Type • Properties • Parameters • Paths • Implementation type • Classification
  • 18. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Custom activity type – .NET code .NET components Activity class • Extends IActivity • Accepts parameters • Does the work! • Returns ActivityResult • Moves to next “path”
  • 19. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Building the front end with Angular and webpack
  • 20. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. TypeScript source code • Activity • Editor component • Module (wraps the module) • Plugin (exports deployable plugin artifact) Elements of the front-end code
  • 21. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Activity • Describes the appearance of the step in the plan Elements of the front end code
  • 22. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Editor • Describes the UI of the editor panel • Handles the passing of parameters Elements of the front end code
  • 23. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Module • Wraps the code up into a portable module • This becomes a plugin Elements of the front end code
  • 24. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Package.json • Dependencies on Sitecore MA modules @ma-core • Angular package versions • Differences between Sitecore 9.0, 9.1, 9.2 Elements of the front-end code
  • 25. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Other project files • tsconfig-aot.json • tsconfig.json • webpack.config.js Elements of the front-end code
  • 26. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Build the front end code • npm install • npm run dev • Output artifacts are in /dist • Plugin file to be deployed to Sitecore If you build it….
  • 27. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Building the back end with .NET and Sitecore
  • 28. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Custom Activity Type – Back-end Custom Activity Class • Interface implementation • Service dependency injection • IActivityServices (Sitecore built-in services) • Parameters • Invoke() method • Activity Result • NuGet packages
  • 29. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Custom Activity Type – Back-end SmsService – using Twilio
  • 30. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Custom Activity Type – Back-end Service injection in engine XML configs
  • 31. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Custom Activity Type – Sitecore items The Activity Type Descriptor in Sitecore:
  • 32. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Deployment Pushing the code & configs
  • 33. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Deployment – What needs to go where? We need to deploy to: • Marketing Automation Engine • Custom activity DLL • XML configs • App settings (if needed) • Sitecore • Activity Type descriptor (content item) • CM Server • Custom activity DLL • Plugin JavaScript code • Plugin descriptor config
  • 34. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Sitecore MA service • Activity Type DLL • XML configs - Service dependency injection - Activity Type definition • AppSettings.config Deployment (continued)
  • 35. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Sitecore CM server • Activity editor UI plugin (JavaScript code) /sitecore/shell/client/Applications/MarketingAutomation/plugins/ • Config file for plugin loading /App-Config/Include/Project/MA.Demo.AutomationExtensions.plugins.config • Activity Type DLL /bin • Content (Activity Type descriptor, including Implementation Type*) /sitecore/system/Settings/Analytics/Marketing Automation/Activity Types/Send SMS Message *Don’t forget to set the parameters, path, editor, object type Deployment – What needs to go where?
  • 36. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Extending further
  • 37. #SitecoreSYM © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Extending automation further Where to from here? • Create and use a custom predicate in a conditional • Using the Framework Rules Engine (ICondition) • Inspect custom facets and custom interactions in your predicate • Enroll contacts in a plan with custom events • Explore the Marketing Automation API • Use Paths and Activity Results • Use the Sitecore built in Services via IActivityService • xConnect Client API • Taxonomy Managers, Definition Managers, Reference Data Service Client API • Activity enrollment service, Condition evaluation service • Integrate the Editor UI with Sitecore content items (lookups) • Integrate with line-of-business apps (e.g., Azure Service Bus, other APIs)
  • 38. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.#SitecoreSYM Troubleshooting Debugging and saving your sanity
  • 39. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM Debugging and troubleshooting tips • You don’t have access to the Sitecore context! • No access to retrieve items • Use the API’s provided for this • Ensure your activity ID is the same across • Your config patch • Sitecore Activity Descriptor item • Angular package (also lower case) • If using custom facets, you have to include a config so that the Engine knows about them (contact loader) • MA engine won't recycle on XML changes. Need to restart manually
  • 40. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM Debugging and troubleshooting tips • Logging • Ilogger • Files are separate to the Sitecore logs • In XP Single topology ([EngineRoot]App_DataLogs) • In Azure PaaS scaled (webjobs) • Debugging your code • Attach to the MA engine for local debugging • Azure PaaS: Use the Webjobs dashboard
  • 41. © 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. #SitecoreSYM Some key points • The Engine is separate from Sitecore Experience Manager • No Sitecore kernel or Master Database access • Uses the “new” Rules Engine • Use correct Angular package versions (see github) • Easy to extend and integrate Key takeaways
  • 42. #SitecoreSYM© 2001-2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners. Resources • Github sample code: https://github.com/parrya/ma-demo Blogs and videos • https://doc.sitecore.com/developers/92/sitecore -experience-platform/en/activity-types.html • https://www.brimit.com/blog/sitecore-9-custom- marketing-automation-action • https://www.linkedin.com/pulse/how-sitecore-9- marketing-automation-works-deep-dive- emmerzaal/ • https://www.youtube.com/watch?v=0HxUph2YL Zc&list=PL1jJVFm_lGnyicywCcwcWa8RtsoiJEbC9 &index=5 Also, shout out to Alexei Vershalovich for his excellent blog posts. Thanks and questions! Finally {}
  • 43. Thank you FOR DISCUSSION PURPOSES ONLY. Sitecore Confidential and Proprietary. ©2019 Sitecore Corporation A/S. Sitecore® and Own the Experience® are registered trademarks of Sitecore Corporation A/S. All other brand names are the property of their respective owners.

Notas do Editor

  1. 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 ?
  2. 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.
  3. 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!)
  4. 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
  5. Engine is separate from XM (Experience Manager) and is part of Experience Platform Separate process Can run as: Windows Service Console App Azure WebJob
  6. So, what is an Activity Type ? - it’s an element in a Marketing Automation plan that performs an action based on xDB contact data
  7. Most people think of Marketing Actions when they hear the phrase “custom activity types” but all of these are Activity Types.
  8. 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.
  9. Editor is the entire pane Parameters are passed back and forth from UI to Sitecore/.NET code
  10. Can branch into what are called “Paths” based on decisions made in the Activity TYpe
  11. So now we know what an Activity Type is and the pieces that make up an Automation Plan, how do we create our own ?
  12. Ok so let’s get into the tricky bit – front end dev.
  13. On screen walkthrough of files
  14. On screen walkthrough of files
  15. On screen walkthrough of files
  16. On screen walkthrough of files
  17. 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.
  18. Watch out for read-only folders
  19. 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
  20. Using appSettings (in Engineroot\AppSettings folder
  21. 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!
  22. (Discuss and show the various pieces that need to be deployed and where)
  23. (Discuss and show the various pieces that need to be deployed and where)
  24. (Discuss and show the various pieces that need to be deployed and where)
  25. If time permits, look at a custom predicate in the solution