> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Retrieve Workflow changes

> Learn how to retrieve auditing records of changes to the Workflow definition object hierarchy using a data query.

Learn how to retrieve auditing records of changes to the Workflow definition object hierarchy using a data query.

The following use case retrieves the auditing records of changes to Workflow definition object hierarchy.

Submit a [data query](/docs/platform/data/data-query) job through UI or API with the following SQL query:

```
SELECT username    AS Username,
       action      AS Action,
       Objectid    AS ObjectID,
       objecttype  AS ObjectType,
       objectname  AS ObjectName,
       attributeid AS Attribute,
       oldvalue    AS OldValue,
       newvalue    AS NewValue,
       timestamp   AS Timestamp
FROM   auditobjectchangeevent
WHERE  namespace = 'Workflow'
       AND objecttype = 'WorkflowVersion'
       AND year = 2022
       AND month = 11
ORDER  BY timestamp DESC 
LIMIT  100000
```

Check the status of the query job through UI or [Get data query](https://www.zuora.com/developer/api-references/api/operation/GET_DataQueryJob) job API operation.

Download the query result when the job is completed. See the following example of the query result.

```
Username,Action,ObjectID,ObjectType,ObjectName,Attribute,OldValue,NewValue,Timestamp
audit-trail@zuora.com,CREATED,233,WorkflowVersion,Workflow Name,name,,Sample Workflow,2022-11-10 16:54:14Z
audit-trail@zuora.com,CREATED,233,WorkflowVersion,Workflow Name,priority,,Medium,2022-11-10 16:54:14Z
audit-trail@zuora.com,CREATED,233,WorkflowVersion,Workflow Name,call_type,,ASYNC,2022-11-10 16:54:14Z
audit-trail@zuora.com,CREATED,233,WorkflowVersion,Workflow Name,callout_trigger,,true,2022-11-10 16:54:14Z
audit-trail@zuora.com,UPDATED,233,WorkflowVersion,Workflow Name,callout_trigger,true,false,2022-11-10 17:11:30Z
```