---
schema_version: "1"
id: 5fb8d80ef23e56449609d99d77695e0cb8724e68b5827f5ca079cec01f2fc23c
title: Use Advanced List Merge to Remove Duplicates (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_create_list_action_remove_duplicates.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_create_list_action_remove_duplicates.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1723a126f3b69e9f92bb48fb3dcc20a3c1f75cceccdf3215f1f83e4ce699ed02
description: For the managed package runtime, the next Integration Procedure uses the Advanced Merge feature to remove duplicates from a list.
products:
  - Omnistudio
release: "264"
---
# Use Advanced List Merge to Remove Duplicates (Managed Package)

For the managed package runtime, the next Integration Procedure uses the Advanced Merge feature to remove duplicates from a list.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

To download a data pack of this example for Omnistudio for Managed Packages, click [here](https://volt.my.salesforce.com/sfc/p/o0000000IKm8/a/Qg0000011QSw/.x7NxA0lrR3FAyBIGHzuvFxVDM7RDMAKbfgEHG7jcp8).

1. [Create a Basic List Merge Example](https://help.salesforce.com/s/articleView?id=xcloud.os_create_a_basic_list_merge_example.htm&release=264.0.0&type=5 "For the managed package runtime, the first Integration Procedure retrieves all Contacts with the same AccountId in two lists, one containing addresses, the other birthdates. It then merges the two lists into one.").
2. Pick one of the Contacts that the basic list merge example retrieves and create another contact with the same Account, first name, and last name.
3. In the Integration Procedure, delete the DRExtractAddresses component.
4. Drag a Set Values action between the DRExtractBirthdates and ListAction1 components and enter CopyList in the **Element Name** field.
5. Under Element Value Map, click **Add New Value**. Enter an **Element Name** of CopyBirthdates and a **Value** of %DRExtractBirthdates%.
6. In the List Action, under **Merge Lists Order**, replace `DRExtractAddresses:contact` with CopyBirthdates:contact.
7. Check **Advanced Merge** and add the following rows to the Advanced Merge Map table:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d284070e141">
                  <p style="margin-bottom:0;">List Key</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d284070e147">
                  <p style="margin-bottom:0;">Matching Path</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d284070e153">
                  <p style="margin-bottom:0;">Matching Group</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="List Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e141 ">
                  <p style="margin-bottom:0;">
                    <code>CopyBirthdates:contact</code>
                  </p>
                </td>

                <td data-label="Matching Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e147 ">
                  <p style="margin-bottom:0;">
                    <code>firstName</code>
                  </p>
                </td>

                <td data-label="Matching Group" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e153 ">
                  <p style="margin-bottom:0;">
                    <code>1</code>
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="List Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e141 ">
                  <p style="margin-bottom:0;">
                    <code>DRExtractBirthdates:contact</code>
                  </p>
                </td>

                <td data-label="Matching Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e147 ">
                  <p style="margin-bottom:0;">
                    <code>firstName</code>
                  </p>
                </td>

                <td data-label="Matching Group" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e153 ">
                  <p style="margin-bottom:0;">
                    <code>1</code>
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="List Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e141 ">
                  <p style="margin-bottom:0;">
                    <code>CopyBirthdates:contact</code>
                  </p>
                </td>

                <td data-label="Matching Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e147 ">
                  <p style="margin-bottom:0;">
                    <code>lastName</code>
                  </p>
                </td>

                <td data-label="Matching Group" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e153 ">
                  <p style="margin-bottom:0;">
                    <code>2</code>
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="List Key" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e141 ">
                  <p style="margin-bottom:0;">
                    <code>DRExtractBirthdates:contact</code>
                  </p>
                </td>

                <td data-label="Matching Path" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e147 ">
                  <p style="margin-bottom:0;">
                    <code>lastName</code>
                  </p>
                </td>

                <td data-label="Matching Group" class="slds-cell-wrap" style="vertical-align:top;" headers="d284070e153 ">
                  <p style="margin-bottom:0;">
                    <code>2</code>
                  </p>
                </td>

              </tr>
            </tbody>
          </table>
8. On the Preview tab, click **Execute**. The output looks something like this, with no duplicates:
    
    ```
    {
      "contactMerge": [
        {
          "birthdate": "1975-10-03",
          "lastName": "Jones",
          "id": "0036100001E5xrWAAR",
          "firstName": "Cathy"
        },
        {
          "birthdate": "1976-10-04",
          "lastName": "Jones",
          "id": "0036100001E5xrvAAB",
          "firstName": "Doug"
        },
        {
          "birthdate": "1973-10-01",
          "lastName": "Smith",
          "id": "0036100001E5xqnAAB",
          "firstName": "Albert"
        },
        {
          "birthdate": "1974-10-02",
          "lastName": "Smith",
          "id": "0036100001E5xr2AAB",
          "firstName": "Ben"
        }
      ]
    }
    ```
9. To see what the list looks like without duplicates removed, in the Response Action, change `ListAction1` to DRExtractBirthdates. Then click **Execute** on the Preview tab again.