File Formats

B2C Commerce only accepts XML import files whose format is determined by B2C Commerce schema files. Older versions of B2C Commerce allowed preprocessing of comma-separated value (CSV) files, but this is no longer supported.

Although you can create scripts using the CSVFileReader class to do a translation between CSV and XML, using scripts isn't recommended. Instead, Salesforce recommend that you use a third-party program to process .csv files into the required XML format. It's faster and more efficient to transform a file using a .NET or a Java platform with a large amount of memory allocated to the processing.

B2C Commerce-Produced File Formats

B2C Commerce always exports files in XML format, except for coupon codes, which export to CSV format.

File Transfer

Before you can import a file, you have to transfer it from a merchant system to a B2C Commerce instance. After you export a file, you have to transfer it from the B2C Commerce instance to your backend system.

You can transfer files using WebDAV, FTP, or HTTPS.

Site Import and Export File Format for Import

If you want to create a .zip file for import using Site Import and Export:
  1. Create a folder.
  2. Inside the folder, add the xml files you want to import. The xml files must have the standard name for importing objects of that type and conform to the schema for the object type.
  3. Add a text file that contains version information in the following format:
    ###########################################
    # Generated file, do not edit.
    # Copyright (c) 2022 by Salesforce, Inc.
    ###########################################
    22.5.0
    .
  4. Zip up the folder and give it the same name as the folder it contains.
    Note: If you are using a Mac, zip up the folder on the command line and don't use the Compress Folder functionality in the right-click menu. Compressed folders are treated as an invalid format by B2C Commerce.