Learn to bulk export resources to a CSV or JSON file from Composable Commerce.
Prerequisites and preparation
Permissions
- 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, Inventory, and Custom Objects
Identifiers
Export and import functionality uses only user-defined identifiers, such as keys, to identify resources.
System-generated ID values are unique within a single Project. This makes them unsuitable for managing data across multiple Projects (such as staging and production). In these scenarios, resource ID values will differ between Projects, whereas user-defined identifiers can be maintained consistently. Relying solely on user-defined identifiers therefore ensures predictable and reliable data imports across different Projects.
Keys are optional, so they may be missing from your Project's resources and embedded objects. 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.
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.
35
MB and contain fewer than 80 000
rows.Use a CSV template file to export
You can create a CSV template for a resource to control the structure of your exported data and streamline exports. To create a CSV template, you can export a file with the required fields for the resource, and then use it as a template for future exports.
Structure of exported CSV files
Exported CSV files follow a hierarchical structure, where subitems (such as Variants and Prices) are nested under their parent items (like Products).
The first subitem's values appear on the same row as the parent item, while each additional subitem is listed on a new row.
key
, name
, and id
) are only filled in the first row of that resource, and subsequent rows exclude them.key | name.en-US | id | variants.key | variants.sku | attributes.color.en-US |
---|---|---|---|---|---|
maya-pillow-cover | Maya Pillow Cover | 2aa591c3-1db7-4a0a-ab13-a81829edd431 | mayaPillowCover01 | MPC-02 | Plum:#DDA0DD |
mayaPillowCover02 | MPC-07 | Beige:#F5F5DC | |||
mayaPillowCover03 | MPC-08 | Orange:#FFA500 |
key
, name
, and id
) are included in every row of that resource.key | name.en-US | id | variants.key | variants.sku | attributes.color.en-US |
---|---|---|---|---|---|
maya-pillow-cover | Maya Pillow Cover | 2aa591c3-1db7-4a0a-ab13-a81829edd431 | mayaPillowCover01 | MPC-02 | Plum:#DDA0DD |
maya-pillow-cover | Maya Pillow Cover | 2aa591c3-1db7-4a0a-ab13-a81829edd431 | mayaPillowCover02 | MPC-07 | Beige:#F5F5DC |
maya-pillow-cover | Maya Pillow Cover | 2aa591c3-1db7-4a0a-ab13-a81829edd431 | mayaPillowCover03 | MPC-08 | Orange:#FFA500 |
Configure separators for CSV files
,
) is used as the column separator, and a point (.
) is used for decimals. If your locale uses commas for decimals, you can change the column separator to another value and the decimal separator to a comma (,
)..
).Export Categories
-
Go to Categories > Categories search.
-
Click the Import / Export drop-down and select Export categories.
-
In the dialog, follow these steps:
- Choose to export all Categories, or only the ones you have filtered or selected.
- For File name, enter a name for the file containing the export data.
- For File format, choose to export the data as a CSV or JSON file.
- If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
- To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
Click Step 2: Select content to export.
-
If you're exporting the data as a CSV file, you can select fields in the given list or select fields from an imported CSV.
-
For Locales, select the languages to export the data in. If you are using an imported CSV file to select the fields to export, you can choose to only export the locales specified in the fields within the CSV file.
-
Click Step 3: Confirm selection.
-
Preview the fields to export and click Start export.
Export Customers
-
Go to Customers > Customer list.
-
Click the Import / Export drop-down and select Export customers.
-
In the dialog, follow these steps:
- Choose to export all Customers, only the ones you have filtered or selected, or only those that match a Query Predicate.
- For File name, enter a name for the file containing the export data.
- For File format, choose to export the data as a CSV or JSON file.
- If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
- To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
Click Step 2: Select content to export.
-
If you're exporting the data as a CSV file, you can select fields in the given list or select fields from an imported CSV.
-
For Locales, select the languages to export the data in. If you are using an imported CSV file to select the fields to export, you can choose to only export the locales specified in the fields within the CSV file.
-
Click Step 3: Confirm selection.
-
Preview the fields to export and click Start export.
Export Custom Objects
You can only export Custom Objects to JSON files.
-
Go to Operations > Export.
-
Click Create new export.
-
In the Export data window, follow these steps:
- For File name, enter a name for the file containing the export data.
- For Query predicate, enter a condition to filter which Custom Objects to export. A Query Predicate is a filter that determines which objects are included in the export. For example, use
container = "container-name"
to only export Custom Objects with the matchingcontainer
value.
-
Click Start export.
Export Discount Codes
-
Go to Discounts > Discount code list.
-
Click the Actions drop-down and select Export discount codes.
-
In the dialog, follow these steps:
- Choose to export all Discount Codes, or only the ones you have filtered or selected.
- For File name, enter a name for the file containing the export data.
- For File format, choose to export the data as a CSV or JSON file.
- If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
- To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
Click Step 2: Select content to export.
-
If you're exporting the data as a CSV file, you can select fields in the given list or select fields from an imported CSV.
-
For Locales, select the languages to export the data in. If you are using an imported CSV file to select the fields to export, you can choose to only export the locales specified in the fields within the CSV file.
-
Click Step 3: Confirm selection.
-
Preview the fields to export and click Start export.
Export Inventory
-
Go to Products > Product list.
-
Click the Actions drop-down and select Export inventories.
-
In the 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 name, enter a name for the file containing the export data.
-
For File format, choose to export the data as a CSV or JSON file.
-
If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
-
To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
-
Click Step 2: Select content to export.
-
If you're exporting the data as a CSV file, you can select fields in the given list or select fields from an imported CSV.
-
For Locales, select the languages to export the data in. If you are using an imported CSV file to select the fields to export, you can choose to only export the locales specified in the fields within the CSV file.
-
Click Step 3: Confirm selection.
-
Preview the fields to export and click Start export.
Export Orders
-
Go to Orders > Order list.
-
Click the Import / Export drop-down and select Export orders.
-
In the dialog, follow these steps:
-
Choose to export all Orders, or only the ones you have filtered or selected.
You cannot export Orders filtered using Advanced Order search. -
For File name, enter a name for the file containing the export data.
-
For File format, choose to export the data as a CSV or JSON file.
-
If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
-
To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
-
Click Continue.
-
Select the fields to be exported and click Start export.
Export Products
-
Go to Products > Product list.
-
Click the Actions drop-down and select Export products.
-
In the dialog, follow these steps:
-
Choose to export all Products, only the ones you have filtered or selected, or only those that match a Query Predicate.Only Query Predicates for Product fields are accepted.
-
For File name, enter a name for the file containing the export data.
-
For File format, choose to export the data as a CSV or JSON file.
-
If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
-
To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
-
Click Step 2: Select content to export.
-
If you're exporting the data as a CSV file, you can select fields in the given list or select fields from an imported CSV.
-
For Locales, select the languages to export the data in. If you are using an imported CSV file to select the fields to export, you can choose to only export the locales specified in the fields within the CSV file.
-
Click Step 3: Confirm selection.
-
Preview the fields to export and click Start export.
Export Product Types
-
Go to Settings > Product types and attributes.
-
Click the Import product types drop-down and select Export product types.
-
In the dialog, follow these steps:
- Choose to export all Product Types, or only the ones you have filtered or selected.
- For File name, enter a name for the file containing the export data.
- For File format, choose to export the data as a CSV or JSON file.
- If you selected CSV as the file format, you can configure the separators for Columns and Decimals.
- To include parent-level information in each row of the CSV file, select Fill all rows with complete data.
-
Click Step 2: Select content to export.
-
If you're exporting the data as a CSV file, you can select fields in the given list or select fields from an imported CSV.
-
For Locales, select the languages to export the data in. If you are using an imported CSV file to select the fields to export, you can choose to only export the locales specified in the fields within the CSV file.
-
Click Step 3: Confirm selection.
-
Preview the fields to export and click Start export.
Download the export files
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.
View 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: