Retrieve: Object Query
This task returns a data array in real time from your Zuora data source based on the conditions you specify.
When you create an object query task, you need to select a data object to query data against, select the data fields that you want to return results for, and specify the conditions for filtering the data.
This task uses standard ZOQL for building queries.
If Invoice Settlement is enabled, the following objects are not available:
- InvoicePayment
- RefundInvoicePayment
- InvoiceItemAdjustment
- CreditBalanceAdjustment
- InvoiceAdjustment
- CreditMemo
- DebitMemo
Note: For CreditMemo and DebitMemo objects, you can try using Query task or Callout task instead of the Object Query task.
Difference between export and object query
Both the export and object query tasks can be used for data retrieval.
The export task retrieves data asynchronously. It initiates the request and checks the status of the data retrieval process later. When the status indicates that all data is retrieved, it exports the data in a CSV file. The export task does not have a limit on the amount of data entries in the result. You can select multiple data objects (the main object and the pre-joined objects) to export data from. The export task uses Export ZOQL for building queries.
The object query task retrieves data synchronously. It initiates the request and waits for the data to be returned. The maximum amount of data entries in an object query task is 2000. You can only select one data object to query data from. The query task uses standard ZOQL for building queries.
Task Settings
Fields Tab
- Object - Select the data object to query for data from.
- Click a data object from the left panel to display all available data fields in that object.
- Tick the Enabled checkbox to select a data field.
Conditions Tab
Enter a query in the query text field. The two dropdown lists are intended to help you enter object fields and workflow data fields in your query.
- Query Batch Size - The limit of data entries in the results of a query. The default and maximum value is 2000.
- Payload Alternative Placement - By default, the data payload for a query task will be placed under the data object that is selected for the query. To avoid conflicts with concurrent query tasks that save multiple copies of data to the same object, you can specify an alternative placement for this query task. For example, if you query for the balance data in the Account object, the retrieved data will be placed under Account by default and can be referenced with "Account.Balance" in subsequent tasks. If you specify "Account_0" as the payload alternative placement, the retrieved data will be placed under Account_0 and can be referenced with "Account_0.Balance".
If you wish the workflow to stop when no data is returned in this query task, select Stop subsequent tasks if query returns no records.