Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Attributes vs. Fields

          Attributes vs. Fields

          When defining product properties, you can use attributes or fields. The choice depends on how you plan to implement property data during order capture.

          • Attributes: A list of all attributes and their associated Attribute Codes assigned to the Product2 Object.

            If a data element, such as a SKU number, is intended to be common to all products across your product catalog, then you should create a new field on your product object. Typically, adding new fields requires Salesforce system admin privileges.

          • Fields: A list of all fields and their associated Field API name for the Product2 Object.

            If the data element is intended to be specific to a product, or class of products, then you should create an attribute, such as download speed. At runtime, attributes are visible to customers in Industries Cart and can be used to filter the catalog and provide configuration capabilities. Adding attributes requires access to the Product Console.

          The fundamental differences between fields and attributes are:

           

          Fields

          Attributes

          Where the value is created?

          Created in Salesforce Setup on a Salesforce object.

          Field example: Orderable.

          In attribute/category interface.

          Attribute example: Color.

          Where the value is stored (including metadata, such as default value, picklist, etc.)?

          Each field value is stored in a separate Salesforce field. Related metadata is stored separately in Salesforce. For example, if you create 15 fields, there will be 15 field records in Salesforce and each record will store its value.

          Each attribute value and its’ metadata (including picklists, default value, etc.) is stored in a JSON blob (i.e. in a FIELD in JSON). For example, if you create 15 attributes, all 15 attributes and all their metadata will be stored in one JSON blob which is stored in one Salesforce field.

          Who can create?

          Requires Salesforce System Administrator privileges.

          A Product Manager with sufficient privileges.

          Is searchable at runtime?

          Each field is stored in a separate Salesforce database field and is easily searchable.

          Since all attribute data is stored in one JSON blob, expect performance implications when using search.

          When to use at design-time to define Product2 properties

          Use for commonly used properties that are searchable and runtime (order time) configurable.

          Use for properties that are sparely used.

          When to use at runtime to define asset properties

          Do not use.

          Use attributes only. For example, IMEI number, VIN #, etc.

           
          Loading
          Salesforce Help | Article