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 Product Information Management (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 Configured Commerce.
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 the PIM lets you identify the name/value pair columns, map the values from the name columns, and import the data properly.
For example, you have a table that looks like this:
Using the standard mapping during the import, these column headers will map to the PIM properties you have already defined.
Another example is a table that looks like this:
|Product Number||Attribute Name 1||Attribute Value 1|
You would not want the column header Attribute Name to map to a property; 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 the 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|
When you import this feed using the name/value pair mechanic, the 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 Product Information Management article.
- Click Imports.
- 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.
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.