Zuora REST V2 Connector > Mappings and Mapping Tasks with Zuora REST V2 > Zuora REST V2 Source Transformation in Mappings
  

Zuora REST V2 Source Transformation in Mappings

When you configure a Source transformation, select the Zuora REST V2 connection and choose an operation to represent a Zuora source. You can parameterize a Zuora REST V2 connection.
When you select a Zuora REST V2 connection for a source, you can select an operation from the list of operations. You can use the request message template to configure the request message in a JSON format. You can parameterize the input values in the request message. Configure the advanced properties to set the tracing level and the cache size for the web service response.
You can view the response structure in the field mapping. When you map the elements from the response structure to the output fields, the Secure Agent creates the output groups, along with the primary and foreign keys for the field names. When you deploy the mapping in a mapping task and run the task, the Secure Agent reads the data from Zuora.

Source Transformation Properties

You can use one or more source transformations in a mapping. Use a Joiner transformation to join data from two sources.
When you select a source, the Properties panel displays the following information:

Advanced Source Properties

In a mapping, you can configure a source to represent a Zuora source. For Zuora REST V2 connections used in Mapping Configuration tasks, you can configure advanced properties on the Source page of the Mapping Configuration Task wizard.
The following table describes the advanced properties that you can configure in a source:
Property
Description
Tracing Level
Amount of detail that appears in the log.
Use the following tracing levels:
  • - Terse
  • - Normal
  • - Verbose Initialization
  • - Verbose
Default is normal.
Cache Size for Web Service Response (KB)
Memory available for the web service response. If the web service response contains many rows or columns, you might want to increase the cache size. Default is 100 KB.

Source Transformation Mapping Example

You are a payroll administrator and you want to extract accounting codes details for all employees from Zuora to a flat file using Zuora REST V2 connection.
To read data from Zuora and write to a flat file using Zuora REST V2 connection, perform the following tasks:
  1. 1. Create a Zuora REST V2 connection. Verify that you select the Swagger file that contains accounting codes object in the connection properties.
  2. The following image shows the configured Zuora REST V2 connection:
  3. 2. Create a flat file connection to write data to the flat file.
  4. 3. Create a Zuora REST V2 mapping.
  5. 4. Add a Source transformation. Specify a name and description in the general properties.
  6. 5. On the Source tab, perform the following steps:
    1. a. In the Connection field, select the configured Zuora REST V2 connection to connect to Zuora REST V2.
    2. b. In the Operation field, select Get_AllAccountingCodes as the operation.
    3. The following image shows the GetAccountingCodes operations:
    4. c. In the Request Options section, configure the request message in the following JSON format, specify the attributes in the message, and validate the message:
    5. {
      "entityId" : "",
      "entityName" : "",
      "pageSize" : 0
      }
    6. The request message specifies the criteria to include accounting codes for all employees. You can hide the optional elements to see the mandatory elements required for the request message. You must have the Web Services Admin (Professional) or Can Administer (Standard) user role to use the user parameter.
    7. d. In the Advanced Properties section, set the tracing level to Normal, and use the default cache size of 1024.
  7. 6. On the Field Mapping tab, select the elements, such as gIAccountName, gIAccountNumber, id, name, and status in the response structure that you want to map to the output fields.
  8. The following image shows the response structure on the left pane in a hierarchical format and the output groups on the right pane in a relational format:
    The Secure Agent creates two output groups, root and GETAccountingCodeItemWithoutSuccess, which results in two relational output files. Primary and foreign keys are auto-generated.
  9. 7. Add two Target transformations. Specify name and description in the general properties.
  10. 8. Select a flat file connection for the target transformations.
  11. 9. Draw a link to connect the GETAccountingCodeItemWithoutSuccess output group to the ZuoraRestV2_Read2_1.csv flat file. Draw another link to connect the root output group to the ZuoraRestV2_Read2_2.csv flat file.
  12. The following image shows the Select Output Group dialog box where you select the output group to write to each target:
  13. 10. On the Field Mapping tab, select the automatic field map option.
  14. The following image shows the target field mapping when you select the automatic field map option for the ZuoraRestV2_Read2_1.csv flat file:
  15. 11. Save and run the mapping.
  16. The following image shows the Zuora REST V2 mapping: