Import products into Optimizely PIM using the Affiliated Distributors (AD) data feed
Affiliated Distributors (AD) provides an easy and cost-effective way to support distributors with consumerized product data via a data feed. If you are importing data that you received from a feed, such as the Affiliated Distributors or Trade Service feeds, you may encounter data with name/value pairs.
If you are not an Optimizely PIM customer, you need to follow the steps in the Connectors for the Affiliated Distributors (AD) Data Feed article to set up your AD Data Feed to work with Optimizely B2B Commerce.
Name/value pairs
Name/value pairs refer to data stored in two separate columns, one entitled [name] and the other called [value]. The [name] column holds all property names, while the [value] column holds all property values. This differs from a standard spreadsheet format where each column header indicates the property name with the values in the cells below it.
The name/value format is used to reduce the number of columns necessary in spreadsheets with thousands of products that have hundreds of attributes. The name/value pair mechanic in PIM lets you identify the name/value pair columns, map the values from the name columns, and import the data properly.
For example, let's say we have a table that looks like this:
Product Number | Color | Size | Location |
0001 | Blue | Small | United States |
In this example, you can follow the standard import process. Using the standard mapping during the import, these column headers will map to the PIM properties you have already defined.
Now let's look at another table:
Product Number | Attribute Name 1 | Attribute Value 1 |
0001 | Color | Blue |
0001 | Size | Small |
0001 | Location | United States |
In this example, you would not want the column header Attribute Name to map to a property; instead, you would want the property to map to the values in the Attribute Name column. The name/value pair mechanic will help you map the values in the Attribute Name column to properties in PIM.
In the AD feed in particular, you may see data that looks similar to this:
Product Number | Attribute Name 1 | Attribute Value 1 | Attribute Unit of Measure 1 |
0001 | Color | Blue | |
0001 | Size | 24 | in |
0001 | Location | United States |
When you import this feed using the name/value pair mechanic, PIM will concatenate the Attribute Value and Attribute Unit of Measure column so the "inches" identifier will automatically be paired with the value for the Size attribute.
Work with name/value pairs in the import process
On the second step of the typical import process, you will see an option to indicate that your file has name/value pairs. From this point, your import will proceed slightly differently. To complete a standard import, go to the Import Products into Optimizely PIM article.
- From PIM, click Imports.
- In the upper right corner, click the New Import icon.
- Select the file with name/value pairs you want to import.
- Complete the first step of the import as you would a typical import. When finished, click Continue.
- On the next step, select the File includes name/value pairs option.
- Choose the first name field and value field from the drop-down lists.
- The name/value pair preview table will appear below the drop-down lists. If there is no name/value pair match for those combinations, you will not see a table.
- If the spreadsheet includes a Unit of Measure column for each name/value pair, click the plus icon next to the value drop-down and choose the first UOM column from the second value drop-down.
- Click Save. The unique values from the name columns will appear in the Selected Fields column with an NV appended to the beginning of their name.
- Complete the rest of the second step of the import as you would in a standard import and click Continue.
- On the next step, map your pre-created PIM properties to the name/value results from the previous step, along with any other column headers you need to map. This works in the same way as mapping properties with a standard import.
- Complete the rest of the import as you would a standard import.
When importing multiple Name/Value pairs you should add additional columns for the attribute name/value pairs so that there is a single row for each product.
Be sure to validate your results once the import is complete. Ensure that the correct values have mapped to the right properties in your site by reviewing several products added with your import.