Happy Business Starts Here

Re: Access to Run Number as a Workflow Data item

Access to Run Number as a Workflow Data item

We use Workflow to provision access to external systems.


Sometimes this access is not provisioned because the workflow had issues, or required fields were not properly entered etc.


When searching for a specifc run, to find out what went wrong, is only one option:

skim through looking at the date/time to see when the workflow should have been called, looking for any with errors


There is a search workflow option, but this only really works for looking up Workflow names, or Run Numers - any data within a run e.g. Acccount Number is not searchable


We want to be able to record the Workflow Run Number that managed that task and then save it against certain objects (e.g. Subscription, Invoice) - either as a custom field, or to have some logging that would allow this to be linked directly.



On Payment received, Workflow A runs to provision access

When Workflow A starts, the RunNumber will be recorded/linked on the Invoice/Payment object

If there are any issues preventing the workflow running, I can find the Invoice/Payment object - click on the Run Number, and go straight to the run history to see if there were any issues


Any update on this idea? we have a similar need and looking for options are available.


Savvy Scholar

Here, too. Would like to send a custom notification when an approval is needed which includes the run number.

Zuora Product Team
Status changed to: Accepted

There is a feature enabled in your sandbox environments today that will move to production in March 5th that I believe can help with these use cases. 


We now are exposing workflow definition and run details for extraction using Data query. Documentation specifically on this capability is being created in preparation for production / general availability, but in the meantime please do try it out and give us feedback. 



  • Navigate to Data Query (under Platform) within your sandbox
  • Use 'Describe Workflow' to return the description of fields available for a workflow run or setup
  • Use 'Describe Task' to return description of fields available for task runs and setups
  • Create your query (get approval tasks in pending, join workflows, select name, index join)
  • Test your query
  • Save your query
  • Create workflow (new also in sandbox is ability to pull up a "Saved Query" within Retrieve --> Data Query step) that takes your query, iterates and actions.

Use Community to post questions if help is needed:

Zuora Product Team
Status changed to: Delivered


"Prefix the object names with workflow to allow easier search-ability, visibility and usability" 


Existing object / table name  New object / table name
workflow workflow (no change)
task workflow_task
linkage workflow_linkage
api_call workflow_api_call
task_usage workflow_task_usage


Valued Scholar



There is a much easier way to do this by using two undocumented workflow objects that exist when a workflow is executed:


​The WorkflowInstance object represents a workflow execution. This object is NOT documented yet. The attributes listed in the following table are obtained from either Zuora support and/or by trial and error.





The workflow ​identifier number. This is the xxxx in the WF-xxxx-yyyyyyyy name.


​The instance name: WF-xxxx-yyyyyyy name.


​The status of the execution. 


​Collection of tasks that failed


​Collection of tasks that are pending


The TaskInstance object represents the current task that is executed. This object is NOT documented yet. The attributes listed in the following table are obtained from either Zuora support and/or by trial and error.





​The task's id number 


​The name of the task. 


​​The status of the task:  success, error


The Workflow.Name is an unique identifier for the workflow instance. You use this value to mark entity as being been processed by a given workflow run.  


In our workflows we set-up a global payload variable JOBID that is initialized with: 
"{{WorkflowInstance.name}}-{{ "now" | date: "%Y%m%d%H%M%S" }}"  to get a reference to both the workflow run instance and datetime.