You are here:
CSV File Format for Importing Product Data to B2B Stores
You can import product data into B2B Commerce by creating a CSV file. Specify column headings for Product, Category, and Price Book information. Each row in the file represents a unique product and its variations.
Required Editions
| Column Heading | Column Value |
|---|---|
| Product Name | The name of the product, corresponding to the Product2.Name field. This column is required if you’re creating products. If you’re updating products, you don’t have to include it as long as you uniquely identify the product with SKU, ProductCode, Product Id, or Product ExternalId. |
| Product Description | (Optional) A description of the product, corresponding to the Product2.Description field. |
| Product <FieldName> | The name of a field on the Product2 object. FieldName is the api name of the field. You can use any updateable field on the Product2 object, including a custom field, as a column heading. You can specify as many fields as you want. The import process supports fields with data type checkbox, currency, date, date/time, email, number, percent, phone, picklist, picklist (multiselect), text, text area, text area (long), text area (rich), time, url, or string. The data format in this column depends on the field data type.
For formatting guidelines for the other supported data types, see Custom Field Types. |
| Product Type | The type of the product. You can set the product type if the import creates this product. You can’t update the product type for an existing product. If you try to update the product type for an existing product, you don’t get an error message, but the type isn’t updated. |
| SKU | The product’s stock-keeping unit (SKU) number. SKU is one of the four columns that uniquely identify a product. ProductCode, Product Id, and Product ExternalId are the others. At least one of the four is required in your import file. The SKU column name is equivalent to the Product StockKeepingUnit column name. There’s no difference between them functionally, but SKU has fewer characters to enter. This column corresponds to the Product2.StockKeepingUnit field. You can’t update the product SKU using the import file.p The SKU field is required for several commerce features, such as cart and checkout, and for importing product image references into Salesforce CMS. If you’re creating products, make sure that your import file specifies the SKU. If you’re updating products, the SKU is optional as long as you uniquely identify the product. |
| Slug <language code> | (Optional) The SEO-friendly URL slug for the product in a specified language. Use a separate column for each language you want to specify a slug for.
URL slugs have a character limit of 150 and allow these characters: |
| Media Listing URL | (Optional) URL to the media to use as the listing image for the product. If you’re updating information about the listing media, include the URL, even if you don’t want to change it, because the URL uniquely identifies the media. If you’re updating existing listing media, the fields that you omit default to the values for the existing listing media. If you’re using the enhanced CMS, the URL must use the HTTPS protocol. If you import new media for a product, the import creates an image in the CMS workspace. This process can result in having multiple copies of the same image in the workspace. Note You can't add videos while importing products. If you include a video URL,
it is added as an image during the import process. Important When you publish content in a CMS workspace, it’s shared
to all channels in the workspace, including the public channel. Your content
doesn’t have restricted access. |
| Media Listing Title | (Optional) The title for the listing media. If you include more than 255 characters, the title assigned is the last 255 characters. If you don't include a title, the title is set to the URL path for the media. If the URL path includes more than 255 characters, the title includes only the last 255 characters. |
| Media Listing AltText | (Optional) Alt text for the media. If you don’t include this column, no alt text is assigned to the media. |
| Media Listing Thumbnail | (Optional) URL for thumbnail media for the product. If you don’t include this column, no thumbnail is assigned to the product. Thumbnails aren’t supported for enhanced CMS workspaces. |
| Media Standard URL 1...Media Standard URL 8 | (Optional) You can have up to eight columns that contain the URLs to media associated with the product, labeled Media Standard 1, Media Standard 2, and so on. If you’re updating information about the standard media, include the URL, even if you don’t want to change it, because the URL uniquely identifies the standard media. If you’re updating existing media, the fields that you omit default to the values for the existing media. If you’re using the enhanced CMS, the URL must use the HTTPS protocol. If you import new media for a product, the import creates a new image in the CMS workspace. This process can result in having multiple copies of the same image in the workspace. When you publish content in a CMS workspace, it’s shared to all channels in the workspace, including the public channel. Your content doesn’t have restricted access. |
| Media Standard Title 1...Media Standard Title 8 | (Optional) The title for the media. If you include more than 255 characters, the title assigned is the last 255 characters. If you don't include a title, the title is set to the URL path for the media. If the URL path includes more than 255 characters, the title includes only the last 255 characters. |
| Media Standard AltText 1...Media Standard AltText 8 | (Optional) Alt text for the media. If you don’t include this column, no alt text is assigned to the media. |
| Media Standard Thumbnail 1...Media Standard Thumbnail 8 | (Optional) URL for thumbnail media for the product. If you don’t include this column, no thumbnail is assigned to the product. Thumbnails aren’t supported for enhanced CMS workspaces. |
| Media Standard sortOrder 1...Media Standard sortOrder 8 | (Optional) This value determines the order in which media is displayed on the product detail page. Valid values are 1 through 8. If you don’t include this column, sort order 1 is assigned to the media. Import fails if the same sort order value is assigned to more than one standard media for a product. |
| Media Attachment URL 1...Media Attachment URL 5 | (Optional) You can have up to five columns that contain the URLs to attachments associated with the product, labeled Media Attachment 1, Media Attachment 2, and so on. |
| Media Attachment Title 1...Media Attachment Title 5 | (Optional) The title for the attachment. If you include more than 255 characters, the title assigned is the last 255 characters. If you don't include a title, the title is set to the URL path for the attachment. If the URL path includes more than 255 characters, the title includes only the last 255 characters. |
| Media Attachment AltText 1...Media Attachment AltText5 | (Optional) Alt text for the attachment. If you don’t include this column, no alt text is assigned to the attachment. |
| Media Attachment Thumbnail 1...Media Attachment Thumbnail 5 | (Optional) URL for the thumbnail for the attachment. If you don’t include this column, no thumbnail is assigned to the attachment. Thumbnails aren’t supported for enhanced CMS workspaces. |
| ProductCode | The product’s unique Product Code. ProductCode is one of four columns that uniquely identify a product. SKU, Product Id, and Product ExternalId are the others. At least one of the four is required in your import file. This column corresponds to the Product2.ProductCode field. If you identify an existing product using a SKU column, you can update the Product Code to a new value that you specify in this column. The ProductCode field doesn’t enforce a unique constraint. If you use this column to identify products, it’s possible that duplicate records will be created or if there are already records with duplicate values, any one of the records will be updated. |
| Product ExternalId | The product’s External ID. Product ExternalId is one of four columns that uniquely identify a product. SKU, Product Id, and ProductCode are the others. At least one of the four is required in your import file. This column corresponds to the Product2.ExternalId field. If you identify an existing product using either a SKU or a ProductCode column, you can update the External ID to a new value that you specify in this column. The Product ExternalId field doesn’t enforce a unique constraint. If you use this column to identify products, it’s possible that duplicate records will be created or if there are already records with duplicate values, any one of the records will be updated. |
| Product Id | The Product ID. Product Id is one of four columns that uniquely identify a product. SKU, Product ExternalId, and ProductCode are the others. At least one of the four is required for your import file. This column corresponds to Product2.Id. The Product ID is assigned automatically when the product is created. You can’t set it to a specific value, and you can’t change it after the product is created. |
| Product Family | (Optional) A grouping for products, corresponding to the Product2.Family field. Group products any way you like. You can use product family values as filters for search results. |
| Product isActive | (Optional) A value indicating if the product is active, corresponding to the
Product2.IsActive field. By default, newly created products are inactive. To make a
product active, specify true in this column. To make a product
inactive, specify false, leave the column blank, or omit the
column. |
| Category 1... Category 5 | (Optional) You can have up to five category columns, labeled Category 1, Category 2, and so on. You can’t update existing categories for a product. You can only add new categories. For the first category, you can use the label Category without the number 1. In a category column, you can specify a nested category, using the / character to separate the levels. For example, Products/Machines/Espresso. |
| Entitlement 1... Entitlement 50 | (Optional) The name of an entitlement policy to associate with the product. You can specify up to 50 entitlement policies in columns labeled Entitlement 1, Entitlement 2, and so on. You can’t update existing entitlement policies for a product. You can only add new entitlement policies. Create the entitlement policies before you import the CSV file. For more information, see Create an Entitlement Policy. For the first entitlement policy, you can use the label Entitlement without the number 1. |
| Price <values> | To specify prices, use a column labeled Price, followed by optional values. The import process determines where to add the prices based on the values, if any, that you include in the column label.
|
| Variation AttributeSet | The attribute set for the variations of the product. Use the Variation AttributeSet API name for the column heading. This column is required if you specify product variations. Create the attribute set before importing the CSV file. For more information, see Create Attributes for Product Variations in B2B Stores. |
| Variation Parent <identifier> | The parent product for the variation. In the column heading, include an identifier to indicate the value that you’re using to identify the parent. Valid column headings are:
The parent product must exist or be specified in the CSV file before the variations are created. |
| Variation Attribute Name 1... Variation Attribute Name 5 | The API name of a variation attribute in the variation attribute set. A variation attribute is a custom field on the Product Attribute object, so __c is appended to the name, for example, Bag_Size__c. At least one Variation Attribute Name column is required for each attribute set, labeled Variation Attribute Name 1. You can have up to five attribute name columns, labeled Variation Attribute Name 2, Variation Attribute Name 3, and so on. You must create the variation attributes for importing the CSV file. For more information, see Create Attributes and Attribute Sets for Product Variations. |
| Variation Attribute Value 1...Variation Attribute Value 5 | The value of the attribute specified in the attribute name column. This column is required for each Variation Attribute Name column. |

