---
schema_version: "1"
id: a8222cb73dc3d0b8e6ff37eb20b65f799c4d3fbf6800fefb7f715705eb39fa62
title: Build the Levels Seeding Template for Salesforce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/seeding_o_build_levels_template.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.seeding_o_build_levels_template.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 5b5bc07fdc2f98f31bae613c19f821316cde48419d00d9b49ddca53a041b38d4
description: Build the Levels Seeding Template for a Levels Seeding job. You can also set up the job to anonymize the data.
products:
  - Security
  - Salesforce Platform
release: "264"
---
# Build the Levels Seeding Template for Salesforce

Build the Levels Seeding Template for a Levels Seeding job. You can also set up the job to anonymize the data.

- **[Node Context Menu for a Levels Template in Salesforce](https://help.salesforce.com/s/articleView?id=platform.seeding_o_levels_template_node_menu.htm&release=264.0.0&type=5)**  
    The Node Context Menu for a Levels Template provides several options for managing Root nodes.
- **[Editing a Levels Template for Salesforce](https://help.salesforce.com/s/articleView?id=platform.seeding_o_edit_levels_template.htm&release=264.0.0&type=5)**  
    When opening an existing Levels seeding template, it opens in view-only mode. You can edit a seeding template if another user isn't editing the template. Master admins can edit locked templates.

## Set Up the Levels Seeding Template

Upon creation of a new Levels template, the template automatically opens in Edit mode in the Template Builder tab. You can continue setting up an existing template.

To continue building an existing Levels template, select it in the Templates tab, which then opens it in view-only mode in the Template Builder tab. Click **Edit** to place the template into Edit mode. In the Template Builder tab, when viewing a locked seeding template (locked by another user for editing, as indicated by the display of the Lock icon in the upper right of the UI), users assigned the Master Admin role have use of the **Make me editor** link.

Master Admin users can find this link by hovering over the Lock icon. This expands and shows a message about the template being locked for edit, followed by the **Make me editor** link.

Clicking **Make me editor** changes the seeding template's display to show the latest version, keeps the template in Edit mode, and assigns the Master Admin user as the current editor. The Master Admin user can then change the template and also publish the template.

1. In the Roots panel of the Template Builder tab, click **+Add Root**. A drop-down menu opens that contains a listing of root objects from which to select.
    1. In the drop-down menu, either scroll through the listing of root objects or filter by typing to find a desired root object. Click to select that object. The tile of the selected object appears in the Roots panel.
    2. Objects having more than 30 mandatory parents aren't allowed as root objects in the template. Attempting to add such a root object results in a UI validation error.
    3. The parenthetical number that displays in the **\+ Add Root** button identifies the number of Template Source root objects that are available to select.
    4. As necessary, click **\+ Add Root** to select additional root objects to include in the Levels template.
2. In the Roots panel, you can click an object tile's three dots menu button to display its context menu. From the context menu, select the **Filter** option to filter and control the root object records to be retrieved for seeding. For more information, see [Filtering the Data for Seeding](https://help.salesforce.com/s/articleView?id=platform.seeding_o_filter_data.htm&release=264.0.0&type=5 "Control the number, order, and type of records that are seeded for a selected template object.") and [Filtering Object Records for Seeding](https://help.salesforce.com/s/articleView?id=platform.seeding_o_filter_object_records.htm&release=264.0.0&type=5 "Limit the records used for seeding to control which data is copied. Filtering object records helps make seeding more efficient and relevant for its specific purpose, such as testing. Strategic filtering prevents the inclusion of unnecessary or problematic data, such as redundant child objects or unconverted leads, which maintains data integrity.").
3. In a <root object>'s Settings pane:
    1. Use the Object level depth selector to define the number of levels of child objects of the root object that you want to include in the Levels template. Each level includes:
        
        - Root +1: All child objects of the selected root object
        - Root +2: All child objects of level 1 (child) objects (grandchildren of the selected root object)
        - Root +3: All child objects of level 2 (child) objects (great-grandchildren of the selected root object)
        - Root +4: All child objects of level 3 (child) objects (great-great-grandchildren of the selected root object)
    2. After defining the object level depth for the root object, you can generate a root object hierarchy diagram that provides you with a visual rendering of all the specific child objects that are included at each level you defined, including possibly discovering that certain of the defined levels do not contain any child objects at all. For details about this capability, see Generate Root Object Hierarchies.
    3. In the Records limit for each child fields, define the following requirements for the retrieval of child object records to be seeded (applied to all defined child object levels of the root object):
        
        - Limit retrieved child records to either the oldest record entries (limit to the oldest...) or the newest record entries (limit to the newest...)
        - The maximum number of records to retrieve for each child object
        
        For example, if for the root object Event you selected limit to the newest... 99 records, then a maximum of the most recent 99 records can be retrieved for each of its child objects, even if a child object contains way more than 99 records.
    4. In the Root parent objects field, click **+** to display a dropdown menu that lists non-mandatory parent objects. From the drop-down menu, select any non-mandatory parent objects of the root object to include in the Levels template. Clicking outside the drop-down menu, displays your selections in the Root parent objects field. If a root object has mandatory parent objects, these mandatory parent objects are automatically included in the Levels template (you don't need to select them) and they display in the Root parent objects field.
        
        Mandatory parent objects can't be removed from a Levels template, all the while their associated root object is included in the Levels template.
        
        When mandatory and non-mandatory (m/n-m) parent objects in the Root parent objects field have their own mandatory parent objects, their tile displays a circle containing a number. That number represents the number of mandatory parent objects that the specific (m/n-m) parent object has. Hovering over the circle displays a tool tip naming the mandatory parent objects of that specific (m/n-m) parent object.
    5. In the Excluded child objects field, click **+** to display a dropdown menu that lists all available objects.
        
        All available objects are shown regardless of whether they are related or not related to the selected root object.
        
        From the dropdown menu, select the child objects of the root object whose records you want excluded from being seeded when using the Levels template. You may decide to exclude certain objects from being seeded because they aren't needed or because they're too large and require much storage space. Clicking outside the drop-down menu, displays your selections in the Excluded child objects field. Child objects selected for exclusion only pertain to the root object whose settings you're currently defining. The application does seed the records of excluded child objects, when those child objects are a mandatory parent of other child objects that are included in the root object hierarchy.
4. Click **Save**.
5. Click **Publish**. Doing so makes your Levels template updates available to anyone who will use this Levels template for executing a seeding job.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-own_from_salesforce-264-0-0-production-enus/8ac98673-ede2-4046-a41e-2d5c846f24ff/images/icon_note.png)

Note

Note of the Last update <date> field - located in the bar immediately above the Roots panel, this field reports the date of the most recent changes to the Levels template.

## Generate Root Object Hierarchies

The Levels template enables users to generate a diagram of the hierarchy of one or all of the template's root objects. Generated root object hierarchy diagrams provide users of Levels templates a tangible understanding of the specific objects being included in the template and, therefore, an informed understanding of the records to be seeded when they use that specific Levels template in a seeding job. Hierarchy diagrams also afford the user the opportunity to identify missing child objects to include and unnecessary child objects to exclude, via modifying the defined object level depth of the Levels template.

1. In the Template Builder tab, when either viewing or editing a Levels template, generate root object hierarchies using any of the following options:
    1. Click the **View Hierarchy** link - located on the right of the Object level depth selector in the <root object> Settings pane.
        
        - If the root object is newly added (or deleted and subsequently re-added) to the template, clicking generates the object hierarchy of that specific root object. During hierarchy generation, which can take some time, the <root object> Hierarchy View page opens and displays a processing progress bar. Once generation completes, the object hierarchy displays in the Hierarchy View page.
        - If the root object's hierarchy was previously generated but, since that generation, you updated the object's settings, clicking regenerates that hierarchy. During hierarchy regeneration, which can take some time, the <root object> Hierarchy View page opens and displays a processing progress bar. Once re-generation completes, the object hierarchy displays in the Hierarchy View page.
        - If the root object's hierarchy was previously generated and, since that generation, you didn't update the object's settings, clicking opens the <root object> Hierarchy View page that displays the existing object hierarchy.
    2. Click the **Generate Hierarchies** link - located in the bar immediately above the Roots panel.
        
        Clicking Generating Hierarchies generates or regenerates the object hierarchy of each root object currently included in the Roots panel.
2. To display a specific, generated, root object hierarchy, select that root object in the Roots panel and then click **View Hierarchy** in the <root object> Settings pane. The <root object> Hierarchy View page opens and displays the selected root object's hierarchy diagram.

A generated, root object hierarchy diagram presents the following:

- The root object
- On the root's right, each of its (non-excluded) child objects, if any, in a Children column per child object level (defined by the Object level depth selector)
- On the root's left, each of its parent objects, if any, in a Parents column that contains mandatory parent objects and nonmandatory parent objects appearing in the Root parent objects field.

![Root object hierarchy diagram](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-own_from_salesforce-264-0-0-production-enus/8ac98673-ede2-4046-a41e-2d5c846f24ff/own_from_salesforce/images/seeding_o_root_object_hierarchy_diagram.png)

To cancel the generation of a root object hierarchy during hierarchy generation, click the X located to the right of the displayed progress bar.

For a generated hierarchy diagram, note in the <root object> Hierarchy View page:

- Last generated: field - located in the upper right of the page, this field reports the <date time> of the most recent, completed generation of that root object hierarchy.
- Regenerate button - located in the upper right of the page, clicking Regenerate regenerates the page's root object hierarchy diagram.
- <Back> link - located in the upper left of the page, clicking Back returns you to the Template Builder tab without canceling the generation of the hierarchy. Generation of the hierarchy diagram continues, in the background, to completion.

## Configure a Seeding Template to Anonymize As Part of a Seeding Job

As part of the execution of a seeding job, you can anonymize the data of the service that is defined as the Template Source in the seeding template. This gives you the ability to anonymize the seeding source's data - personally identifiable information (PII), sensitive information, classified information - before that data is copied to (seeded in) the destination.

A seeding template's Template Source is referred to as the Seeding Source, when defining and executing a seeding job.

To anonymize the data from the seeding source, the seeding template must be set up with the name of an anonymization template you want to use to anonymize the data.

To anonymize data as part of the execution of a seeding job, use a seeding template selected for the seeding job and define and execute the seeding job, whether manually executed or by schedule. The Seeding application retrieves the seeding source's data. The Anonymize application uses the anonymization template that is referenced in the Anonymization Template field of the seeding template to anonymize the retrieved seeding source data. The Seeding application copies (seeds) the anonymized seeding source data in to the destination that is defined for the seeding job.

When data anonymization is performed as part of the execution of a seeding job, no Anonymization Report is produced for the anonymization. The anonymization processing phase of the seeding job is reported in the Seeding Report of that seeding job, including any associated warnings and errors.

For information about defining and executing a seeding job, see [Execute a Seeding Job for Salesforce](https://help.salesforce.com/s/articleView?id=platform.seeding_o_execute_job.htm&release=264.0.0&type=5 "After your seeding template is built, you can use it in a seeding job to copy (seed) data into a Salesforce sandbox or into a Salesforce production org. You can do this directly from the Template Builder tab. If the Seed... button isn't available in the Template Builder tab, contact your administrator to grant you the required permission.").

Define a reference to an anonymization template in a seeding template.

1. In the Seeding application’s Templates tab, select a seeding template in which you want to define a reference to an anonymization template. The seeding template displays in the Template Builder tab.
2. If the selected seeding template is currently not in Edit mode, click **Edit**. The seeding template transitions to Edit mode.
3. From the Anonymization Template field's dropdown menu, select the name of an anonymization template that you want to use to anonymize the Template Source's data.
4. Click **Publish**. The seeding template is updated with the reference to the selected anonymization template and transitions to view-only mode.