Feature Pack 5 or later

Loading values for single and multiple value attributes

You can configure the loading process for Catalog Upload and the Data Load utility to load data separately for both single and multiple value descriptive attributes. By separating these load processes, you can ensure that the values for your single value and multiple value attributes are updated accurately.

Feature Pack 8You can also use the Data Load utility to load values for attributes with assigned values and reuse the values when the same value is needed for multiple catalog entries. By sharing the assigned values across catalog entries when you load attribute assigned values, you can reduce the number of duplicate values that the utility creates in the database. For more information, see Reuse attribute assigned values with the Data Load utility.

If your site is configured to support multiple value attributes, when you load values for a descriptive attribute with Catalog Upload or the Data Load utility, you are loading multiple values. The loaded values are added to existing attribute values. The loaded values do not replace existing values.

The support for loading multiple value data for attributes is controlled by the following configuration property:
<_config:property name="supportMultipleValuesForADAttributes" value="true" />

When this configuration property is set to true, any new value that you load for an attribute are inserted as multiple values for the attribute instead of replacing the existing value or values. To replace an existing value, you must include the value in your input file and set the value to be deleted by setting the value in the Delete column to be 1.

For example, in the following CSV file, the value of 75 for the attribute Warranty Term is set to be deleted.
CatalogEntryAttributeDictionaryAttributeRelationship,,,,,,
PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete
Product1,WARRANTY_TYPE,,Limited,Descriptive,,0
Product1,WARRANTY_TYPE,,Comprehensive,Descriptive,,0
Product1,WARRANTY_TERM,,75,Descriptive,,1
Product1,WARRANTY_TERM,,90,Descriptive,,0

If your store uses only single value attributes, you can change the setting for this property to false. This setting causes existing values to be replaced with the new values that you load. For more information about changing this configuration property, see Catalog load configuration properties

If your descriptive attributes include both multiple value and single value attributes, you can configure your load processes to change this behavior when you load data for single value attributes. With this configuration, you can load information about multiple value attributes in one input file and load information for single value attributes in a different file. This configuration ensures that when you update a value for a single value attribute, the existing value is replaced with the new value instead of adding the new value to the existing value. To configure your load process to load two separate files for your attribute value information:
  • Edit the business object configuration file for your attribute value information. You must separate the single and multiple value attributes to be different load items. The setting for the supportMultipleValuesForADAttributes configuration property applies to all objects for a load item. Within each load item, you can include the supportMultipleValuesForADAttributes configuration property and set it to a different value for each load item.
    For example, in the default sample business object configuration file for loading attribute value information, wc-loader-catalog-entry-AD-attribute-relationship.xml, look for the following code:
    <_config:LoadItem name="CatalogEntryAttributeDictionaryAttributeRelationship" businessObjectConfigFile="wc-loader-catalog-entry-AD-attribute-relationship.xml" >
         <_config:DataSourceLocation location="${CatalogEntryAttributeDictionaryAttributeRelationship}" />
    </_config:LoadItem>
    This attribute value information load item can be separated into the following two load items within an edited version of the provided sample business object configuration file:
    • Attribute value information load item for multiple value attributes with the supportMultipleValuesForADAttributes configuration property set to true:
      <_config:LoadItem name="CatalogEntryAttributeDictionaryAttributeMultipleRelationship" businessObjectConfigFile="wc-loader-catalog-entry-AD-attribute-relationship.xml" >
           <_config:property name="supportMultipleValuesForADAttributes" value="true" />
           <_config:DataSourceLocation location="${CatalogEntryAttributeDictionaryAttributeMultipleRelationship}" />
      </_config:LoadItem>
      
    • Attribute value information load item for single value attributes with the supportMultipleValuesForADAttributes configuration property set to false:
      <_config:LoadItem name="CatalogEntryAttributeDictionaryAttributeSingleRelationship" businessObjectConfigFile="wc-loader-catalog-entry-AD-attribute-relationship.xml" >
           <_config:property name="supportMultipleValuesForADAttributes" value="false" />
           <_config:DataSourceLocation location="${CatalogEntryAttributeDictionaryAttributeSingleRelationship}" />
      </_config:LoadItem>
  • Split your input file into two separate input files. Change the keyword for your input files to match the new load item names in your business object configuration file.
    For example, the following CSV formatted input file contains attribute value information for both a single value attribute, WARRANTY_TERM and for a multiple value attribute, WARRANTY_TYPE:
    CatalogEntryAttributeDictionaryAttributeRelationship,,,,,,
    PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete
    Product1,WARRANTY_TYPE,,Limited,Descriptive,,0
    Product1,WARRANTY_TYPE,,Comprehensive,Descriptive,,0
    Product1,WARRANTY_TERM,,90,Descriptive,,0
    Loading this file with the default sample business object configuration file results in the following changes:
    • The attribute WARRANTY_TYPE having two new values, Limited, and Comprehensive, in addition to any existing values.
    • The attribute WARRANTY_TERM having a value, 90, in addition to any existing values.
    This input file, however, can be split into two input files and associated with different load items:
    • Attribute value information input file for multiple value attributes:
      CatalogEntryAttributeDictionaryAttributeMultipleRelationship,,,,,,
      PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete
      Product1,WARRANTY_TYPE,,Limited,Descriptive,,0
      Product1,WARRANTY_TYPE,,Comprehensive,Descriptive,,0
      
      Loading this file results in the attribute WARRANTY_TYPE having two new values, Limited, and Comprehensive, in addition to any existing values.
    • Attribute value information input file for single value attributes:
      CatalogEntryAttributeDictionaryAttributeSingleRelationship,,,,,,
      PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete
      Product1,WARRANTY_TERM,,90,Descriptive,,0
      Loading this file results in the attribute WARRANTY_TERM having any existing values that are replaced with the new value 90.