Skip to content

CSV Examples

To gain a better understanding of how to import items into Bizzkit PIM using the CSV format, here are some simple examples. Please refer to the CSV specification for more information.

Products

Here are some examples of creating and modifying products through the importer.

Getting started

When importing products, use the UniqueName header to either update an existing product or create a new one. Here is a simple example of creating or updating a product called PRODUCT1 with values for two attributes:

UniqueName;SINGLE_STRING;SINGLE_INT
PRODUCT1;lorem;42

Merge and override mode

In Merge mode (UI and API), using the NULL value will ignore updating a specific attribute. Given two attributes called SINGLE_STRING and SINGLE_INT, the following CSV will create PRODUCT2 with values for both SINGLE_STRING and SINGLE_INT, whereas PRODUCT3 will only have a value for SINGLE_STRING:

1
2
3
UniqueName;SINGLE_STRING;SINGLE_INT
PRODUCT2;lorem;42
PRODUCT3;ipsum;NULL

In Override mode (API only), using the NULL value will assign a null value to the specific attribute.

Simple data types

Given simple data types like PString, PBoolean, PDateString, and PInt32, an import can be defined as:

UniqueName;SINGLE_BOOLEAN;SINGLE_DATETIME;SINGLE_INT;SINGLE_STRING
PRODUCT4;True;2024-06-04T13:55:00.0000000Z;42;Lorem Ipsum

Segmented data types

When importing segmented data, you can use the :C, :T, :M, and :D syntax where C = Channel, T = Translation culture, M = Market, and D = Device. Here is an example of importing data to the Translation culture and Channel dimension:

UniqueName;SINGLE_CHANNELSTRING:CCHANNEL2;SINGLE_CHANNELSTRING:Default;SINGLE_TRANSLATEDSTRING:Default;SINGLE_TRANSLATEDSTRING:Tda;SINGLE_TRANSLATEDSTRING:Ten
PRODUCT5;Channel 2 text;Default channel text;Default text;Danish text;English text

Note the use of :CCHANNEL2, :Tda, :Ten, and Default for the default value.

Multi-value

When importing data to multi-value attributes, you can use the array syntax [] to specify the attribute value by index (zero-based). Here is an example of importing two values to a multi-valued PString and PInt32 attribute:

UniqueName;MULTI_INT[0];MULTI_INT[1];MULTI_STRING[0];MULTI_STRING[1]
PRODUCT6;42;84;abc;def

Multi-field

When importing data to a single-valued multi-field attribute, you can use the slash syntax. Here is an example of importing values to a multi-field attribute:

UniqueName;MULTI_FIELD_SINGLE_VALUE/VALUE1;MULTI_FIELD_SINGLE_VALUE/VALUE2;MULTI_FIELD_SINGLE_VALUE/VALUE3;MULTI_FIELD_SINGLE_VALUE/VALUE4
PRODUCT7;42;Lorem;True;2024-06-04T15:12:00.0000000Z

Note the use of / and then the system name of the field.

Global lists

When importing data with an attribute related to a data source (global list), you can import the key or value of the global list item. Given a global list with the key/values of:

Key Value
ITEM1 Item #1
ITEM2 Item #2

Here is an example of using the key for both a single and multi-valued attribute:

UniqueName;$SINGLE_GLOBALLIST;$MULTI_GLOBALLIST[0];$MULTI_GLOBALLIST[1]
PRODUCT8;ITEM1;ITEM1;ITEM2

Note the use of $ in the header to indicate that the value represents the key.

Here is the same example, but this time the importer uses the value because the $ before the attribute name is omitted.

UniqueName;SINGLE_GLOBALLIST
PRODUCT9;Item #1

Master and variants

When adding products in a master/variant hierarchy, you can use the VariantOfMaster header. Here is a simple example:

1
2
3
4
UniqueName;VariantOfMaster;SINGLE_STRING
PRODUCT10;;a
PRODUCT11;PRODUCT10;b
PRODUCT12;PRODUCT10;c

This will create three products with a simple attribute where PRODUCT11 and PRODUCT12 are variants of PRODUCT10.

Product placement

Using the PrimaryPlacementCategory (and AdditionalCategoryPlacement_*n if needed) header, you can place a product in a hierarchy node.

Given a product hierarchy as follows:

1
2
3
4
5
6
7
DEMO_2_LOREM
  - DEMO_2_LEAF1
    - DEMO_2_LEAF11
    - DEMO_2_LEAF12
  - DEMO_2_LEAF2
    - DEMO_2_LEAF21
    - DEMO_2_LEAF22

Here are simple examples of placing products in a category:

UniqueName;PrimaryPlacementCategory
PRODUCT13;DEMO_2_LEAF11

This will place PRODUCT13 in DEMO_2_LEAF11 as primary category.

UniqueName;PrimaryPlacementCategory;AdditionalCategoryPlacement_1
PRODUCT14;DEMO_2_LEAF11;DEMO_2_LEAF12

This will place PRODUCT14 in DEMO_2_LEAF11 as primary category and in DEMO_2_LEAF12 as additional category.

Global list items

To import items to an existing global list, you can use the /api/global-lists/import/csv endpoint. Here is a simple example of adding items to the global list named LIST1:

1
2
3
4
UniqueName;Value
LIST1;Item #1
LIST1;Item #2
LIST1;Item #3

When importing data using this format, the system name for every item is generated automatically. See CSV reference for more information.

Hierarchies

Importing hierarchies is only possible through the API and for CSV import you can use the /api/product-hierarchies/import/csv endpoint. Here is an example of importing a simple hierarchy to the existing root node called TOYS:

1
2
3
4
5
6
7
UniqueName;Name;PrimaryPlacementCategory
BOYS;Boys;TOYS 
GIRLS;Girls;TOYS
BOYSLT10;Boys <= 10;BOYS
BOYSGT10;Boys > 10;BOYS
GIRLSLT10;Girls <= 10;GIRLS
GIRLSGT10;Girls > 10;GIRLS

This will add sub nodes to the TOYS hierarchy as follows:

1
2
3
4
5
6
7
TOYS
├── BOYS (Boys)
   ├── BOYSLT10 (Boys <= 10)
   └── BOYSGT10 (Boys > 10)
└── GIRLS (Girls)
    ├── GIRLSLT10 (Girls <= 10)
    └── GIRLSGT10 (Girls > 10)

Info

Please note that the root node of the hierarchy must exist before importing items. Use the UI or /api/product-hierarchies endpoint.

Bundles

To import bundles, use the /api/products/bundles/import/csv endpoint. Here is an example of importing two (existing) products called MYPRODUCT2 and MYPRODUCT3 to one (existing) product called MYPRODUCT1.

1
2
3
UniqueName;ItemUniqueName;ItemOperation;Note;Amount
MYPRODUCT1;MYPRODUCT2;AddOrUpdate;My note;1.0
MYPRODUCT1;MYPRODUCT3;AddOrUpdate;My note;1.5

Info

Use Remove as ItemOperation if you need to remove a bundled item.