Pages

Tuesday, February 26, 2013

Loading Attribute Dictionary Attributes

Create two csv files as below

AttributeDictionaryAttributeAndAllowedValues.csv 

This contains the attribute name and allowed values AttributeDictionaryAttributeAndAllowedValues,,,,,,,,,,,,
Identifier,Type,AttributeType,Sequence,Displayable,Searchable,Comparable,Name,AllowedValue1,AllowedValue2,AllowedValue3,AllowedValue4,AllowedValue5,Delete

DRColour,STRING,AllowedValues,1.0,true,true,true,Colour,Black,Silver,,,,
DRTuner,STRING,AllowedValues,2.0,true,true,true,Tuner,Single tuner USB HDD PRV,,,,, 
  • The first two lines constitute the header.
  • The first column is an identifier for the attribute.
  • The 2nd column defines the type of the attribute value (STRING, DECIMAL, WHOLE NUMBER)
  • The 3rd column specifies the attribute type. Two types are possible (AllowedValues, AssignedValues). Using AllowedValues, business user can select one of the available values for an attribute. Using AssignedValues, business users can enter the value for the attribute. AllowedValues can be reused and assigned to a different catentry. This column will in most cases be AllowedValues.
  • The 4th Column is Sequence which defines the ordering of attributes. (1.0, 2.0, etc)
  • The 5th, 6th and 7th columns are the displayable, searchable and comparable field which is set to either true/false.
  • The 8th column defines the name of the attribute (like Colour, Size, etc)
  • Columns from 9 onwards to 13 represent the possible allowed values for an attribute.
  • Column 14 defines if the attribute has to be deleted by setting the Delete to 1 

CatalogEntryAttributeDictionaryAttributeRelationship.csv 

CatalogEntryAttributeDictionaryAttributeRelationship,,,,,,
PartNumber,AttributeIdentifier,ValueIdentifier,Value,Usage,Sequence,Delete
P_NZ40006688,DRColour,Black,,Descriptive,1,
P_NZ40006688,DRTuner,Single tuner USB HDD PRV,,Descriptive,2,
  • The first two lines constitute the header.
  • The 1st column defines the partnumber of the catentry to which an attribute is to be associated
  • The 2nd column is an identifier that identifies the attribute that needs to be associated with the catentry
  • The 3rd column is the identifier that identifies the value (an attribute can have multiple values) that needs to be associated with a catentry
  • The 4th column represents the value. (can be same as value identifier or empty)
  • The 5th Column defines the usage which can either be “Descriptive” or “Defining”. For SKU’s use Defining
  • The 6th column defines whether the association has to be deleted. Specifying 1 will delete any existing row. This can be 0 or empty for loading attributes.

TABLES AFFECTED 

ATTR – Contains the attribute definition
ATTRVAL – contains the attribute values
CATENTRYATTR – Contains the link between the catentry and the attribute

Note: These attributes are loaded to the store that owns the master catalog. In case of extended sites store it is the ExtendedSites CAS (Master catalog store entity)

No comments:

Post a Comment