Latest Run Status per Automation
Return the latest known Automation Studio run for each AutomationCustomerKey.
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.
Building an Automation health dashboard.
Finding automations whose most recent run is Error, Stopped or unexpectedly old.
SELECT
AutomationCustomerKey,
AutomationName,
AutomationInstanceID,
AutomationInstanceStatus,
AutomationInstanceStartTime_UTC,
AutomationInstanceEndTime_UTC
FROM (
SELECT
AutomationCustomerKey,
AutomationName,
AutomationInstanceID,
AutomationInstanceStatus,
AutomationInstanceStartTime_UTC,
AutomationInstanceEndTime_UTC,
ROW_NUMBER() OVER (
PARTITION BY AutomationCustomerKey
ORDER BY AutomationInstanceEndTime_UTC DESC
) AS rn
FROM _AutomationInstance
) x
WHERE rn = 1ROW_NUMBER ranks runs within each automation by latest end time, producing one current operational snapshot per AutomationCustomerKey.
The data view is real-time, BU-scoped and keeps six months of run history.
If your account has multiple notification recipients, deduplicate around AutomationInstanceID because Salesforce can emit one row per recipient.