Attribute value type selection for business requirements
Key Takeaway
Match the Value Type to what the data really is, such as Money for monetary amounts. Choose it up front, because changing it later deletes the attribute's existing values.
When you add a custom attribute to an existing system object type, such as Product or CustomerAddress, you must choose a Value Type for it. The Value Type decides what data the attribute can hold and which extra settings and validation appear. The Value Type also decides how merchants edit the attribute in Business Manager and how your script code reads and writes it. Choose carefully up front, because changing the type later wipes out the attribute's existing values.
How to add a custom attribute to a system object type
- In Business Manager, go to Administration > Site Development > System Object Types.
- Select the object type, such as Product or CustomerAddress.
- Open the "Attribute Definitions" tab and click "New".
- Enter an "ID", a "Display Name" and a "Value Type", then click "Apply". The Display Name is the name shown in Business Manager and in the storefront.
- Fill in the extra fields that appear. Which fields appear depends on the Value Type you chose.
- On the "Attribute Grouping" tab, assign the attribute to a new group or an existing one. A new attribute on a system object only appears on a Business Manager page if it belongs to an attribute group.
Each object type has a cap on its number of custom attribute definitions. Localizable custom attribute definitions count toward that cap. For example, the cap is 500 for Product (including SKUs) and 50 for most other extensible system objects.