SlideShare a Scribd company logo
Personalizing JSS app with
Sitecore rules and GraphQL
Let’s build a rules engine and do some personalization!
Jack Spektor
- Working with Sitecore since v6.0
- Mostly work with BE, very little experience with FE - don’t
judge harshly!
Sitecore Tech Lead @ AKQA NZ
Do you love Sitecore rules as I do?
So easy to use!
So customizable!
😍😍😍
But not supported with JSS and XM Cloud
Sad…
😒😔😢
Can we still use Sitecore rules though?
- XM Cloud still has rules field
type
- And Sitecore still exposes rules
field content on Experience
Edge
- The only limitation is - it
doesn’t execute them
We’ll build our own FE rules engine!
- We’ll parse rules XML
- We’ll run rules conditions on
client-side
- And execute actions on client-
side
APIs for extensibility
- We’ll map all Sitecore rules &
actions by their IDs to equivalent
in JS
- And we’ll make APIs to easily add
new rules/actions/operators
APIs for extensibility
APIs for extensibility
APIs for extensibility
- And we’ll publish it to npm to
easily use it in NextJS app
How can we use it?
- Personalization
- A/B tests
- Shop promotions
- Business decision trees
- Etc.
Use case: Personalization
- Let’s make layout
personalization using Sitecore
rules
- We’ll introduce new field in
Sitecore for personalization
rules and render flags and we’ll
use it in JSS
Client-side personalization
Standard JSS layout render flow
request
<Placeholde
r/>
<HTML/>
component-props-
factory
page-props-
factory
Render
components
Client-side personalization
Client-side personalization render flow
request
<PersonalizedPlaceh
older/>
<HTML/>
component-props-
factory
page-props-
factory
Render
components
personalization?
Retrieve personalization
rules from Edge and run
them
Modify props
yes
no
Client-side personalization
Client-side personalization
demo
SSR Personalization
SSR personalization render flow
request
page-props-
factory plugin
<HTML/>
page-props-
factory
Render
components
personalization?
Retrieve personalization
rules from Edge and run
them
Modify props
yes
no
SSR Personalization
SSR personalization demo
SSG Personalization
SSG personalization build flow
build
Personalize-sitemap
plugin
<HTML/>
sitemap-fetcher
Return all
paths
personalization?
Retrieve personalization
rules from Edge and
parse them
Calculate all personalized
variations
yes
_scvariant01, _scvariant01, _scvariant10….
SSG Personalization
SSG personalization render flow
SSG
Identify the applied rules
based on the variantId
<HTML/>
Has variantId?
Pre-render default
variation
no
yes
_scvariant01
Pre-render variant with
rule personalization
actions applied
SSG Personalization
SSG personalization request flow
request
Calculate variantId based
on rule execution result
<HTML/>
Has
personalization?
Return the default path
no
yes
_scvariant01
Return the path with
variantId to render
Middleware to run
personalization rules
for request
First Rule
Second Rule
SSG Personalization
SSG personalization demo
Method comparison
Method Pros Cons
Client-Side Fastest response time Flickering on page load
SSR No flickering
No need for using custom
placeholder
Needs to be executed on
every request
SSG Fastest possible server-side
personalization
Max 4 rules per page
possible
Summary
- Only POC so far
- Need to cover all Sitecore rules and conditions
- Contributions welcome!
- More case studies coming (chatbot based on Sitecore
rules)
https://github.com/JackTheHack/Sitecore.JSS-Rule-Engine
Thank you!

More Related Content

Similar to Headless JS UG Presentation.pptx

Ng-init
Ng-init Ng-init
Ng-init
Hamdi Hmidi
 
Building isomorphic java script apps faster with next.js
Building isomorphic java script apps faster with next.jsBuilding isomorphic java script apps faster with next.js
Building isomorphic java script apps faster with next.js
Madhav Chaturvedi
 
SSR with Quasar Framework - JSNation 2019
SSR with Quasar Framework - JSNation 2019SSR with Quasar Framework - JSNation 2019
SSR with Quasar Framework - JSNation 2019
Razvan Stoenescu
 
Professional Services Insights into Improving Sitecore XP
Professional Services Insights into Improving Sitecore XPProfessional Services Insights into Improving Sitecore XP
Professional Services Insights into Improving Sitecore XP
SeanHolmesby1
 
Server side rendering review
Server side rendering reviewServer side rendering review
Server side rendering review
Vladyslav Morzhanov
 
Angular meetup
Angular meetupAngular meetup
Angular meetup
Intilery.com
 
Server-Side Rendering (SSR) with Angular Universal
Server-Side Rendering (SSR) with Angular UniversalServer-Side Rendering (SSR) with Angular Universal
Server-Side Rendering (SSR) with Angular Universal
Katy Slemon
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
CodeValue
 
Remix
RemixRemix
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
The Reference
 
Sitecore mvc
Sitecore mvcSitecore mvc
Sitecore mvc
pratik satikunvar
 
SUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - Altudo
SUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - AltudoSUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - Altudo
SUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - Altudo
dharmeshharji
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
Jenkins NS
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
Squash Apps Pvt Ltd
 
Angular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFxAngular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFx
Dimcho Tsanov
 
#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!
#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!
#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!
Vadzim Papko
 
Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
Tom Z Zeng
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT Pros
Paul Hunt
 
SPA Editor - Adobe Experience Manager Sites
SPA Editor - Adobe Experience Manager SitesSPA Editor - Adobe Experience Manager Sites
SPA Editor - Adobe Experience Manager Sites
Gabriel Walt
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
Paul Hunt
 

Similar to Headless JS UG Presentation.pptx (20)

Ng-init
Ng-init Ng-init
Ng-init
 
Building isomorphic java script apps faster with next.js
Building isomorphic java script apps faster with next.jsBuilding isomorphic java script apps faster with next.js
Building isomorphic java script apps faster with next.js
 
SSR with Quasar Framework - JSNation 2019
SSR with Quasar Framework - JSNation 2019SSR with Quasar Framework - JSNation 2019
SSR with Quasar Framework - JSNation 2019
 
Professional Services Insights into Improving Sitecore XP
Professional Services Insights into Improving Sitecore XPProfessional Services Insights into Improving Sitecore XP
Professional Services Insights into Improving Sitecore XP
 
Server side rendering review
Server side rendering reviewServer side rendering review
Server side rendering review
 
Angular meetup
Angular meetupAngular meetup
Angular meetup
 
Server-Side Rendering (SSR) with Angular Universal
Server-Side Rendering (SSR) with Angular UniversalServer-Side Rendering (SSR) with Angular Universal
Server-Side Rendering (SSR) with Angular Universal
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
 
Remix
RemixRemix
Remix
 
Best of barcelona symposium experience
Best of barcelona symposium experienceBest of barcelona symposium experience
Best of barcelona symposium experience
 
Sitecore mvc
Sitecore mvcSitecore mvc
Sitecore mvc
 
SUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - Altudo
SUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - AltudoSUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - Altudo
SUGMEA - Sitecore JSS and Performance Optimization - Alex Shyba - Altudo
 
Getting started with spfx
Getting started with spfxGetting started with spfx
Getting started with spfx
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
Angular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFxAngular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFx
 
#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!
#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!
#SitecoreJSS and #SitecoreSXA together. Is It Real? First experience!
 
Client Side MVC with Backbone and Rails
Client Side MVC with Backbone and RailsClient Side MVC with Backbone and Rails
Client Side MVC with Backbone and Rails
 
SUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT ProsSUGUK Cambridge - Display Templates & JSLink for IT Pros
SUGUK Cambridge - Display Templates & JSLink for IT Pros
 
SPA Editor - Adobe Experience Manager Sites
SPA Editor - Adobe Experience Manager SitesSPA Editor - Adobe Experience Manager Sites
SPA Editor - Adobe Experience Manager Sites
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
 

Recently uploaded

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 

Recently uploaded (20)

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 

Headless JS UG Presentation.pptx

  • 1. Personalizing JSS app with Sitecore rules and GraphQL Let’s build a rules engine and do some personalization!
  • 2. Jack Spektor - Working with Sitecore since v6.0 - Mostly work with BE, very little experience with FE - don’t judge harshly! Sitecore Tech Lead @ AKQA NZ
  • 3. Do you love Sitecore rules as I do? So easy to use! So customizable! 😍😍😍
  • 4. But not supported with JSS and XM Cloud Sad… 😒😔😢
  • 5. Can we still use Sitecore rules though? - XM Cloud still has rules field type - And Sitecore still exposes rules field content on Experience Edge - The only limitation is - it doesn’t execute them
  • 6. We’ll build our own FE rules engine! - We’ll parse rules XML - We’ll run rules conditions on client-side - And execute actions on client- side
  • 7. APIs for extensibility - We’ll map all Sitecore rules & actions by their IDs to equivalent in JS - And we’ll make APIs to easily add new rules/actions/operators
  • 10. APIs for extensibility - And we’ll publish it to npm to easily use it in NextJS app
  • 11. How can we use it? - Personalization - A/B tests - Shop promotions - Business decision trees - Etc.
  • 12. Use case: Personalization - Let’s make layout personalization using Sitecore rules - We’ll introduce new field in Sitecore for personalization rules and render flags and we’ll use it in JSS
  • 13. Client-side personalization Standard JSS layout render flow request <Placeholde r/> <HTML/> component-props- factory page-props- factory Render components
  • 14. Client-side personalization Client-side personalization render flow request <PersonalizedPlaceh older/> <HTML/> component-props- factory page-props- factory Render components personalization? Retrieve personalization rules from Edge and run them Modify props yes no
  • 16. SSR Personalization SSR personalization render flow request page-props- factory plugin <HTML/> page-props- factory Render components personalization? Retrieve personalization rules from Edge and run them Modify props yes no
  • 18. SSG Personalization SSG personalization build flow build Personalize-sitemap plugin <HTML/> sitemap-fetcher Return all paths personalization? Retrieve personalization rules from Edge and parse them Calculate all personalized variations yes _scvariant01, _scvariant01, _scvariant10….
  • 19. SSG Personalization SSG personalization render flow SSG Identify the applied rules based on the variantId <HTML/> Has variantId? Pre-render default variation no yes _scvariant01 Pre-render variant with rule personalization actions applied
  • 20. SSG Personalization SSG personalization request flow request Calculate variantId based on rule execution result <HTML/> Has personalization? Return the default path no yes _scvariant01 Return the path with variantId to render Middleware to run personalization rules for request First Rule Second Rule
  • 22. Method comparison Method Pros Cons Client-Side Fastest response time Flickering on page load SSR No flickering No need for using custom placeholder Needs to be executed on every request SSG Fastest possible server-side personalization Max 4 rules per page possible
  • 23. Summary - Only POC so far - Need to cover all Sitecore rules and conditions - Contributions welcome! - More case studies coming (chatbot based on Sitecore rules) https://github.com/JackTheHack/Sitecore.JSS-Rule-Engine