Skip to main content
Take our 5-minute Community Survey. Open now through November 30. Click here to participate.

Time Estimate

Create Fields and Map Your Data

Learning Objectives

In this step, you’ll:

  • Create a formula field.
  • Add a custom field to a data model object.
  • Map fields to the Customer 360 Data Model.

Create a Formula Field

When you create a Data 360 data stream, you can choose to generate more fields, called formula fields, either during data stream creation or after. These optional fields are helpful when you want to standardize data formatting, update unique identifiers, or add flags for data that meet criteria.

For this project, you create a formula field to identify leads that are located in the United States, based on the data found in the Country field of the Lead data lake object (DLO). 

  1. From the Data Stream tab, locate and click the Lead_Home data stream that you created.
  2. From the Lead_Home data stream record, select the New Formula Field from the options at the top of the screen.
  3. For Field Label, name your field Is US Based.
  4. Confirm the Field API Name is Is_US_Based.
  5. For Formula Return Type, select Text.
  6. Enter this formula in the Transformation Formula field:
IF(UPPER(sourceField['Country']) == "USA" || UPPER(sourceField['Country']) == "UNITED STATES", "TRUE" , "FALSE")

New formula field screen

  1. Validate the formula using the Tested Value panel:
    • Type Japan into the country field and then click Test.
    • Output will show FALSE.
    • Type USAand then click Test.
    • Output will show TRUE.
  1. Once you have successful validation, click Save.

Harmonize and Map

Once DLOs are created, fields from those DLOs need to map to data model objects (DMOs) found in the Customer 360 Data Model, Data 360 standard canonical data model. DMOs help organize Data 360 data. If using starter data bundles to create your data streams, many mappings are prepopulated for you. However, custom fields and some additional fields that are required for unification need to be manually mapped. Since you added a new custom formula field (and often businesses have other standard and custom objects in their data sources), these fields need to be manually mapped to the Customer 360 Data Model.

  1. From the data stream, Lead_Home page, click Review in the Data Mapping section.

On one side of the screen are the searchable data lake objects (1). On the other side, are the searchable DMOs (2) (called Data Model entities in-app). To search for a field within a DLO, use the DLO search bar (3) in this case, use Lead_Home. 

DLO mapping screen for the Lead data stream.

You need to create a new DMO field and then map it to your new formula field.

  1. Under Data Model entities, scroll to the Lead section and under Unmapped, click Add New Field. You might need to scroll down to the Lead section to find the unmapped category and expand the options.

Add New Field link.

  1. Name the Field, Is US Based and select Text as the Data Type. Keep the Enable Value Suggestion box unchecked.
  2. Click Save.
  3. Now under the Data Lake Object, Lead_Home, search for the unmapped field Is US Based.
  4. Select Is US Based.
  5. Under Data Model entities, scroll to the Lead section and under Unmapped select the newly created Is US Based custom field.
  6. After a line is drawn to connect the two fields, click Save. 

Now let’s map a field that is required for unification, formatted phone number.

  1. Now locate Phone under the Lead_Home search box. Notice that it’s already mapped to Telephone Number. You also need to map it to Formatted E164 Phone Number.
  2. Click Phone to select it and then locate Formatted E164 Phone Number from the Unmapped section of Contact Point Phone.
  3. Select Formatted E164 Phone Number.
  4. After a line is drawn to connect the two fields, click Save & Close.

Map Case to a Data Model Object

Since you didn’t add the Case objects using a bundle, no mappings have been created. Let’s map these fields so they can be used in later insights and segments.

  1. On the Case_Home data stream, in the Data Mapping section, click Start.

Data Mapping Start button.

  1. From the Data Model entities area, click Select Objects. This can take some time to load.
  2. Search for Case in the Search field.
  3. Click the + icon to add the Case standard object. If the + icon didn’t turn green, click it again.

Map Case objects by clicking the plus button to automatically map some fields. It becomes a green checkmark when selected.

  1. Click Done.
    This automatically maps several fields.
  2. There are more fields to map. Search for these fields in Case_Home and then map to the corresponding unmapped fields in the Case DMO.
    • Status to Case Status
    • Account Id to Account
    • Contact Id to Individual
  1. Click Save & Close.

Map Case History

Next, repeat these steps to map Case History to Case Update.

  1. On the CaseHistory2_Home data stream, in the Data Mapping section, click Start.
  2. From the Data Model entities area, click Select Objects. This may take some time to load.
  3. Search for Case Update in the Search field.
  4. Click the + icon to add the Case Update standard objects and then Done.
  5. Map these additional fields.
    • CaseHistory2 ID to Case Update Id (Primary Key)
    • Case ID to Case
    • Owner ID to Related Owner
    • Last Modified By ID to Last Modified By
    • Previous Update to Previous Update Date
  6. Click Save & Close.

Verify Your Work

Now that you have completed these steps in your Developer Org, click Verify Step to check your work before moving to the next step in the project. This check will verify that you’ve created a custom DMO field and mapped it to your new formula field. We’ll also check that you have created the mappings for Case and Case History.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback