Skip to main content

Build Seeding Templates and Run Jobs

Learning Objectives

After completing this unit, you’ll be able to:

  • Identify the prerequisites and initial considerations for Seeding setup.
  • Differentiate between the types of Seeding templates.
  • Prepare, run, and monitor a Seeding job.
  • Monitor job progress and interpret reports.

Now that you understand the benefits of Seeding, let's explore how to set it up and run your first Seeding job. This unit covers the prerequisites for using Seeding, the different types of Seeding templates, and how to prepare, run, and monitor a Seeding job.

Prerequisites and Initial Setup Considerations for Seeding Implementation

Before you start using Seeding, there are a few foundational elements that need to be in place for a smooth and effective process.

  • Understand your Salesforce Schema: Familiarity with your organization's Salesforce schema and object relationships is crucial for building accurate and effective Seeding templates.
  • Define Your Use Case: Clearly outline your specific goal to guide your approach. For example, quality assurance testing might have different data seeding requirements than training. Establishing clear goals helps you decide what type of Seeding template best addresses your needs, how many different templates you require, and what objects to include.
  • Outline Your Org’s Sensitive Data: Plan for anonymizing sensitive data, especially from production, to ensure compliance in sandbox environments.
  • Know Your Org’s Automations: Be mindful of Salesforce trigger automations in your target sandbox, as seeding data can initiate these automations. Seeding offers options to automatically disable and re-enable these automations, like a traffic cop that prevents the automations until you are ready to let them run.
  • Establish the External Account Login for the Seeding Interface: Create the services that are the connections to the relevant orgs and sandboxes.

Nodes, Levels, or Generate Template: Which Should You Use?

Seeding offers three types of templates: Nodes, Levels, and Generate. Understanding the differences between them helps you choose the right approach for your data seeding needs.

Nodes Template

A Nodes template requires you to add every object you want to seed, including your starting root object, any child objects, and any optional parent objects. This process requires a detailed understanding of your source's data hierarchy. Nodes templates offer precise control of the data being seeded.

Consider using Nodes templates for these scenarios:

  • Specific Datasets: For when you need to seed a very precise subset of data and have a clear understanding of the object relationships.
  • Complex Hierarchies: For complex data models where you need to explicitly define every object to be included.
  • Predefined Templates: For complex record-based configurations like Configure, Price, Quote (CPQ), Salesforce Field Service, and nCinoStarter templates and Predefined Nodes, templates are available to address industry-specific use cases. These templates save you time with a baseline of prepopulated data objects that can be further customized according to your ‌org.

Levels Template

A Levels template requires you to add only the root objects you want to seed. For each root object, you can also specify the number of data hierarchy levels below that root to include additional objects. For example, two levels down from an account object means you're selecting objects directly connected to the account, and the objects connected to those objects. This process doesn't require a detailed understanding of your source's data hierarchy.

Consider using Levels templates for these scenarios.

  • Broader Datasets: When you need to seed a broader set of related data without needing to manually select every single object.
  • Simplified Configuration: When you prefer a more streamlined approach to template creation, especially if you know you need all data down a certain hierarchy or are unsure of every specific object.

Generate Template

You build a Generate template object hierarchy in the same manner as you do for a Nodes template–by adding all necessary objects: root objects, child objects, and optional parent objects. With the Generate template, however, you can also generate synthetic data as part of a Seeding job.

When you build a Generate template, it doesn’t require a seeding source but it does require a reference to an anonymize template of your choosing. When you run a Seeding job using a Generate template, the job first generates the necessary synthetic data (100 records per object) using the anonymize template’s object field definitions. Next, the job then seeds that data into the selected sandbox destination, identified in the Generate template. Both templates, the anonymize and the Generate, must be configured with the same objects.

Filter Your Data and Select a Source and Destination

Both Nodes and Levels templates enable you to filter records for Seeding, ensuring you only populate the data you need.

Seeding enables you to populate datasets from a Salesforce production org or from a Salesforce sandbox (these are considered the seeding source) to a variety of destinations, including Salesforce sandboxes (Dev, Dev Pro, Partial Copy, and Full), Scratch orgs, and even to Production orgs. Note that seeding to a Production org requires Master Admin permission and Backup & Recover.

For the most current data, you can seed from the live version of the selected source. Alternatively, you can use a backup version of the source or any other production org’s backup.

Choose Your Seeding Method

When executing a Seeding job, choose from these methods:

  • Incremental: Inserts new records from your template to your destination. Seeding manages only the records it inserts and does not update or modify existing records or records that were manually loaded or created by previous Seeding jobs.
  • Upsert: Inserts new records and updates existing records in your destination.
  • Clean and Insert: This method first deletes all existing records in your destination for each object defined in your Seeding template. Then, it inserts all records from your source for those same objects. Objects not included in your template are not impacted. Seeding does not delete auto-cloned objects like Users, Product2, and PriceBook, which are automatically included when a sandbox is created.

Prepare and Run a Seeding Job

To configure a Seeding job, specify the destination service for your data and select a method (Incremental, Upsert, or Clean and Insert). You also have the option to disable Salesforce automations. After you configure these settings, you can begin the data population process with one click.

Monitor Job Progress and Interpret Reports

After a Seeding job begins, monitor its progress from the Recent Seeds tab. This tab displays the current object being processed, the number of records, and the total number of records that will be seeded.

After the job completes, Seeding sends you an email notification with the status.

You can also access these detailed reports.

  • Seeding Report: Summarizes a completed Seeding job and helps you troubleshoot issues that prevented records from being inserted or deleted. This report includes a summary of failed records, the reasons for failure, the job's duration, and a breakdown of each phase. Errors are grouped by type and object. The report also includes downloadable log files that include all record IDs that were fetched and the new record IDs that were created or updated in the destination. Finally, the report includes an error log file that lists the record IDs that failed to be inserted or updated.
  • Salesforce Automations Report: Lists all Salesforce automations that were disabled at the start of the job and then reenabled upon completion, along with any associated errors or warnings.

Schedule Seeding Jobs

Seeding enables you to schedule both recurring and one-time jobs. This feature is especially useful for maintaining up-to-date sandboxes for ongoing development, testing, or training. For example, you can schedule a weekly job to refresh a sandbox with the latest production data, eliminating the need for manual intervention.

One-time jobs are ideal for specific scenarios, such as preparing a sandbox for a new project, replicating a production bug, or setting up a clean environment for a major demo. Scheduling provides greater control and efficiency by automating routine tasks and provisioning specialized environments precisely when they're needed.

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む