sfmc // Automation HealthPRODUCTION
Automation Activity Runtime & Error Health
Measure average activity runtime and failure count by activity key.
sqlautomationactivityinstanceruntimeerrors
Trust & provenancePRODUCTION
Evidence tierPRODUCTIONOfficial 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.
Finding the activity that makes a large automation slow.
Building an operational baseline before a migration/change.
SELECT
ActivityCustomerKey,
ActivityName,
ActivityType,
COUNT(*) AS RunCount,
SUM(CASE WHEN ActivityInstanceStatus = 'Error' THEN 1 ELSE 0 END) AS ErrorCount,
AVG(DATEDIFF(minute,
ActivityInstanceStartTime_UTC,
ActivityInstanceEndTime_UTC
)) AS AvgDurationMinutes
FROM _AutomationActivityInstance
WHERE ActivityInstanceStartTime_UTC >= DATEADD(day,-30,GETUTCDATE())
GROUP BY
ActivityCustomerKey,
ActivityName,
ActivityTypeActivity-level history separates a healthy parent automation from one slow or unstable step.
Query Activity is documented as ActivityType 300 and SSJS Script Activity as 150 in Salesforce examples.
Null end times can represent running/skipped/not-selected activity states; interpret averages accordingly.