sfmc // Automation HealthPRODUCTION

Automation Activity Runtime & Error Health

Measure average activity runtime and failure count by activity key.

sqlautomationactivityinstanceruntimeerrors
Context Pack →Open Workspace →
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.

EvidencePRODUCTION
Difficultyintermediate
Verified2026-10-05
Use when

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,
    ActivityType
Why it works

Activity-level history separates a healthy parent automation from one slow or unstable step.

Operational notes

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.

Related
Sources / verification