Search
  • Naveen VM

SFMC Automation Health Check

Updated: Apr 29

Need for Automation Heath Check:


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

It will be very hard to keep track on which automation runs and which automation didn't run or it got failed.


Why Do I need to Monitor?


Let's say that one of the automation got error-ed out due to some new error or someone who has worked on it but they didn't activate it unknowingly or a file drop automation didn't run then you will either be with no data or wrong data.


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


There are lot of blogs exists 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 needed. 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 needed 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.

What the above code does?


  • It is looking up all the rows exists 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


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 needs to monitor.





Please feel free to leave a comment in case of any queries.



#SFMC #SSJS #MarketingAutomation

0 views