Create or Edit Profile Properties

Abstract

Update profile properties in Sitecore Commerce 8.2 powered by Commerce Server and Commerce Server 11.4 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");