Create or Edit Profile Properties

Update profile properties in Sitecore Commerce 7.5, powered by Commerce Server and Commerce Server 11.1 or Sitecore profile store.

Complete the following prerequisites:
At your visual studio solution setup:
  1. Get a property.
    Sitecore.Security.UserProfile profile = user.Profile;
    var userId = profile.GetPropertyValue("phone_number") as string;
    
  2. Set an existing property, or create a new one.
    Sitecore.Security.UserProfile profile = user.Profile;
    profile.SetPropertyValue("phone_number", "(123) 123 1234");