EXM — Activate / Deactivate all email campaigns with one click

Mark Gibbons
1 min readMay 15, 2019

--

When working on a project that has a lot of EXM campaigns, a missing Sitecore feature is the ability to activate or deactivate all email campaigns. There are two reasons why I want to be able to do this:

  1. If I sync the email campaigns from one environment to another, the marketing definitions don’t get created and deployed, and statistics are not created in the EXM.Master database.
  2. For ease of editing something across multiple campaigns, it is slow to have to deactivate, then make the change, then reactivate.

Create a new Sitecore admin page

First create a Web Form (aspx) page called ExmMessageActivator in your Visual Studio solution under a sitecore/admin folder.

Then on the code behind add the following:

Note: You will need to tweak the EmailXpath value depending on your Email Message Root and Email Template ID.

Then just compile, deploy, and you can hit the sitecore/admin/ExmMessageActivator.aspx page and you should see as follows:

If you find this useful I could eventually clean it up and add a lot of features such as a select list of active / draft campaigns to selectively activate. Let me know!

--

--

Mark Gibbons
Mark Gibbons

Written by Mark Gibbons

Technical Architect @ Aceik | Sitecore Technology MVP 2020 - 2024 with a love for all things #Sitecore / Twitter twitter.com/markgibbons25

No responses yet