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.
You 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.
<_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
.
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
- 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 thesupportMultipleValuesForADAttributes
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:
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:<_config:LoadItem name="CatalogEntryAttributeDictionaryAttributeRelationship" businessObjectConfigFile="wc-loader-catalog-entry-AD-attribute-relationship.xml" > <_config:DataSourceLocation location="${CatalogEntryAttributeDictionaryAttributeRelationship}" /> </_config:LoadItem>
- 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>
- Attribute value information load item for multiple value attributes
with the
- 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
:
Loading this file with the default sample business object configuration file results in the following changes: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
- The attribute
WARRANTY_TYPE
having two new values,Limited
, andComprehensive
, in addition to any existing values. - The attribute
WARRANTY_TERM
having a value,90
, in addition to any existing values.
- Attribute value information input file for multiple value attributes:
Loading this file results in the attributeCatalogEntryAttributeDictionaryAttributeMultipleRelationship,,,,,, PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete Product1,WARRANTY_TYPE,,Limited,Descriptive,,0 Product1,WARRANTY_TYPE,,Comprehensive,Descriptive,,0
WARRANTY_TYPE
having two new values,Limited
, andComprehensive
, in addition to any existing values. - Attribute value information input file for single value attributes:
Loading this file results in the attributeCatalogEntryAttributeDictionaryAttributeSingleRelationship,,,,,, PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete Product1,WARRANTY_TERM,,90,Descriptive,,0
WARRANTY_TERM
having any existing values that are replaced with the new value90
.
- The attribute