Exercise - Create a Customer Insights instance, ingest data, and unify data

Completed

You've been selected as the project manager for the implementation of Dynamics 365 Customer Insights at Contoso Coffee. As an experienced project manager, you devise the following plan:

  • Create a Customer Insights environment.

  • Ingest data from highest priority data sources from within the business:

    • Point-of-Sale (POS)

    • Loyalty data

    • E-commerce customers and web purchases

  • Configure a unified customer profile from ingested data.

Learning objectives

At the end of these exercises, you'll be able to accomplish the following objectives:

  • Sign up for a Dynamics 365 Customer Insights trial.

  • Ingest siloed data sources.

  • Follow Map, Match, and Merge to create a unified profile.

  • Calculate key business and customer KPIs.

  • Generate segments for use by the Marketing department.

Exercise 1 - Create a Customer Insights instance

In this lab, you'll sign up for a Customer Insights instance and review the guided demonstration tour to familiarize yourself with the application.

Task 1 - Sign up for a Customer Insights trial

  1. Open a browser and go to Dynamics 365 Customer Insights.

  2. Select Get started.

  3. Select the Sign-up for a free trial link beside the Prefer to get started on your own? question.

  4. On the Get started with Customer Insights page, sign up with your work email address.

    If you don't have access to a Microsoft 365 tenant, you can sign up for a Dynamics 365 trial (which will include a Microsoft 365 tenant), as detailed in the prerequisites.

    You'll be redirected to https://home.ci.ai.dynamics.com. (If you're prompted to create a new environment, provide a name and select the region into which you want to deploy the service.)

Congratulations! Now, you should be signed in to Customer Insights, where you'll have access to two environments: a demo environment and the one that you've provisioned.

Screenshot of the Customer Insights home page.

Exercise 2 - Ingest data into Customer Insights

In this exercise, you'll become familiar with ingesting data from multiple sources.

As Project Manager for Contoso Retail, you've already identified that key sources of data include e-commerce customers, online purchases, in-store Point of Sales purchases, and data from the Contoso Retail loyalty card scheme.

Although Customer Insights has connectors to over 30 data sources and applications (including Dynamics 365 and Microsoft Dataverse), for this lab, you'll be using the Text/CSV connector.

Data Sources

Item Description Format URL
eCommerce Contacts Extract of customers who have made an online purchase Text/CSV Link
Loyalty Scheme Extract of customers who have signed up for the Contoso Retail Loyalty Card scheme Text/CSV Link
Online Purchases Extract of purchases made through the Contoso Retail website Text/CSV Link
POS Purchases Extract of in-store purchase detail Text/CSV Link
Website Reviews Online website reviews from customers Test/CSV Link

Task 1 - Ingest customer data from an e-commerce platform

  1. Sign into Customer Insights and select your Environment from the drop-down menu in the upper-right corner. If prompted to create a new environment, do so.

  2. Within Customer Insights, expand Data on the left menu and then select Data sources.

  3. Select Add Data Source.

    Screenshot of adding data sources to environment.

  4. Select Microsoft Power Query, and in the Save data source as field, enter eCommerce, and then select the Next button.

  5. You'll be presented with a view of data source connectors that Customer Insights is able to ingest. Note the connector types that are available, including Dataverse. Select the Text/CSV connector.

    Screenshot of choosing a data source screen.

  6. Enter the URL for the Azure BLOB named https://aka.ms/ciadclasscontacts, and then select Next. (You can find the URL in the table under the introduction to this lab.)

    Screenshot of the Connect to data source screen with Azure Blob U R L.

  7. You'll now see the Preview File Data screen. Here you can change the delimiter, file origin type or what data is being used for the data type detection. You can select the Transform data button.

  8. You should now see that the data from the source is tabulated. Now, you can configure the datatypes and formats for the data that you ingest. Notice that the column heading has appeared in the first row of the data. To correct this issue, select Transform table and then select Use first row as headers.

    Screenshot of Use First Row as Header selection.

  9. Because you have ingested data from a Text/CSV source, all columns have defaulted to a Text datatype. To successfully ingest and model the data, you can set the datatype for non-text columns.

    Screenshot of icon to set datatype for non-text columns.

  10. To change the datatype, select the ABC icon within the column heading.

  11. Update the datatype for the columns that are listed in the following table.

    Column heading New datatype
    DateOfBirth DateTime
    CreatedOn Date/Time/Zone
  12. In the Name field on the right pane, rename your data source from Query to eCommerceContacts.

    Screenshot of the Name field to rename data source.

Congratulations! You've now successfully ingested your first data source into Customer Insights.

Note

One thing to be aware of, column names can only contain letters, numbers, and underscores. They cannot contain a space and must begin with a letter. If you have data where column name(s) have a space or do not begin with a letter you will want to fix that either within Power Query or before the data is brought into Customer Insights.

Task 2 - Ingest online purchase data

In this next task, you'll ingest Online Purchase data, which represents purchases made through the Contoso Coffee website.

  1. Within Customer Insights, expand Data on the left menu and then select Data sources.

  2. You should see your eCommerce data source. Under Actions, select the three vertical dots and then select Edit.

    Screenshot of editing data sources in Customer Insights.

  3. You should be presented with the view of the eCommerceContacts data that you ingested in Task 1. In the action menu, select Get data.

    Screenshot of selecting Get Data in Customer Insights.

  4. You'll be presented with a view of data source connectors that Customer Insights is able to ingest as you did in Task 1. Select the Text/CSV connector.

  5. Enter the URL for the Online Purchases data, https://aka.ms/ciadclassonline data and then select Next.

  6. You'll now see the Preview File Data screen. Here you can change the delimiter, file origin type or what data is being used for the data type detection. You can select the Ok button

  7. Select Transform table and then select Use first row as headers.

    Screenshot of Use first row as headers selection.

  8. Update the datatypes for the columns in the following table.

    Column heading New data type
    PurchasedOn Date/Time/Zone
    TotalPrice Currency
  9. Name your query eCommercePurchases and then select Create.

Task 3 - Ingest customer data from loyalty scheme, point of sale purchases, and website reviews

  1. Within Customer Insights, expand Data on the left menu and select Data Sources.

  2. Select Add Data Source.

  3. Select Microsoft Power Query, in the Save data source as field, enter Loyalty and select the Next button.

  4. You'll be presented with a view of data source connectors that Customer Insights is able to ingest. Take note of the connector types available. Select the Text/CSV Connector.

    Screenshot of the choose a data source screen.

  5. Enter the URL for Loyalty Contacts and select Next.

  6. You'll now see the Preview File Data screen. Here you can change the delimiter, file origin type or what data is being used for the data type detection. You can select the Transform data button.

  7. You should now see the data from the source tabulated. Here you can configure the datatypes and formats for the data you ingest.

  8. You'll notice that the column heading has appeared in the first row of the data. To correct this, select Transform and then Use First Row as Headers.

  9. Because we have ingested data from a Text/CSV source, all columns have been defaulted to a ‘Text’ Data Type. To successfully ingest and model the data, we can set the datatype for non-text columns.

  10. To change the datatype, select the ABC icon within the column heading. Update the datatype for the columns listed below.

  11. Use the first row as column headings.

    Column heading New data type
    DateOfBirth Date/Time
    RewardPoints Whole Number
    CreatedOn Date/Time/Zone
  12. In the Name field on the right-hand pane, rename your data source from Query to loyCustomers then select Save.

Screenshot of saving name field to loyCustomers.

Task 4 - Ingest Customer Data

  1. Within Customer Insights, expand Data on the left menu and select Data Sources.

  2. Select Add Data Source.

  3. Select Microsoft Power Query, in the Save data source as field, enter PoS then select Next.

  4. You'll be presented with a view of data source connectors that Customer Insights is able to ingest. Take note of the connector types available. Select the Text/CSV Connector.

  5. Enter the URL for PoS Purchases https://aka.ms/ciadclasspos.

  6. You'll now see the Preview File Data screen. Here you can change the delimiter, file origin type or what data is being used for the data type detection. You can select the Transform data button.

  7. You should now see the data from the source tabulated. Here you can configure the datatypes and formats for the data you ingest.

  8. You'll notice that the column heading has appeared in the first row of the data. To correct this, select Transform and then Use First Row as Headers.

  9. Because we have ingested data from a Text/CSV source, all columns have been defaulted to a ‘Text’ Data Type. To successfully ingest and model the data, we can set the datatype for non-text columns.

  10. To change the datatype, select the ABC icon within the column heading. Update the datatype for the columns listed below.

  11. Use the first row as column headings.

    Column heading New data type
    PurchasedOn Date/Time/Zone
    TotalPrice Currency
    RewardPointsAdded WholeNumber
  12. In the Name field on the right-hand pane, rename your data source from Query to posPurchases and select Save.

Task 5 – Ingest Customer Data from Website Reviews

  1. Within Customer Insights, expand Data on the left menu and select Data Sources.

  2. Select Add Data Source.

  3. Name the source Website then select Next.

  4. You'll be presented with a view of data source connectors that Customer Insights is able to ingest. Take note of the connector types available. Select the Text/CSV Connector.

  5. Enter the URL for Website Reviews and select Next.

  6. You'll now see the Preview File Data screen. Here you can change the delimiter, file origin type or what data is being used for the data type detection. You can select the Transform data button.

  7. You should now see the data from the source tabulated. Here you can configure the datatypes and formats for the data you ingest.

  8. You'll notice that the column heading has appeared in the first row of the data. To correct this, select Transform and then Use First Row as Headers.

  9. Because we have ingested data from a Text/CSV source, all columns have been defaulted to a ‘Text’ Data Type. To successfully ingest and model the data, we can set the datatype for non-text columns.

  10. To change the datatype, select the ABC icon within the column heading. Update the datatype for the columns listed below.

  11. Use the first row as column headings.

    Column heading New data type
    ReviewRating Whole Number
    ReviewDate Date/Time/Zone
  12. In the Name field on the right-hand pane, rename your data source from Query to webReviews and select Save.

After all sources have been ingested, you should have four data sources, as shown in the following figure.

Screenshot of the four data sources you created.

The data sources should contain the queries that are shown in the following screenshot.

Note

If you named your queries differently then you will need to make adjustments as you go through the content as this content assumes the naming providing in the steps above.

Screenshot of the data source queries you created.

Exercise 3 - Data unification

After having ingested the raw data from your data sources into entities, you'll now begin the map, match, and merge process to create a single unified customer profile by merging data from each customer profile source.

To complete this process, you'll first map your ingested entities against a standard model and then select Primary key for each of your profiled entities. Next, you'll create your match rule, which will be used to match e-commerce customers with loyalty customers.

Finally, running the merge process will create a single set of unique customers that have matched profiles from eCommerce and Loyalty customer data by using your match rules.

Your objective is to find out how many unique customer profiles that Contoso Retail has across e-commerce and loyalty data.

Task 1 - Map e-commerce and loyalty contacts to common data types

  1. Map the e-commerce and loyalty data contacts to common data types. On the left menu, select Unify.

  2. Under Source fields, select the Edit button. Select the entities that represent the eCommerceContacts and loyCustomers customer profiles and then select Apply.

    Screenshot of the entities and fields available.

  3. You'll now be presented with the mappings of your source entity against standard model types. You can review the types in the table. Choose a primary key for each entity that you've ingested. The primary key must be a unique reference. For eCommerceContacts, select ContactId as the primary key.

    Screenshot of the mappings of the source entity against standard model types.

  4. Select loyCustomers under Entities and then set LoyaltyID as the Primary key. Select Save in the top-left corner.

    Screenshot of the primary key set and saved.

  5. After you've successfully selected your source fields, select the Next button.

After you select the next button, you'll be taken to the duplicate records page. This is where you define any rules you want for handling duplicate records that may exist in your data sources. Our data sources don't have any duplicate records so we'll skip this step by selecting the Next button to move to Matching Conditions stage.

Task 2 - Specify matching conditions

For the next stage, you must select the order in which to merge the profiles. You'll be able to merge attributes to ensure that the unified profiles are complete and the priority of which sources to use for those attributes.

  1. If you haven't already, ensure that you are on the Matching conditions stage.

  2. Ensure that eCommerceContacts: eCommerce is set as the first entity on the list and if necessary select Include all records.

  3. In the Entity 2 drop-down list, select loyCustomers: LoyaltyScheme and then select Include all records.

    Screenshot of include all records checkbox selected.

Task 3 - Create a match rule

In this step, you'll create a rule that will be used to match records together. Rules can consist of single (for example, based on ID) or multiple (for example, full name, postcode, date of birth) conditions. For this exercise, you'll create a match rule based on full name, postcode, and email.

  1. Under the loyCustomers: LoyaltyScheme entity, select the Add rule button.

  2. Add your first condition by using FullName.

  3. For the eCommerceContacts entity, select FullName in the Field drop-down list.

  4. For the loyCustomers entity, select FullName in the Field drop-down list.

  5. Select the Normalize drop-down menu and select Type (Phone, Name), which will normalize the values within the FullName field.

  6. Set Precision to Basic and Value to Low.

    Screenshot of the conditions screen with available fields.

  7. Add a second condition for email address by selecting + Add, and choosing Add condition.

  8. For the eCommerceContacts entity, select Email in the Field drop-down list.

  9. For the loyCustomers entity, select Email in the Field drop-down list.

  10. Set Precision to Exact.

    Screenshot of the second condition screen with available fields.

  11. In the Name field, enter the name FullName, Email for the new rule.

  12. Select the Done button to save the rule.

    Customer Insights is now matching customer data from your two sources of customer information, e-commerce contacts and loyalty scheme customers, to identify how many unique customer profiles you would have based on your rules.

  13. Select the Next button to move to the Unified customer fields stage.

Task 4 – Unified customer fields

The Unified customer fields stage is the last stage in the data unification process. Its purpose is reconciling conflicting data and to define the attributes that will be used in your unified customer profile.

A merged attribute is an attribute that exists in more than one data source and represents the same piece of data. For example, you might have Email Address in both Web Customers and Loyalty Customer data sources.

Customer Insights will attempt to identify attributes to be merged by using their mapping to the standard data types that you used during the Matching conditions stage.

  1. If not there already, ensure you are on the Unified customer field stage.

    Screenshot of the unified customer field stage view.

  2. Select the chevron on the FirstName emerged attribute. You should see that in the FirstName attribute, contacts that are of the same type (for example, FirstName) have been defined as Merged and that eCommerce.eCommerceContactsFirstName is ranked number one. This ranking denotes that, where you have a matching customer profile in both Loyalty and eCommerce, the first name that is taken from eCommerceContacts will be the primary.

  3. Since we aren't going to make any changes to the mapping, select the next button to advance to the Review stage.

  4. Select the Create customer profiles button.

    Screenshot of the review and create customer profiles view with create customer profiles button.

Congratulations! You've successfully ingested, mapped, matched, and merged data from multiple sources within Customer Insights to create a unified customer profile that can be used to gain insights into your whole customer base.