B2C Commerce custom attributes are defined through the platform ' smetadata system, not dynamically declared by application JavaScript. Therefore, the first step is to create the required attribute definition in Business Manager on the appropriate extensible system object or custom-object type.
Salesforce documents the process under Administration > Site Development > System Object Types or Custom Object Types. The developer selects the target object, opens Attribute Definitions, clicks New, and defines the attribute ID, display name, and data type.
Once the attribute exists, it can be assigned to an attribute group where required for Business Manager visibility, populated through Business Manager or integrations, and accessed through the object ' scustomproperty in application code.
Option B is incorrect because source code cannot create an undeclared persistent custom attribute merely by referencing a property name. Option C also comes later because application logic needs the metadata definition to exist before reliably reading or writing the value.
The type and characteristics of the attribute should be designed carefully because changing an existing attribute ' s type can cause stored values to be lost.
Study Guide reference:Data Management Using Business Manager Usage — System Object Types, Custom Object Types, Attribute Definitions, attribute groups, and custom metadata.
===============