---
schema_version: "1"
id: a2bb562aa756e41c607736dadfcfdf79053549d84af690221910a7dd04967ad7
title: Prepare Your Data for a Clean Room
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_crc_prepare_data.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_crc_prepare_data.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b984a04a662d378fe0b3b0e28754baa8746c8ff052cf43c26ef5d9d15d9469c1
description: To share segments in a clean room, complete these steps to prepare your data. Preparation includes required steps such as ingesting the data, mapping the data lake object (DLO) to a data model object (DMO), hashing fields to protect personal information, and creating segments. You can share segments only in a clean room.
products:
  - Data 360
release: "264"
---
# Prepare Your Data for a Clean Room

To share segments in a clean room, complete these steps to prepare your data. Preparation includes required steps such as ingesting the data, mapping the data lake object (DLO) to a data model object (DMO), hashing fields to protect personal information, and creating segments. You can share segments only in a clean room.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong> Edition (home org)</td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_note.png)

Note If you already created Salesforce segments with a unique segment name and match key, you can directly [create a DMO containing all the fields you want to use as match keys and hash sensitive fields for clean rooms](https://help.salesforce.com/s/articleView?id=data.c360_a_crc_prepare_data.htm&release=264.0.0&type=5 "Combine multiple fields into a single DMO that can be used as match keys to match records between the two parties.").

This process is a multi-step solution that can require different roles and permission sets to complete in Data Cloud. Bookmark this page or keep it open in a separate window to refer to this topic.

#### See Also

- [_Salesforce Help_: append Transformation](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_append_transformation.htm&language=en_US)
- [_Salesforce Help_: Identity Resolution Ruleset Processing Results](https://help.salesforce.com/s/articleView?id=data.c360_a_resolution_summary.htm&language=en_US)

## Connect Data to Data 360

You can ingest profile data and engagement data. To ingest both types, create a separate data stream for each type. Your profile data must contain a unique ID for the individual, such as an email address, phone number, PPID, or device ID. You can hash your data with the SHA256 algorithm. The algorithm transforms data to lowercase and removes white spaces. If your data isn’t hashed with the SHA256 algorithm, you can transform it after ingestion.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d64300e113">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e113 ">To connect data to Data Cloud</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e113 ">Data Cloud Architect permission set</td>

            </tr>
          </tbody>
        </table>

Choose your data ingestion method based on your data source.

- Use [accelerated query federation](https://help.salesforce.com/s/articleView?id=data.c360_a_accelerated_data_lake_objects.htm&release=264.0.0&type=5 "Caching retrieves data from the external source and temporarily stores it in a data lake object in Data 360. When you enable acceleration while creating a data stream, you turn on caching. We recommend caching when accessing large data sets or when data changes frequently. You can refresh the cached data at your preferred frequency.") to connect your external data sources with Data 360 and access your data without moving it. Clean rooms support accelerated data streams only. File federation and live-query data federation are not supported.
- Create a data stream by [uploading a CSV file](https://help.salesforce.com/s/articleView?id=data.c360_a_upload_a_csv_file.htm&release=264.0.0&type=5 "Create a data stream by bringing in data from a local CSV file into Data 360.") or by using [a data kit](https://help.salesforce.com/s/articleView?id=data.c360_a_install_package_kit.htm&release=264.0.0&type=5 "When you create a data stream from a data kit in your target org, the data model objects are available automatically. When adding a data model to a data kit, a custom data model is added as is. If you’re adding a standard data model, only the custom mappings and custom fields are packaged.").
- Use a file-based storage connector, such as Amazon S3 or Google Cloud Storage.
- Use a [Salesforce CRM connector](https://help.salesforce.com/s/articleView?id=data.c360_a_salesforce_crm_connector.htm&release=264.0.0&type=5 "A standard Salesforce CRM connection establishes a connection between Data 360 and a Salesforce org, allowing Data 360 to ingest data from the connected org. Data 360 ingests data and sends back only data actions. This type of connection doesn’t share any data back to the connected org.") to ingest data from a connected Salesforce org.
- Capture real-time data from a website or mobile app by using the [Web and Mobile App connector](https://help.salesforce.com/s/articleView?id=data.c360_a_web_mobile_app_connector.htm&release=264.0.0&type=5 "Connect your web and mobile apps to Data Cloud to collect customer engagement data. This data helps you customize messages, create automations, or support AI projects. After it’s connected, set up data streams to ingest your data into Data Cloud, allowing you to access and query this data for various uses.").

## Map Data to Data Model Objects

Associate the ingested data stream or DLO to the relevant standard DMOs in Data Cloud.

### Required Editions

You can map profile data to the Individual - latest DMO or Contact Point DMO. For engagement data, use an appropriate standard DMO, but map the contact point to the individual - latest DMO. If you’re a provider, you can also create a custom DMO to map your data. You must map the party-related fields. The Party attribute connects all the pieces of information and helps Data 360 identify that they all belong to the same person.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d64300e239">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e239 ">To map data for a clean room</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e239 ">Data Cloud Architect permission set</td>

            </tr>
          </tbody>
        </table>

1. On the Data Streams tab, open the data stream that you created for the clean room.
2. [Map your data to DMOs.](https://help.salesforce.com/s/articleView?id=data.c360_a_map_custom_data_model_objects.htm&language=en_US)
    
    Here are some recommended field mappings for profile data. You must map the party-related fields. The Party attribute connects all the pieces of information and helps Data Cloud identify that they all belong to the same person.
    
    - Email address maps to Email Address
    - First name maps to First Name
    - Last name maps to Last Name
    - Customer ID or Unique ID (primary key) maps to External Record ID
    - Customer ID or Unique ID (primary key) maps to Party
    - Customer ID or Unique ID (primary key) maps to ContactPointEmail ID
    - Customer ID or Unique ID (primary key) maps to Individual ID (primary key)
    
    Here are some recommended field mappings for engagement data.
    
    - Date-time stamp maps to Engagement date time
    - Email address maps to Individual
    - Product ID maps to External record ID
    - Product name maps to Name
    - Purchase price maps to Product Order Event Type
    - Unique transaction ID (Primary key) maps to Product order engagement (primary key)

## Create a Data Model Object for Match Keys

Combine multiple fields into a single DMO that can be used as match keys to match records between the two parties.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d64300e361">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e361 ">To use batch transforms</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e361 ">Data Cloud Architect permission set </td>

            </tr>
          </tbody>
        </table>

Using multiple identifiers to link the data of both parties in a collaboration increases the chance of finding a match. Use unique values like email ids, phone numbers or ID numbers.

1. In Data Cloud, on the Data Transforms tab, click **New**. If the Data Transforms tab isn’t visible, click More and select **Data Transforms**.
2. Select **Batch Data Transform**, and click **Next**.
3. For the data source, select **Data Model Objects**.
4. Select the data space to transform, and click **Next**.
5. Click **Add Input Data**, and select the **Contact Point Email** DMO, to include the email address as a match key.
6. Select the Party and Email Address columns.
7. Click **Next**.
8. Click the Add Node icon, and select **Transform** as the node type.
    
    The selected columns are shown in the preview window.
9. Create a column that contains the type of data in the DMO.
    1. Click the function icon (fx) and select **Custom Formula**.
    2. Enter a Transformation Name.
    3. In the text pane, delete the placeholder text Enter your formula… and enter ‘HEM’ to denote hashed email.
    4. For Output Type, select **Text**, and retain the default value in the Length field.
    5. Enter the column label as Type and the API name as Type\_\_c.
    6. Click **Apply**.
        
        This function creates a Type column for all the fields in the Contact Point Email DMO with the value as HEM.
10. Apply the SHA2 function to hash the data.
    1. Click the function icon (fx) and select **Custom Formula**.
    2. Enter a Transformation Name.
    3. Search for and select **SHA2** as the function.
    4. Delete the placeholder text field, and then search for and select the **Email Address** column.
    5. For the bitlength value, enter 256.
        
        The function appears as sha2(ssot\_\_EmailAddress\_\_c, 256)
    6. For Output Type, select **Text** and enter 256 for the length.
    7. Enter the column label as HashedContact and the API name as HashedContact\_\_C to denote the column that stores the hashed values.
    8. Preview the transform to verify that the email address field is hashed correctly, and then click **Apply**.
11. After creating a column with hashed email IDs, remove the column with actual email IDs from the DMO.
    1. Click the Drop Columns icon.
    2. Search for and select the Email Address column and click **Apply**.
12. Add a universally unique identifier string for each record.
    1. Click the function icon (fx) and select **Custom Formula**.
    2. Search for and select **UUID** as the function.
    3. For Output Type, select **Text**, and retain the default value in the Length field.
    4. Enter the column label as ID and the API name as ID\_\_C.
    5. Click **Apply**.
13. Apply the same transform to the Contact Point Phone DMO and any other DMO that you want to include as a match key.
    1. Click the **Add Input Data** icon and select the DMO.
    2. Create a column that contains the type of data in the DMO. For the Contact Point Phone DMO, enter the value for the Type field as ‘HPH’ to denote hashed.
    3. Apply the SHA2 function to hash the data.
    4. Remove the column with actual email IDs from the DMO.
    5. Add a universally unique identifier string for each record.
14. [Combine the transforms using the Append Node.](https://help.salesforce.com/s/articleView?id=data.c360_a_batch_transform_append_node.htm&type=5&language=en_US)
15. Collapse the transformation window and add an output node to the transformation.
16. Create a DMO for the output.
    1. Select **Create New**.
    2. For Write Mode, select **Replace**.
    3. Enter an object name to identify the object that stores the hashed values.
    4. Update the Object API name to match the object name.
    5. Select **Contact Point Email ID** as the primary key and **Key Qualifier Contact Point Email ID** as the key qualifier.
    6. Click **Apply**.
17. Click **Save**.
18. On the Data transform home page, select the transform you created and click **Run Now**.
    
    You can also choose to schedule the transform to run at specific intervals.
    
    After the transform runs, the hashed data is stored in the output DMO.

## Map Output DMO to Individual DMO

Add a relationship between the output DMO with the hashed data and the Individual DMO.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d64300e880">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e880 ">To map data</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e880 ">Data Cloud Architect permission set</td>

            </tr>
          </tbody>
        </table>

1. In Data Cloud, go to the Data Model tab.
2. Search for and select the output DMO with the hashed data. If you can’t find the DMO, change the List View from **Mapped** to **All**.
3. On the Relationships tab, click **Edit**.
4. Click **New Relationship** and enter this information. 
    1. For Field, select **Party**.
    2. For Cardinality, select **N:1**.
    3. For Related Object, select **Individual**.
    4. For Related Field, select **Individual ID**.
5. Click **Save**.

## (Optional) Create Identity Resolution Rules

To link multiple sources of data about the same person or account into a unified profile, create identity resolution rules. The unified data is consolidated in the Unified Individual DMO.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d64300e1013">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e1013 ">To create identity resolution rules </td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e1013 ">Data Cloud Architect permission set</td>

            </tr>
          </tbody>
        </table>

1. [Create identity resolution rulesets.](https://help.salesforce.com/s/articleView?id=data.c360_a_identity_resolution_ruleset_create.htm&release=264.0.0&type=5 "Get started with identity resolution by setting up a ruleset to unify accounts, individuals, leads, or households. The primary data model object for your ruleset determines which records are unified. Match and reconciliation rules you add to your ruleset after creating it guide how records are matched.")
2. [Configure identity resolution match rules.](https://help.salesforce.com/s/articleView?id=data.c360_a_match_rules_configure.htm&release=264.0.0&type=5 "Specify how identity resolution identifies matching records in Data 360.")
3. [Configure reconciliation rules.](https://help.salesforce.com/s/articleView?id=data.c360_a_reconciliation_rules.htm&release=264.0.0&type=5 "A reconciliation rule specifies how to select a single value to save to a unified field that can’t have multiple values, such as an individual’s name, during the identity resolution process. Reconciliation rules are set at the object level and can be overridden by field-specific reconciliation rules. The reconciliation process doesn’t delete or change any source profile data, update your connected source systems, or tell you which source data to use when working with your customers.")
4. On your ruleset record home page, click **Run Ruleset**.

## Create a Segment

You can only share segments in a clean room. Create segments based on the Individual or Unified Individual DMO. Each segment must contain a unique segment name and match key.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
          <colgroup>
            <col style="width:50%">
            <col style="width:50%">
          </colgroup>
          <thead class="slds-text-title_caps ">
            <tr class="">
              <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:left;vertical-align:top;" id="d64300e1105">User Permissions Needed</th>
            </tr>
          </thead>
          <tbody>
            <tr class="">
              <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e1105 ">To create a segment</td>

              <td class="slds-cell-wrap" style="vertical-align:top;" headers="d64300e1105 ">One of these permission sets: Data Cloud Architect, Data Cloud Activation Manager, or
                Data Cloud Activation Specialist. </td>

            </tr>
          </tbody>
        </table>

1. [Create a segment](https://help.salesforce.com/s/articleView?id=data.c360_a_create_a_segment.htm&release=264.0.0&type=5 "Create a standard segment based on a data model object and then publish the segment to activation targets.").
2. (Optional) For more complex segment criteria, use the [Segment Canvas](https://help.salesforce.com/s/articleView?id=data.c360_a_segment_canvas_interface.htm&release=264.0.0&type=5 "Use the segment canvas in Data 360 to select direct and related attributes to narrow down a created segment to your target audience.") to build segment rules.
3. [Publish a segment.](https://help.salesforce.com/s/articleView?id=data.c360_a_publish_segment.htm&release=264.0.0&type=5 "After defining your segment in Data 360, you can publish it to your activation targets whenever you want or based on a schedule when the segment was created. The standard publish schedule is 12 or 24 hours. You can also change the segment schedule by editing its properties. When you’ve reached the segment publish concurrency limit, Data 360 defers the publish of other segments. This deferral continues until the number of simultaneously running segments falls below the limit. This means that a segment scheduled at a specific time sometimes doesn’t start publishing at its scheduled time.")