Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Triggering CSV Export
This Apex call expects the mandatory values of the business year, the actual name of the
RTR report config record, and the sales org that must be exported.
You can trigger the CSV export by making an Apex call. A maximum of 2000 exports can be
triggered in a day.
- Sample Apex Request
-
1<namespace>.OffPlatformCallout request = new 2<namespace>.OffPlatformCallout('SCHEDULE_RTR_EXPORT','0001'); 3Map<String, Object> data = new Map<String, Object>(); 4data.put('metaname','ReportData0001'); 5data.put('salesorg', '0001'); 6data.put('businessyear',2022); 7 8String requestBodyContent = JSON.serialize(data, true); 9Map<String, String> params = new Map<String, String>(); 10 11<namespace>.OffPlatformCalloutResponse response = request.execute(<namespace>.TransactionHandler.getTransactionIdentifier(), params, requestBodyContent); 12System.debug(response); - Sample Response
-
The response contains a unique identifier for this export in JSON format. This GUID is needed in the subsequent calls.
1{ 2 "csvGuid": "94f49a3f-37bc-4794-8051-123456789" 3}