How many automation runs has your Marketing Cloud account used in the last 12 months? If you know the answer, feel free to skip this post. If you don’t, you are in good company – and that is exactly the problem.

A 30-day deadline on a 12-month number

About a year ago, a Marketing Cloud customer shared a story on Reddit that has stuck with me since. During the summer their Digital AE got in touch: the account was at 180% of its automation-run entitlement, measured over a floating 12-month period. A limit that, in their own words, used to be soft and not enforced. They were given 30 days to fix it.

So they did what any sensible admin would do. They went through every recurring automation and brought the monthly run count down from about 6,900 to about 950. That is an 86% reduction in less than a month, which is quite impressive. It didn’t matter. The 12-month figure was still over the limit, and the expected outcome was the purchase of an additional automations SKU for around 6k EUR.

Needless to say, you cannot fix a rolling 12-month number in 30 days. And as the poster pointed out themselves, Salesforce doesn’t make it easy to keep an eye on that number in the first place. There are no early warnings. This is also why I built the small package I am sharing in this post.

Why the number matters

The first thing to get right is what is actually being counted. Your Marketing Cloud Engagement licence comes with a yearly number of Automation Studio executions – runs, not automations. Every time an automation runs, it counts as one, no matter how many steps or activities sit inside it. Journeys don’t count. The default numbers per edition, according to Salesforce’s own entitlement article, look like this:

EditionAutomation runs per year
BasicNot included
Pro15,000
Corporate45,000
Enterprise100,000

On top of that, each Additional Contacts unit you have bought adds 25 runs. Salesforce’s own example is an Enterprise account with 10,000 additional Contacts units ending up at 350,000 runs. And let’s not forget that the number is shared across all your business units – buying more business units does not raise it, as Mateusz Dąbrowski points out in his excellent overview of the MCE licence limits.

45,000 sounds like a lot until you do the maths. One automation running every hour uses 8,760 runs a year. Eric de Taevernier made exactly this point in a Trailblazer Community thread: six hourly automations on a Corporate account add up to 52,560 runs a year, and you are over the limit. One automation every 15 minutes is 35,040 runs on its own. The Reddit poster’s 6,900 runs a month comes to roughly 83,000 a year, which is about 184% of 45,000 – so my guess is they were on Corporate edition.

Nothing stops working when you go over. It is a soft limit, and the consequence is a commercial conversation with your AE about buying more. One of the replies in the Reddit thread says Salesforce started enforcing these limits back in 2023, and from what I hear around me, those conversations are getting more frequent. Being over is not a technical problem. Finding out about it from your AE is.

Why you hear it from your AE first

So why do customers end up finding out from their AE? Mostly because the number is surprisingly hard to get to from the customer side. The History tab in Automation Studio shows you seven days at a time, and you would have to add up the runs by hand. The _AutomationInstance data view has the raw data, but only for a limited period and only for the business unit you query it from. A query in the parent business unit cannot see the automations in a child business unit. One of the replies on Reddit put it bluntly: the dashboard with the actual quota sits on the Support and AE side, not with the customer.

To be fair, Salesforce’s entitlement article does point to an “Automation History and Health” report for usage information, and it is worth a look if you have it. But a rolling 12-month count, across all business units, that you own and can trend over time? I have not found that anywhere – and if I have missed something obvious, please do tell me in the comments.

The important thing to understand is that you cannot rebuild that history after the fact. Once the data view has dropped a run, it is gone. If you want to know your 12-month number when your AE calls, you need to start collecting it well before they do.

How the solution is thought out

The idea is simple: once a week, take a snapshot of what every automation did in the previous week and store it in a data extension you own. Week by week, that builds the history the data view won’t keep for you. A few design decisions are worth explaining, since they are the reason the package looks the way it does.

Everything comes from the _AutomationInstance data view, which holds one row per automation run with its status, its scheduled time and its start and end times. The query groups those rows per automation and counts them by status. Successful runs (Complete), failed runs (Error), skipped runs and stopped runs each get their own column, plus a total. I have kept skipped runs separate on purpose, because I simply don’t know whether Salesforce counts a run that was skipped (because the previous one was still running) towards your entitlement. Keeping it separate lets you report it both ways.

The query doesn’t look at “the last seven days” from whenever it runs. It looks at the previous full week, Monday to Sunday in UTC. That way two snapshots never overlap and never leave a gap, even if the automation runs a few hours late one week – and it picks the same week whichever day of the following week you run it. The automation in the package runs every Monday at 06:00. One small trap here: because the week is calculated in UTC, a run just after midnight on a Monday in Copenhagen is still Sunday in UTC, and you would snapshot the wrong week. Anything after about 03:00 CET is safe.

Guessing the schedule

I also wanted to see how often each automation is scheduled to run, since frequency is where most of the runs come from. Sadly, the data view doesn’t hold the schedule itself. What it does hold is the scheduled time of each run, so the query looks at the gap between one scheduled run and the next and reports the most common gap in hours. Using the most common gap rather than the average means that a daylight-saving weekend (a 23 or 25 hour gap) or a one-off schedule change doesn’t throw the number off. The smallest and largest gap are there too – if they are the same, the schedule is perfectly regular. For automations started by a File Drop or a Trigger there is no schedule, so the columns are simply left empty.

A primary key that protects your history

The target data extension has a primary key on MemberID, AutomationCustomerKey and SnapshotWeekStart, and the query activity uses the Update data action. The result is exactly one row per automation per week. A new week adds new rows, and if you rerun the query in the same week (after fixing something, say), that week’s rows are refreshed rather than duplicated. Previous weeks are never touched. I first considered using the timestamp of the most recent run as part of the key, but that would create a new row every time the query ran – not great for a report that has to add up.

One business unit at a time

The MemberID is there because of the business unit limitation I mentioned above. The data view only sees the business unit you are in, but your entitlement covers all of them. If you have several business units running automations, you need to deploy the package in each of them and point them all at one shared data extension. MemberID then tells you where each row came from, and it also stops two business units from overwriting each other if they happen to have automations with the same key (which can happen if you have deployed the same package to both).

What is in the package

The package is a Package Manager JSON file with three things in it: an automation called Automation Inventory Check, scheduled every Monday at 06:00, a query activity called AutomationStatus, and the AutomationStatus data extension it writes to. Each row in the data extension describes one automation in one week:

FieldWhat it holds
MemberID, AutomationCustomerKey, SnapshotWeekStartThe primary key: business unit, automation and the Monday the week starts
AutomationName, AutomationTypeName, and whether it is started by a Schedule, a File Drop or a Trigger
SuccessfulRuns, FailedRuns, SkippedRuns, StoppedRuns, TotalRunsNumber of runs that week, by status
LastRunStartUTC, LastRunEndUTCStart and end time of the most recent run that week
ScheduleIntervalHours, MinIntervalHours, MaxIntervalHoursMost common, smallest and largest gap between scheduled runs
SnapshotCreatedUTCWhen the snapshot was taken

Installing it takes a few minutes:

  1. Deploy the JSON file with Package Manager in the business unit you want to monitor.
  2. Open the AutomationStatus data extension and make sure data retention is switched off – otherwise it will quietly delete the history you are trying to build.
  3. Open the automation, check that the schedule shows your time zone and activate it. Deployed automations can arrive paused.
  4. Run the automation once manually. You get your first snapshot (the previous full week) straight away, and you can check the output before the first scheduled run.
  5. If you have several business units, create a shared data extension with the same fields in the parent business unit, deploy the package in each business unit and point every query activity at the shared data extension instead.

What to do with the numbers

The snapshot on its own is just a table. The value comes when you put it next to your entitlement. Start by working out what that is: the base number for your edition, plus 25 runs for every Additional Contacts unit in your contract. Then run something like this in Query Studio against the snapshot data extension:

SELECT
    COUNT(DISTINCT SnapshotWeekStart)                AS WeeksCovered,
    SUM(TotalRuns - SkippedRuns)                     AS RunsLogged,
    SUM(TotalRuns - SkippedRuns) * 52.0
        / COUNT(DISTINCT SnapshotWeekStart)          AS ProjectedAnnualRuns
FROM AutomationStatus
WHERE SnapshotWeekStart >= CONVERT(VARCHAR(10), DATEADD(WEEK, -52, GETUTCDATE()), 23)

It adds up the runs from the last 52 weeks and, while you still have less than a year of snapshots, extrapolates to a full year. Leave out the - SkippedRuns part if you want the more pessimistic number. If the projection is getting close to your entitlement, you know months in advance – not 30 days after the fact.

The next question is usually where the runs come from. Sorting the last four weeks by TotalRuns and looking at ScheduleIntervalHours tends to answer that quickly: it is almost always a handful of automations running every hour (or more often) that make up most of the total. From there, the usual remedies apply. Run automations only as often as the data actually changes, combine automations where it makes sense, and consider moving simple segmentation into Journey Builder, which doesn’t count towards the limit.

And if your AE does call? Two of the replies in the Reddit thread recommended pushing back, documenting what you have changed and showing the reduction. That is a lot easier with a year of weekly numbers in your hands.

Get the package

You can download the package here. It is free, and you are welcome to take it apart and change it to fit your own setup. I have only just put it live myself, so I would love to hear how it behaves in other accounts – especially larger ones with many business units.

A big thank you to Mateusz Dąbrowski for his write-up on the MCE licence limits, and to the people on Reddit and in the Trailblazer Community who shared their stories openly. That is how the rest of us learn.