Create a custom property provider
Abstract
You can create a custom property provider.
To expose a new user property, a custom provider needs to be created. It must implement the Sitecore.Commerce.Connect.DynamicsRetail.Profiles .IPropertiesProvider interface.
public interface IPropertiesProvider { Dictionary <string, string> GetProperties(CommerceUser user); }
The input parameter CommerceUser
has the user name and ExternalId. The returned collection keys should be property names that are specified in the web.confing in the customProviderData. For more examples, refer to the LoyaltyProgram, LoyaltyTier, and LoyaltyPoints properties in the web.config
file.