ZOQL, or Zuora Object Query Language, is a query language similar to SQL. It is used to construct query calls in Zuora’s SOAP API. Zuora suggests you have basic knowledge and experience with SQL in order to work with ZOQL effectively.
ZOQL’s basic query syntax is as follows:
select field_names from object where filter_statements
When you first start building a metric in Grow, it gives an example query:
select accountnumber from account where status = "Active"
(Note: If you want to use that query, you will need to type it manually into Grow. It is only shown there as an example query.)
When writing a ZOQL Query, be sure to note the following:
- All keywords must be written in lowercase.
- ZOQL doesn’t support parentheses to indicate order of operations in a query. However, you can use the operators
or. (Note that the operator
andtakes priority in the order of operations over
Zuora’s documentation of ZOQL goes into more detail about how to write queries, as well as the constraints ZOQL has. It is fairly comprehensive and easy to understand.
If you want to see what object references are allowed in Zuora's SOAP API, check out this article. This will help you write your queries with fields that are allowed in Zuora.
Questions? Email us at email@example.com or chat in on the site.