Get a big-picture view of all automations within a tenant, and improve the efficiency and success rate of your automations by reviewing automation health. Query the _AutomationInstance data view in Automation Studio to prevent failures by identifying long-running processes, and fix failed automations by addressing the cause of failure.
What This Data View Shows
- Automations that ran recently
- When an automation ran
- The duration of an automation
- Whether an automation succeeded, skipped, or failed
- The reason an automation failed
- The file that was being processed when a triggered automation failed
What You Need to Know
| How to activate the data view | Available by default |
| When data is available | Data in this view is available in real-time |
| How much data is available | Data for automations that ran during the past 6 months |
| Data view scope | Single business unit |
| Time zone | UTC |
Questions That You Can Answer
Which Automations Failed Yesterday?
Identify problems with your automations and prevent future failures by reviewing automations that failed yesterday.
SELECT automationcustomerkey
FROM [_automationinstance]
WHERE automationinstancestatus = 'Error'
AND automationinstanceendtime_utc >= Dateadd(day, -2, Getutcdate())
Which Automations Completed Yesterday?
Confirm that the automations that you expected to run yesterday successfully completed.
SELECT automationcustomerkey
FROM [_automationinstance]
WHERE automationinstancestatus = 'Complete'
AND automationinstanceendtime_utc >= Dateadd(day, -2, Getutcdate())
Which Automations Skipped Yesterday?
Skipped instances are a warning that an automation could be unhealthy, for example, there isn’t enough time between scheduled automations. Or, there were multiple instances of the same file drop automation queued when a running instance was stopped. Use this query to identify automations that were skipped yesterday, and decide whether to take action.
SELECT automationcustomerkey
FROM [_automationinstance]
WHERE automationinstancestatus = 'Skipped'
AND automationinstanceendtime_utc >= Dateadd(day, -2, Getutcdate())
What Is the Average Duration of Each Automation?
Track the average performance of your automations to find trends and investigate problems before they impact critical processes. If an automation is slowing down over time, you can investigate the root cause and take corrective action. Use this query to determine each automation’s average duration over the past 6 months.
SELECT automationcustomerkey,
Avg(Datediff(minute, automationinstancestarttime_utc,
automationinstanceendtime_utc)) AS AvgDuration
FROM [_automationinstance] automation
GROUP BY automationcustomerkey
What Is the Latest End Time and Status of Each Automation?
View details of all automations with at least one run in the last 6 months, including the latest end time and status. Use this information to identify critical failures and automations that haven’t run recently.
SELECT automationcustomerkey,
automationinstanceid,
automationinstancestatus,
automationinstanceendtime_utc
FROM (SELECT automationcustomerkey,
automationinstanceid,
automationinstancestatus,
automationinstanceendtime_utc,
Row_number()
OVER (
partition BY automationcustomerkey
ORDER BY automationinstanceendtime_utc DESC) AS run_count
FROM [_automationinstance]) AS instances
WHERE run_count = 1
Data View Columns
| Name | Description | DataType | Data Extension Data Type | Nullable |
|---|---|---|---|---|
| MemberID | The unique ID of the business unit. | BIGINT | Number | |
| AutomationName | The automation name. | NVARCHAR(400) | Text | |
| AutomationDescription | The automation description. | NVARCHAR(400) | Text | X |
| AutomationCustomerKey | The unique ID of the automation. | NVARCHAR(400) | Text | |
| AutomationType | The automation’s starting source. Possible values are Schedule, File Drop, or Trigger. | VARCHAR(9) | Text | X |
| AutomationNotificationRecipient_Complete | The email address where notifications about completed automations are sent. | NVARCHAR(500) | Text | X |
| AutomationNotificationRecipient_Error | The email address where notifications about automation errors are sent. | NVARCHAR(500) | Text | X |
| AutomationNotificationRecipient_Skip | The email address where notifications about skipped automations are sent. | NVARCHAR(500) | Text | X |
| AutomationStepCount | The number of steps in the automation. | INT | Number | |
| AutomationInstanceID | The unique ID of the automation run. | UNIQUEIDENTIFIER | Text | |
| AutomationInstanceIsRunOnce | Whether the automation was set to run once. 1 = true, 0 = false. | BIT | Boolean | |
| FilenameFromTrigger | For file drop and trigger automations, the file that started the automation. | NVARCHAR(4000) | Text | X |
| AutomationInstanceScheduledTime_UTC | For scheduled automations, the time that the run was scheduled to begin. | DATETIMEOFFSET | Date | X |
| AutomationInstanceStartTime_UTC | The time that the automation run started. This value is null if the automation was skipped. | DATETIMEOFFSET | Date | X |
| AutomationInstanceEndTime_UTC | The time that the automation run ended. This value is null if the automation was skipped or is still running. | DATETIMEOFFSET | Date | X |
| AutomationInstanceStatus | The status of the automation run when the data view is queried. Possible values are QueuedFile, Initialized, Executing, Stopped, Complete, or Error. | NVARCHAR(400) | Text | |
| AutomationInstanceActivityErrorDetails | The message from the error log, if applicable. If a system or unclassified error occurs, the value is System Error. If multiple errors occur, only the first message is displayed. To get details on multiple errors, use the _AutomationActivityInstance view. | NVARCHAR(4000) | Text | X |