Artisan IMG > Zuora (zuora) (9f179d7a94dea09be34ed65569e3c653)
Artisan IMG > Zuora (zuora) (9f179d7a94dea09be34ed65569e3c653)

Zuora
3.1

Zuora’s applications are designed to automate recurring billing, collections, quoting, revenue recognition, and subscription metrics

Overview
Copy

Zuora's applications automate billing, commerce, and finance operations.

Exporting documents
Copy

Tray's Zuora connector allows the creation of files from ZOQL queries. There are two steps to this process. Step 1 - Create an export request

Use the Create Export operation to run a ZOQL query and generate a file. The connector will execute the query and will output an Export ID:

1
{
2
"Success": true,
3
"Id": "2c92c0f8610dde85016122ed1cf810cd"
4
}

Step 2 - Attempt to retrieve the export
Copy

The export can take some time. More complex queries will take longer for the export to run. Use the Attempt Export operation to send a request to retrieve the file that has been exported. You will need to provide the Export ID that was returned when you sent the Create Export request.

If the export has yet to complete you will get a playload like the one below. Note that the ready field is false. You can use a Boolean Connector to check whether the export has completed yet.

1
{
2
"ready": false,
3
"file": null,
4
"response_data": {
5
"Zip": false,
6
"Encrypted": false,
7
"Query": "select * from RevenueScheduleItem",
8
"UpdatedDate": "2018-01-23T04:10:20.000-08:00",
9
"UpdatedById": "2c92c0xxxxxxxxxxxxxxe7d3f01482c",
10
"Status": "Processing",
11
"CreatedDate": "2018-01-23T04:10:20.000-08:00",
12
"Format": "csv",
13
"CreatedById": "2c92c0fxxxxxxxxxxxxx1e7d3f01482c",
14
"Id": "2c92c0fxxxxxxxxxxxxxxxxxed1cf810cd"
15
}
16
}

Once the export has completed the ready field is set to true and a URL for downloading the file is returned:

1
{
2
"ready": true,
3
"file": {
4
"name": "2c92c086610ddd8e016122ed25b35ad9.csv",
5
"url": "https://workflow-file-uploads.s3-us-west-2.amazonaws.com/3256fbc3-0a68-4xxx-xxxx-xxxxb3c5f0a1?Expires=1516795854&AWSAccessKeyId=AKIxxxxxxxxxxBQ&Signature=EhXxxxxxxxxxxxxxmcui%2BTvI0zyg%3D",
6
"mime_type": "text/csv",
7
"expires": 1516795854
8
},
9
"response_data": {
10
"Size": 422,
11
"Zip": false,
12
"Encrypted": false,
13
"Query": "select * from RevenueScheduleItem",
14
"UpdatedDate": "2018-01-23T04:10:22.000-08:00",
15
"UpdatedById": "2c92cxxxxxxxxxxxxx1e7d3f01482c",
16
"Status": "Completed",
17
"CreatedDate": "2018-01-23T04:10:20.000-08:00",
18
"Format": "csv",
19
"FileId": "2c92c0xxxxxxxxxxxx2ed25b35ad9",
20
"CreatedById": "2c92cxxxxxxxxxxxxxx11e7d3f01482c",
21
"Id": "2c92c0xxxxxxxxxxed1cf810cd"
22
}
23
}

Step 3 - Process the file
Copy

Use another connector to process the saved file. If you have saved the file as a CSV you can use the CSV Connector to process the results.