Overview
The following operations allow you to work with "fetch". Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with "fetch", see Sample configuration.
Operation | Description |
---|---|
Use to retrieve information about the user. | |
1Working with Fetch in Zuora SOAP | Use to retrieve a list of one or more zobjects. |
1Working with Fetch in Zuora SOAP | Use to request additional results from a previous query call. |
Operation details
This section provides details on the operations.
Getting the user information
The getUserInfo
operation is used to retrieve information about the user.
<zuorasoap.getUserInfo/>
Sample request
Following is a sample SOAP request that can be handled by the getUserInfo
operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.zuora"> <soapenv:Header/> <soapenv:Body> <urn:apiUrl>https://apisandbox.zuora.com/apps/services/a/74.0</urn:apiUrl> <urn:username>zuora@wso2.com</urn:username> <urn:password>Zuora#123</urn:password> </soapenv:Body> </soapenv:Envelope>
Querying records
The query
operation can be used to retrieve a list of one or more zobjects by providing the queryString.
<zuorasoap.query> <queryString>{$ctx:queryString}</queryString> <batchSize>{$ctx:batchSize}</batchSize> </zuorasoap.query>
Properties
queryString:
The query expression by specifying the object to query.- batchSize: The batch size of the query result.
-
caseSensitive
: Indicates if the query filter results returned consider case-sensitivity.
Sample request
Following is a sample SOAP request that can be handled by the query operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.zuora"> <soapenv:Header/> <soapenv:Body> <urn:apiUrl>https://apisandbox.zuora.com/apps/services/a/74.0</urn:apiUrl> <urn:username>zuora@wso2.com</urn:username> <urn:password>Zuora#123</urn:password> <urn:queryString>Select Id From Account</urn:queryString> <urn:batchSize>200</urn:batchSize> </soapenv:Body> </soapenv:Envelope>
Related Zuora documentation
https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E_SOAP_API_Calls/query_call
Querying more records
The queryMore
operation can be used to request additional results from a previous query call by providing the queryLocator.
<zuorasoap.query> <queryString>{$ctx:queryString}</queryString> <batchSize>{$ctx:batchSize}</batchSize> </zuorasoap.query> <iterate xmlns:zuora="http://wso2.org/zuorasoap/adaptor" continueParent="true" expression="//zuora:iterator"> <target> <sequence> <zuorasoap.queryMore> <batchSize>{$ctx:batchSize}</batchSize> </zuorasoap.queryMore> </sequence> </target> </iterate>
Properties
batchSize
: The batch size of the query result.
Following is a sample SOAP request that can be handled by the queryMore operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.zuora"> <soapenv:Header/> <soapenv:Body> <urn:apiUrl>https://apisandbox.zuora.com/apps/services/a/74.0</urn:apiUrl> <urn:username>zuora@wso2.com</urn:username> <urn:password>Zuora#123</urn:password> <urn:queryString>Select Id From Account</urn:queryString> <urn:batchSize>200</urn:batchSize> </soapenv:Body> </soapenv:Envelope>
Related Zuora documentation
https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E_SOAP_API_Calls/queryMore_call
Sample configuration
Following is a sample proxy service that illustrates how to connect to Zuora with the init
operation and use the queryMore
operation. The sample request for this proxy can be found in queryMore sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="queryMore" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property xmlns:ns="wso2.connector.zuora" name="apiUrl" expression="//ns:apiUrl/text()"/> <property xmlns:ns="wso2.connector.zuora" name="username" expression="//ns:username/text()"/> <property xmlns:ns="wso2.connector.zuora" name="password" expression="//ns:password/text()"/> <property xmlns:ns="wso2.connector.zuora" name="batchSize" expression="//ns:batchSize/text()"/> <property xmlns:ns="wso2.connector.zuora" name="queryString" expression="//ns:queryString/text()"/> <zuorasoap.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </zuorasoap.init> <zuorasoap.query> <queryString>{$ctx:queryString}</queryString> <batchSize>{$ctx:batchSize}</batchSize> </zuorasoap.query> <iterate xmlns:zuora="http://wso2.org/zuorasoap/adaptor" continueParent="true" expression="//zuora:iterator"> <target> <sequence> <zuorasoap.queryMore> <batchSize>{$ctx:batchSize}</batchSize> </zuorasoap.queryMore> </sequence> </target> </iterate> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>