Dynamic attributes in Storefront 365 with Dynamics 365 for Finance and Operations
For Partners
How to use dynamic attributes
Dynamic attributes are created in Dynamics 365 for Finance and Operations and defined on products and hierarchy nodes. Attributes are used to add information to products and variants and are used in the retail channels for simple merchandizing purposes. By adding merchandising details to products and variants, product information can be provided that will better serve the customer. Attributes may be exposed on the online channel or may be used for filtering and similar programmatic functions. Product attributes can be applied to products even if they are not included in a retail product catalog.
Attributes are defined in Dynamics 365 for Finance and Operations by defining Attribute Types and Attribute Groups. The attribute groups contain one or more attributes, and each attribute is configured with a specific attribute type. Attribute types and attribute groups are defined in the Product Information Management module in Dynamics AX. Attributes are applied to a retail channel or a retail hierarchy to assign the attributes to all products in the channel or the hierarchy node.
Dynamics 365 for Finance and Operations supports Retail Attributes that may be assigned to customers as Customer Attributes. Storefront 365 starter site, starting with release 8.0, supports customer attributes.
How to create dynamic attributes
Attributes are created in the Product Information Module and added to an attribute group. The attribute group is then added to a Retail Hierarchy or a Retail channel.
The recommended approach is to add attributes to retail hierarchies. Assigning the attributes to a retail hierarchy will assign the attributes to all products in the hierarchy node and will be available on the products in all channels and in the Product Information Management module.
Customer attributes are assigned to all customers within a legal entity. One and only one attribute group may be used as Customer Attributes. The attribute group to use is defined in the retail module in the Headquarter Setup/Retail Parameters.
Assigning attributes to a channel creates channel attributes with values for a specific channel. The channel attributes are used to channel specific information.
When attributes have been added, the changes must be published using the Publish Channel Updates button. When published, the jobs 1070 and 1150 needs to be executed and when they are applied to the retail online channel, the Storefront 365 jobs must be executed to update the new attributes in Episerver Commerce Catalog and the search engine.
Note that the product data model in Storefront 365 needs to be updated before the catalog import is executed to map the new and changes attributes to the Episerver Commerce Data Model used in the web site.
Why use dynamic attributes?
Dynamic attributes are a simple way to add properties to products. Attributes can be added to single products, and to all products in a category that may be inherited to products in subcategories. Attributes can also be added to a category to extend the category properties, to a channel to extend the channel attributes, and to a sales order to extend the sales order created with extra information.
Normally product attributes are defined on a category node so that all products in the node and sub-nodes inherit the attributes. The attributes are assigned values in a Catalog that are available in the retail channels when published.
Product attributes are used in three major ways.
- They are used by business logic in the retail channel and is not visible to the visitor of the web site or shop.
- They are used in the webshop user interface to enhance the customer experience by presenting information about a product.
- They are used both in business logic and in the webshop user interface.
An example of an attribute used for the user interface is the attribute New that is part of the SharePointProvisionedProductAttributeGroup. The attribute indicates if a product should be considered as a new product in the assortment, or not. If the attribute value is True, then the product may be displayed with an overlay indicating that the product is new. The overlay business logic is created in Episerver to use the attribute value.
SharePointProvisionedProductAttributeGroup
The SharePointProvisionedProductAttributeGroup is a predefined group used by Microsoft Dynamics e-commerce platform. The group contains attributes added to enable simple merchandizing features. The attributes are assigned to the products, and to the variants of the products.
Note that the SharePointProvisionedProductAttributeGroup is required by Microsoft Dynamics e-commerce platform in all online retail channels, or else the publishing of the retail online channel will fail.
Storefront 365 imports the attributes but do not use them since we believe that there is a much better approach to add merchandizing to the online retail channel using behavioural analytics and relevance that is calculated on demand by 3rd party software, such as Episerver Find and eSales from Apptus.
By using relevance engines, the calculations for recommendations, sort orders and placements of products and ads, are made instantly and based on the current user’s behaviour and history merged with the behaviour and history of all visitors. This information is stored and maintained by the relevance server and available from any online channel.
However, for those that do not have any merchandizing system, the attributes provided by Microsoft is sufficient to create a webshop with simple merchandizing. The drawback is that the attribute values require manual administration which is expensive and where mistakes always will be made.
The attribute group contains the following attributes.
Attribute |
Comment |
Product name |
The name of the product. This attribute is a copy of the name field of the product. The name attribute is always in the default language of the product. |
Description |
The description of the product. This attribute is a copy of the description field of the product. The description is always in the default language of the product. |
Item number |
The item number is a concatenation of the article number and the dimensions. Example 1101 : : : Black : |
Features |
The attribute is an attribute used to define a table or paragraphs of features of a product. The attribute is intended to contain HTML-coded information, but that is not the appropriate way to define the specifications. It is not recommended to add visual specifications in the master data system since the publishing of the attribute probably differs in the different channels used. Example from Contoso demo data<table><tbody><tr><td><h3>Overview</h3><p>24″ widescreen HD monitor. 1920 x 1080 maximum resolution. Ultrafast 2 ms response time for excellent playback of fast-moving scenes. 170° horizontal 160° vertical viewing angles. Built-in speakers.</p><p>This great product is sure to provide years of use. It’s an attractive addition to any household, useful and fun. Make the most of all the great features, share the benefits with family and friends, and get a good deal in the process.</p><p>And remember, here at Contoso we won’t be undersold. We will beat any competitor price. Just bring in our competitor’s advertisement or coupon, and we will match their price and give you an additional 10 percent discount! Customer satisfaction is our top priority.</td><td><h3>Features</h3><ul><li>More value for your money.</li><li>Functional and attractive.</li><li>Makes a great gift!</li></ul></td></tr></tbody></table> |
Specification |
The attribute is an attribute used to define a table of specifications of a product. Specifications are often many properties grouped together in a two-column table where the customer can find technical specifications of the product. The attribute is intended to contain HTML-coded information, but that is not the appropriate way to define the specifications. It is not recommended to add visual specifications in the master data system since the publishing of the attribute probably differs in the different channels used. |
Image |
An array of strings that contains a path expression for the product images. The path is a generic path that has to be expanded to a physical path when used. Dynamics 365 for Finance and Operations does not synchronize images to the channels for online retail channels. This attribute is not used by Storefront 365. Images are fetched based on the Media Template defined in Dynamics 365 for Finance and Operations. Example |
Color |
The colour of the variant. This is a text representation of the enumeration value defined in the dimension used. |
Size |
The size of the variant. This is a text representation of the enumeration value defined in the dimension used. |
Style |
The style of the variant. This is a text representation of the enumeration value defined in the dimension used. |
Configuration |
The configuration of the variant. This is a text representation of the enumeration value defined in the dimension used. |
Review Rating |
The review rating is a decimal number defining the average rating made of the product. Note that the rating is not imported from any retail channel. This attribute value requires a manual administration. |
New |
True if the product is considered as new in the assortment. This attribute could be used to display the product with an overlay displaying that the product is new. This is not the recommended approach by Storefront 365. The New-attribute should have the data type Date and define the last day when the product is considered as new. The attribute provided by Microsoft requires manual administration to disable the flag when the product no longer is considered as new. |
Customer favorites |
True if the product should be considered as a customer favourite. This is not the approach that Avensia Storefront recommends. Customer favourites should be calculated by merchandizing software. Using the approach provided by Microsoft may be used if no 3rdparty software is available. The drawback is that the attribute value requires manual administration. |
Staff favorites |
True if the product should be considered as a staff favourite. The attribute was created for the demo site published with SharePoint in Dynamics AX R2. Staff favourites should be defined in merchandizing software to be included in the behaviour and relevance calculations. Using the approach provided by Microsoft may be used if no 3rd party software is available. The drawback is that the attribute value requires manual administration. |
Brand |
A text representation of the enumeration value defined for the product. The brand attribute is a fixed list of brands. |
Search keywords |
Keywords to assign to the product. This attribute is not used by Storefront 365 since the indexing of the search index is depending on what search engine that is used with Episerver. Storefront 365 creates an index containing name, description and attributes for the products and includes images and media together with content. There is no need to define search keywords unless the catalog import job is extended to use the attribute to define synonyms in the search engine. |
Sales tax group |
The text representation of the tax group that the product has been assigned. Storefront 365 does not use this information. |
Category |
The text representation of the navigation category node that the product has been assigned to. Avensia Storefront does not use this value. Instead, the assignment of the navigation hierarchy made in the catalogs is used. By using a catalog for category assignment, a product may be double exposed in several navigation nodes. |
Storefront 365 and dynamic attributes
When dynamic attributes are added to products in the channel, the product data model needs to be extended in Storefront 365 starter site if the attributes shall be imported into Episerver. The extended product data model will be imported to Episerver Commerce and the attribute value will be available to use in the Storefront 365 starter site.
Add the attributes to the product class by extending the product class with new properties. Ensure that the properties have the same name as the attributes in Dynamics 365 for Finance and Operations. That will enable the automatic mapping in Storefront 365 integration framework, and no more code needs to be written. If the attribute name differs from the product class property, the mapping has to be extended to handle the mapping.
Code snippet of an example to add attributes to a product.
Add the Display attribute to set the display name that will be used in Episerver. Add the Searchable attribute to add the attribute to the search index and enable the product to be searchable in the retail online channel.
Rebuild and deploy, and the attributes will be imported into Episerver Commerce. Ensure that the attribute settings in the online retail channel have been properly published and the jobs 1070 and 1150 has been executed before importing the catalog. If an attribute is missing in the channel database that is defined in the product in Episerver, the attribute value will still be created in Episerver, but it will be empty.
After importing it is recommended that the search index is updated to reflect the new attributes.
More information
The e-commerce and merchandizing system eSales that is mentioned in this text is available from Avensia and from Apptus. Episerver Find is available from Episerver. For more information, visit http://www.avensia.com or http://www.apptus.com, and http://www.episerver.com