Overview

Product attributes are specific product descriptors that define characteristics such as size, color, or material. This document covers the process of importing multiple product attributes using a CSV file. You also have the option to add product attributes manually.

CSV File Guidelines

Product attributes can be imported using CSV files exclusively, as fabric doesn’t support other data or file formats. Here are some essential points to keep in mind:

  • The headers in the first row of the CSV file should match the attribute titles.
  • While attribute titles aren’t case-sensitive, maintaining case consistency with the original attribute titles is recommended.
  • Empty rows and columns are ignored.
  • fabric recommends downloading the template file to serve as a guide when creating your own CSV file for import, minimizing errors during the process.

Attribute data formatting

When preparing your CSV file for import, ensure that the product attribute data format aligns with the column requirements. Different columns have specific data input requirements:

AttributeDescription
Attribute TitleThe name of the attribute.
Type of AttributeSpecifies the attribute type, such as text, number, date, boolean, serial, or list of values, which is also known as list of options.
Description (Optional)Provides additional details about the attribute.
DecimalIndicates if the attribute allows decimal values. Valid values are true if decimals are allowed or false if only whole numbers are allowed. Applicable only to number-type attributes. The default value is true, and you must ensure that the number is in decimals.
Min (Optional)Defines the minimum value for validation. Applicable only to number-type attributes.
Max (Optional)Defines the maximum value for validation. Applicable only to number-type attributes.
Date FormatSpecifies the required date format, such as MM/DD/YYYY, MM-DD-YYYY, DD/MM/YYYY, DD-MM-YYYY, YYYY/MM/DD, or YYYY-MM-DD. This is mandatory for date-type attributes; otherwise, the attribute can’t be imported.
Calculation Formula (Optional)JavaScript formula used to calculate the attribute value.
Validations Formula (Optional)JavaScript formula used to define business validation rules for the attribute.
MandatorySpecifies whether the attribute is required. Valid values are true if the attribute is mandatory or false if it’s optional.
Start WithDefines the starting value for a serial-type attribute. Applicable only to serial-type attributes.
Increment bySpecifies the increment value for a serial-type attribute.
Options Select Type (List of Value)Determines if the attribute is a list of values. Valid values are true if the attribute is a list of values or false if it’s not. To specify options, use additional columns, such as Value 1, Value 2, Value 3, etc.

The following table provides an example for a product attribute import CSV file:

Attribute TitleType of AttributeSub TypeDescriptionDecimalMinMaxDate FormatCalculation FormulaValidation FormulaMandatoryStart WithIncrement byOptions Select TypeValue 1Value 2Value 3Value 4
On SaleBOOLEANTRUE
Description 1TEXTSMALL_TEXTFALSE
Description 2TEXTTEXT_AREATRUE
Description 3TEXTHTMLFALSE
ColorOPTIONS

Prerequisites

Ensure that you have access to fabric Product Catalog in Copilot.

Procedure

You can’t import CSV files with duplicate names. Ensure that every file you import has a unique filename.
  1. In the left menu, click Product Catalog > Attributes > Product. The Product Attributes page is displayed.
  2. Click Import. The Import CSV file window is displayed, providing a link to download an example template for the CSV file.
  3. To import a CSV file, choose one of the following options:
    • Drag and drop the CSV file into the window.
    • Click Select a File from your computer.
  4. Click Import file. The CSV file is imported, and the product attributes are added.

Error messages

Error MessageDescription
File header not presentA column header in the CSV file is incorrect.
INVALID_ATTRIBUTE_TYPEAn invalid attribute type was provided during import. Supported types are:
  • TEXT
  • BOOLEAN
  • OPTIONS
  • SERIAL
  • DATETIME
  • NUMBER
ATTRIBUTE_TYPE_NOT_FOUNDAn the attribute type wasn’t mentioned in the CSV file during import.
Duplicate headers found [“Sub Type”]Duplicate columns are present in the CSV file.
Attribute not found in formula definition.An invalid attribute was provided for a custom formula during import.
At least one of the properties in startWith or increment are missing.A startWith or increment value was missing for a serial type attribute during import.
acceptedValues must be unique and can’t be emptyDuplicate or empty values were present for a list of values attribute during import.