top of page

SFMC Automation Health Check

Updated: May 14, 2021

Need for Automation Health Check:


In most of the business world, to implement a use case in the Salesforce Marketing Cloud, we need to create lots and lots of automation.


It will be very hard to keep track of which automation runs and which automation didn't run everyday.


Why Do I Need to Monitor?


Sometimes, when SFMC users try to edit an active automation directly in automation studio they would need to pause the automation. Once user made the changes, they might forget to set it to activate again.


This will have a series impact on business. I have seen people spend some hours monitoring automation as an ad-hoc activity. Now let's eliminate those!


There are a lot of blogs today, which will let you know how to pull all the automation status from Salesforce Marketing Cloud or a hard coded value of customer key appended on SSJS itself.


But the problem is, you would have created lots of automation and some you wouldn't even need. Why do you want to keep track of those?


In this blog, we are going to see how SSJS gets only the automation status which you needed to see in the Org. You can specify which automation you need to see in a data extension then run the SSJS in the org which will upserts the data into data extension with automation status. Post that you can send an email to SFMC Admins with those data extension records.


How cool is that!


Below SSJS will give you an idea of which automation has run which doesn't:

Add the SSJS in cloud page or automation Script (SSJS) activity. (view code snippet)

What does the above code do?


  • It is looking up all the rows in the data extension named 'Automation_Status'.

  • Taking each customer key one by one which is present in the same data extension.

  • Getting the status for each automation using the customer key and upsert in the same data extension


Pre-requisites:


  • Create a data extension with columns as mentioned in the screenshot. In the above case its 'Automation_Status'

  • Add records for which you need to monitor Automation status

  • Specify the automation name and customer key


Data Extension to specify the Automation Name
Data Extension to specify the Automation Name

Outcome:


  • You can check on the same data extension once the cloud page or automation activity completes.

  • You can see that the status and scheduled time would have added for the specified automation in data extension.

  • You can also use this data in data extension to send an email to specified people who need to monitor.

Below is the code to send an email notification (view code snippet) which will pull the results from the same data extension and add it into email.




Automation Studio Results in Email Notification
Automation Studio Results in Email Notification

Hope now you have an idea of how to implement notification on Automation Studio scheduled status :).


Please feel free to leave your feedback/comment in case of any queries.


Happy Learning!


4,383 views6 comments

Recent Posts

See All

6 Comments


Sudha R
Sudha R
Jul 11, 2023

As we have 100 of Automations running, how do we add this to the Data Extension?? Should we manually add the records and then read DE using SSJS and update with status?

Like

Akshata Gupta
Akshata Gupta
Aug 04, 2022

Hi, Is there any way to add a field and retrieve automation last run date ?

Like

Krystina
Krystina
Dec 10, 2021

Fantastic article! Any tips for retrieving the following from the send activity in the Automation of the automations that status were checked? - Template Name

- Audience

- Send Time

Like

Gowlikar Raghuram
Gowlikar Raghuram
Jan 18, 2021

Thanks Tim for your comment. Am really glad that it helped you ! At the same we need for Triggered Sends and Journey Builder. Can you please provide?

Like

Naveen VM
Naveen VM
Mar 03, 2020

Thanks Tim for your comment. Am really glad that it helped you !

Like
bottom of page