Export data
Learn to bulk export resources to a CSV or JSON file from Composable Commerce.
Prerequisites and preparation
Permissions
To export data, the Administrators Team must grant you the following permissions for the Project:
- View all: Operations permission to access the export logs page and to download export files
- View all: Categories permission to export Categories
- View all: Customers permission to export Customers
- View all: Discount codes permission to export Discount Codes
- View all: Orders permission to export Orders
- View all: Products permission to export Products and Inventory
Use keys as identifiers
Keys are optional unique identifiers for resources in your Project, but they are required for exporting and importing. Before exporting, ensure that the resources to export and all related resources have keys. For example:
- When exporting Discount Codes, both the Discount Codes and the Cart Discounts they use should have keys.
- When exporting Products, the Products, their Product Variants, and Embedded Prices should have keys.
Resources without keys will be exported, but you will be unable to update their values by importing the exported file.
Improve performance
To speed up the export process and reduce the size of exported files, you should:
- Export a limited number of resources. Instead of exporting all the resources, you can filter or select specific resources to export.
- Select only the necessary locales and fields.
- Create multiple export files for large resources. For example, when exporting Products, create separate files for general fields, price fields, and asset fields.
If you intend to import the exported CSV file, the CSV file must be no larger than 35
MB and contain fewer than 80 000
rows.
Export Categories
Go to Categories > Categories search.
Click the Import / Export drop-down and select Export categories.
In the Export categories dialog, follow these steps:
- Choose to export all Categories, or only the ones you have filtered or selected.
- For File format, choose to export the data as a CSV or JSON file.
- For File name, enter a name for the file containing the export data.
- For Locale, select the languages to export the data in. To include data for all configured locales, click the Include all locales toggle.
Click Continue.
Select the fields to be exported and click Start export.
Export Customers
Go to Customers > Customer list.
Click the Import / Export drop-down and select Export customers.
In the Export customers dialog, follow these steps:
- Choose to export all Customers, or only the ones you have filtered or selected.
- For File format, choose to export the data as a CSV or JSON file.
- For File name, enter a name for the file containing the export data.
- For Locale, select the languages to export the data in. To include data for all configured locales, click the Include all locales toggle.
Click Continue.
Select the fields to be exported and click Start export.
Export Discount Codes
Go to Discounts > Discount code list.
Click the Actions drop-down and select Export discount codes.
In the Export Discount Codes dialog, follow these steps:
- Choose to export all Discount Codes, or only the ones you have filtered or selected.
- For File format, choose to export the data as a CSV or JSON file.
- For File name, enter a name for the file containing the export data.
- For Locale, select the languages to export the data in. To include data for all configured locales, click the Include all locales toggle.
Click Continue.
Select the fields to be exported and click Start export.
Export Inventory
Go to Products > Product list.
Click the Actions drop-down and select Export inventories.
In the Export inventories dialog, follow these steps:
Choose to export all Inventory entries, or only the ones associated with Products you have filtered or selected.
You can only export up to 500 Inventory entries per Product Variant. Due to eventual consistency, updates made to Inventory entries just before the export may not be included.
For File format, choose to export the data as a CSV or JSON file.
For File name, enter a name for the file containing the export data.
For Locale, select the languages to export the data in. To include data for all configured locales, click the Include all locales toggle.
Click Continue.
Select the fields to be exported and click Start export.
Export Orders
Go to Orders > Order list.
Click the Import / Export drop-down and select Export orders.
In the Export orders dialog, follow these steps:
- Choose to export all Orders, or only the ones you have filtered or selected.
- For File format, choose to export the data as a CSV or JSON file.
- For File name, enter a name for the file containing the export data.
- For Locale, select the languages to export the data in. To include data for all configured locales, click the Include all locales toggle.
- To include the Order number, ID, and States in every row of the CSV file, select the checkbox. This will increase the size of the exported file, and the export task may also take longer to complete.
Click Continue.
Select the fields to be exported and click Start export.
Export Products
For Products with more than one Product Variant, the exported CSV file contains a row for each Product Variant. By default, all Product-level data (common to all Product Variants) is omitted from the rows for the additional Product Variants leaving their cells blank. If you need these cells filled for each row, you can tell the exporter to include the Product-level information. This will increase the size of the exported file, and the export task may take longer to complete.
Go to Products > Product list.
Click the Actions drop-down and select Export products.
In the Export products dialog, follow these steps:
- Choose to export all Products, or only the ones you have filtered or selected.
- For File format, choose to export the data as a CSV or JSON file.
- For File name, enter a name for the file containing the export data.
- For Locale, select the languages to export the data in. To include data for all configured locales, click the Include all locales toggle.
- To include Product-level information in every row of the CSV file, select the checkbox.
Click Continue.
Select the fields to be exported and click Start export.
Download the export files
The export operation is a background task. The time to complete the operation corresponds to the amount of data exported. If the data is large, the export can take longer. For quicker exports, you should export only the necessary resources, locales, and fields. To view the current status of your exports, and to download exported files, go to Operations > Export.
If several export operations are run within a short period, they will be queued to ensure smooth running of the export process. Queued exports are automatically processed in the order in which they were created.
Export log files are removed after 24 hours.
Viewing the export file
For CSV exports, the headers and values match those in the CSV import documentation:
For JSON exports, the fields and types match those in the HTTP API documentation: