Skip to main content

Sitecore 9 - Marketing Automation: Debugging Custom Marketing Automation Rules

We have seen implementation of a custom segmentation rule and marketing automation rule in previous post. The main focus was on segmentation rule but I also showed marketing automation rule implementation.

Basically, we need to implement ICondition interface and write our logic in Evaluate method. Since, I've already completed configuration and written my rule, we can create a marketing automation plan.


I added my rule and activated my marketing automation plan. Now, I want to test my custom rule. The easiest way to use "Repost view" button inside marketing automation page. Once the rule applies for a contact, then you should see that contact in the list.

Let's say it didn't work. You visited a movie 3 or more times and ended your session. Normally, at that moment, the contact should be added to list in your automation plan. But you didn't see anything.

We need to debug and see our fault in code.

To do this, first I am going to stop marketing automation service. I opened Task Manager and saw that two services are working. One for index and the other one is for marketing automation.



I stopped the marketing automation service. Then, I opened a cmd window, went to AutomationEngine path and run maengine.exe


Now I can find running process and attach for debugging in visual studio.


That's it! Now, we can debug our marketing automation related codes.

Next post:
  • Custom marketing automation activities (with Angular UI) Part-1Part-2

Comments

Post a Comment

Popular posts from this blog

Deploying SolrCloud with Zookeeper on Azure Kubernetes Service (AKS)

SolrCloud on Azure Kubernetes Service (AKS) Running SolrCloud on Kubernetes — particularly Azure Kubernetes Service (AKS) — can provide you with a highly scalable, cost-efficient, and cloud-native architecture.  This guide walks through how I deployed SolrCloud 8.11.2 with Zookeeper on AKS . Why This Matters for Sitecore Deployments If you're running Sitecore XP or XM , you know that Solr is a mandatory dependency — powering xDB indexing, content search. While Sitecore provides a developer-friendly Solr container for local use, it clearly states: ⚠️ The included Solr image is intended only for development and testing . This means Sitecore does not provide a production-ready Solr setup. If you're deploying Sitecore in production — especially in Kubernetes — you need to create your own scalable, HA SolrCloud cluster. That’s why this deployment matters: You’re building a production-grade SolrCloud setup You’re deploying 3 Solr + 3 Zookeeper nodes for high availabilit...

Modern Observability for Sitecore 10.4 on AKS: Grafana, Alloy, Loki, and Prometheus

In this post, I’ll walk through how I extended the base Sitecore XM 10.4 AKS setup with a modern observability stack using Grafana, Alloy, Loki, and Prometheus. This setup provides deep insights into both infrastructure and application health, with powerful log aggregation and visualization. Project Overview Base:  Sitecore XM 10.4 running on Azure Kubernetes Service (AKS) Enhancements:  Added a full Grafana observability stack: Grafana  for dashboards and visualization Alloy  (Grafana Alloy, formerly Promtail) for log collection and multiline parsing Loki  for log aggregation and querying Prometheus  for metrics collection All configuration...

Post setup tips of Sitecore Commerce on Azure

Sitecore official documentation provides how to setup your instance on Azure. After you follow the instructions, you would need a few key steps to complete your setup. Use postman to bootstrap and initialize the Commerce Engine:   Call bootstrap method ( {{OpsApiHost}} / {{OpsApi}} /Bootstrap() ) for your environments. You would need to get token first ( {{SitecoreIdServerHost}} /connect/token ) Creating a new webshop: When you create a new webshop from Sitecore content editor, a new domain is created automatically on your content management server. But you will need to add manually to your CD and Identity servers. Update Domain.config file under app_config > security folder as below.   If you don’t add, you will get domain is missing error while customers sign in. You also need to register your domain to BizFX server.  Then, you will be able to see new domain while adding new customers in Sitecore Commerce panel. Configure produ...