Determine the data to migrate

Abstract

How to determine which data you wish to migrate from Sitecore 8.x to Sitecore 9, using xDB Data Migration Tool.

Before you can start to map your custom contact facet data, you must determine the data you want to migrate.

In this example, a custom contact facet is used to store details about the customer loyalty program the contact is enrolled in. The following values are stored:

Membership id

Number (integer) that uniquely identifies the contact in the loyalty program.

Enrollment date

Date when the contact enrolled in the loyalty program.

Home store id

Identifier (string) of the store in which the contact enrolled in the loyalty program.

In Sitecore 8.x, custom facet data is stored on a contact in the xDB collection database, which is built on MongoDB. The following is an example of a contact document from MongoDB where the custom contact facet has been set:

{
    "_id" : NUUID("600f332f-e953-4c12-87ba-e2c24f3ea334"),
    "Identifiers" : {
        "IdentificationLevel" : 2,
        "Identifier" : "thomas@shelbybros.co.uk"
    },
    "Personal" : {
        "FirstName" : "Thomas",
        "Surname" : "Shelby"
    },
    "Emails" : {
        "Preferred" : "Preferred",
        "Entries" : {
            "Preferred" : {
                "SmtpAddress" : "thomas@shelbybros.co.uk",
                "BounceCount" : 0
            }
        }
    },
    "LoyaltyProgram" : {
        "MembershipId" : 100011,
        "EnrollmentDate" : ISODate("1919-12-12T12:34:56.000Z"),
        "HomeStoreId" : "GARRISON01"
    },
    "Lease" : null
}

Specifically, it is the following part of the contact you are interested in:

{
    ...,
    "LoyaltyProgram" : {
        "MembershipId" : 100011,
        "EnrollmentDate" : ISODate("1919-12-12T12:34:56.000Z"),
        "HomeStoreId" : "GARRISON01"
    },
    ...
}

Note

xDB Data Migration Tool reads data directly from the MongoDB database. The class used to implement the custom contact facet is not used in any way, so it is not described in detail.