---
schema_version: "1"
id: 48a15f227c78d0cc87098b827caf84dcf1a70ef97843df8f01f96e814c5d6e8a
title: Triggering CSV Export
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/retail_api/rtr_triggering_csv_export.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.retail_api.meta/retail_api/rtr_triggering_csv_export.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 93510b61be84104a54ac30e41cc254be26aac69e4925137c03c6ee479a042d54
description: 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.
---
# 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. Account Plan measure exports include data from weekly account and promotion writebacks. For promotion writebacks, if a product moves to a new category and promotions reference both the old and new categories, the export shows separate rows for each category for the same product and measure code.

## Sample Apex Request

<namespace>.OffPlatformCallout request = new 
<namespace>.OffPlatformCallout('SCHEDULE\_RTR\_EXPORT','0001');
Map<String, Object> data = new Map<String, Object>();
data.put('metaname','ReportData0001');
data.put('salesorg', '0001');
data.put('businessyear',2022);

String requestBodyContent = JSON.serialize(data, true);
Map<String, String> params = new Map<String, String>();

<namespace>.OffPlatformCalloutResponse response = request.execute(<namespace>.TransactionHandler.getTransactionIdentifier(), params, requestBodyContent);
System.debug(response);

## Sample Response

The response contains a unique identifier for this export in JSON format. This GUID is needed in the subsequent calls.

{
  "csvGuid": "94f49a3f-37bc-4794-8051-123456789"
}