1. Contacts

Phone numbers facet

Version:

Format in Sitecore 8.x

In Sitecore 8.x, phone numbers are associated with a contact through a property on the contact. The name of the property is PhoneNumbers.

The following is an example the PhoneNumbers property on the contact:

"Phone Numbers" : {
    "Preferred" : "work",
    "Entries" : {
        "work" : {
            "CountryCode" : "+44",
            "Extension" : "123",
            "Number" : "0121 496 0208"
        },
        "home" : {
            "CountryCode" : "+44",
            "Extension" : "987",
            "Number" : "0121 496 0208"
        },
    }
}

The Entries property is a dictionary. Each member of the dictionary has a key and a value. The key describes the phone number. The value is an object that contains the details of the phone number.

In addition to the Entries property, the PhoneNumbers object has another property named Preferred. The value is the key for one of the phone numbers.

Format in Sitecore 9

In Sitecore 9, phone numbers are associated with a contact through a contact facet:

Facet NamePhoneNumbers
Facet TypeSitecore.XConnect.Collection.Model.PhoneNumberList

Unlike in Sitecore 8.x where all phone numbers are stored in a single dictionary, in Sitecore 9, the preferred phone number is stored separate from the other phone numbers.

Facet PropertyDescription
PreferredPhoneNumberObject that represents the preferred phone number
PreferredKeyKey for the preferred phone number
OthersDictionary that contains all other phone numbers associated with the contact

Mapping phone number properties

Source objectMember of the dictionary located at PhoneNumbers.Entries on the contact document
Target objectSitecore.XConnect.Collection.Model.PhoneNumber
Mapping definitionMongoDB to xConnect Contact Mappings > MongoDB Phone Number to xConnect Contact Phone Number
Value to write to target objectProperty on target object
CountryCode from source objectCountryCode
Extension from source objectExtension
Number from source objectNumber
If you have suggestions for improving this article, let us know!