Create a Source transformation in the Mapping Task wizard to read data from Zuora.
When you select a Zuora REST V2 connection for a Source transformation in a mapping to read data from Zuora, you can select an operation from the list of operations.
After you specify the connection, specify the operation on the Source tab of the Source transformation.
Select the operation you require, configure the request message in JSON from the sample template provided, and configure the advanced properties for the operation.
If you want to write to a relational target, define a relational structure for the source data by mapping the incoming fields that is in hierarchical format to the output fields in relational format. When you run the mapping, the Secure Agent retrieves data for the specified operation from Zuora.
Configuring a Request Using Request Message Editor
When you create a Source transformation, configure an JSON request message for the operation that you want to perform in Zuora.
Use the Request Message Editor to create a request message. The request message is in JSON format and contains request parameters exposed by Zuora REST API for a specific operation. You can use the default request message for the operation and then customize the request message to specify the data that you want to include.
To customize your request, copy the request message from the sample template to the Request Message Editor pane where you can edit the JSON message and add the attributes for the request. Remove unnecessary and empty tags from the request message to avoid operation failure. You can hide the optional elements to see the mandatory elements required for the request message.
For example, you want to perform an operation GET_AllAccountingCodes using Zuora REST V2 Connector to retrieve reports for all users in a single call.
The following JSON sample shows the filters used for the GET_AllAccountingCodes operation:
The following image shows the validated request message in a GET_AllAccountingCodes operation in the Mapping Designer:
The request message format in Zuora REST V2 Connector follows the service request definition in Zuora. Ensure that you use well-formed JSON formatting in the request message. You can verify if the JSON request is valid to ensure that the JSON matches the structure expected by the operation.
Field Mapping in a Source Transformation
The response message format follows the service response definition in Zuora. You can map response fields from a hierarchical to a relational structure of output groups and fields.
After you configure an operation for a source and specify the request message, create the relational format from the hierarchical data to include groups and fields that you want in the output.
Select the elements in the response structure that you want to include as output fields. The Secure Agent converts the JSON response in the hierarchical structure to relational groups at run time.
The output groups along with the primary and foreign keys are generated. You can pause on the output field to view the XPath expression, which indicates which field the output field is mapped to in the response structure of the hierarchy tree.
The following image shows an example hierarchical response structure generated from the request JSON for the Get_AllAccountingCodes operation and the corresponding relational output fields for the response:
You can edit the data type, precision, and scale for the groups and fields after mapping the fields.