sfmc // Automation HealthPROJECT

Automation Runtime Regression — Current vs 30-Day Average

Compare each automation’s most recent duration with its recent average to find successful-but-degrading flows.

sqlautomationruntimeregression
Context Pack →Open Workspace →
Trust & provenancePROJECT
Evidence tierPROJECTOfficial sources1Other sources0Last verified2026-10-05

Evidence tier describes my hands-on relationship with the content. Official sources describe platform contracts/documentation. Production observations should not automatically be treated as official limits.

EvidencePROJECT
Difficultyadvanced
Verified2026-10-05
Use when

Proactive health monitoring around migrations or data growth.

SELECT
    latest.AutomationCustomerKey,
    latest.LatestMinutes,
    hist.AvgMinutes30D
FROM (
    SELECT AutomationCustomerKey,
           DATEDIFF(minute,AutomationInstanceStartTime_UTC,AutomationInstanceEndTime_UTC) AS LatestMinutes
    FROM (
      SELECT
        AutomationCustomerKey,
        AutomationInstanceStartTime_UTC,
        AutomationInstanceEndTime_UTC,
        ROW_NUMBER() OVER (
          PARTITION BY AutomationCustomerKey
          ORDER BY AutomationInstanceEndTime_UTC DESC
        ) AS rn
      FROM _AutomationInstance
      WHERE AutomationInstanceStatus = 'Complete'
    ) x
    WHERE rn = 1
) latest
INNER JOIN (
    SELECT AutomationCustomerKey,
           AVG(DATEDIFF(minute,AutomationInstanceStartTime_UTC,AutomationInstanceEndTime_UTC)) AS AvgMinutes30D
    FROM _AutomationInstance
    WHERE AutomationInstanceStatus = 'Complete'
      AND AutomationInstanceEndTime_UTC >= DATEADD(day,-30,GETUTCDATE())
    GROUP BY AutomationCustomerKey
) hist
ON latest.AutomationCustomerKey = hist.AutomationCustomerKey
Why it works

A Complete status only tells you outcome; duration trend catches approaching schedule overlap/timeout earlier.

Operational notes

A health dashboard can flag ratios such as latest > 1.5x baseline, but pick alert thresholds from your own workload.

Sources / verification