Newer Version Available

This content describes an older version of this product. View Latest

Committing CSV Export

This Apex call commits a full or delta CSV export.
Generally, there are two types of CSV exports generated by the system—a full and a delta export.

The committed exports are retained for 30 days.

Note

  • The full data contains all the data for the provided business year, report, and sales org.
  • The delta export contains only the changed data for the provided business year, report, and sales org since the last commit.
Sample Apex Request
1<namespace>OffPlatformCallout request = new <namespace>.OffPlatformCallout('COMMIT_RTR_EXPORT','<salesorg>');
2Map<String, Object> data = new Map<String, Object>();
3data.put('metaname','ReportData0001');
4data.put('salesorg', '0001');
5data.put('businessyear',2020);
6String requestBodyContent = JSON.serialize(data, true);
7Map<String, String> params = new Map<String, String>();
8params.put('csvGuid', '<CSV Guid received as response from Triggering CSV Export>');
9<namespace>.OffPlatformCalloutResponse response = request.execute(<namespace>.TransactionHandler.getTransactionIdentifier(), params, requestBodyContent);
10System.debug(response);
Sample Response
1{
2  "csvGuid": "94f49a3f-37bc-4794-8051-123456789",
3  "commitdate": "Thu, 16 Sep 2021 13:04:23 GMT"
4}