> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/data-migrator/templates/template-designer/setting-migration-record-limits.md).

# Setting Migration Record Limits

## ![](https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FcfMTqg4Brbm9baWutclZ%2FSummary2-Small-Icon.svg?alt=media\&token=d1cf162d-c02d-4184-988e-7f7350e450fc) Overview

Data Migrator allows you to limit the number of Root object records that are transferred during a migration. This is especially useful when moving data from production to a sandbox environment with lower record limits. The instructions below explain how to enable the Migration Record Limit feature.

### Important Record Limit Considerations

The **Limit** value applies only to the number of root object records. Other objects in the template can include any number of records in the migration, regardless of the Limit setting.

As a result, the total number of records transferred during a migration is often many times higher than the Limit value. For example:

* Your template contains 5 objects: 1 root object and 4 child objects.
* The root object has a Limit of 100 records.
* The source organization contains 1,000 root object records, and each child object contains 50 records per root record.
* When the migration runs, the total number of records transferred is calculated as follows:
  * **100** (root object records) × **4** (child objects) × **50** (records per child object)
  * Total records transferred: **20,000**

Because child records multiply the total volume of records, estimate the average number of child records associated with each root record before you set the Limit. Use this estimate to select a **Limit** value that aligns with the target organization's capacity.

{% hint style="warning" %}

#### Combining Root Record Limit with Record Mapping

When a root record limit is set, Data Migrator queries your Salesforce org for that limited number of records each time a migration runs. If the total number of records for the root object exceeds the limit, the set of records returned may vary across migrations because of how Salesforce executes the query.

As a result, combining the root record limit with record mapping can cause the number of root records in your target organization to grow with each migration, since a different subset of records may be migrated each time. Eventually, all records from the source will be migrated to the target.
{% endhint %}

## Set Root Object Limit

{% stepper %}
{% step %}

### Select Template

1. Click **Templates** from the left sidebar menu.
2. Click the template to set a Root Object Limit.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FKvXfkOuruUdTS74fEKNB%2FSettingMigrationRecordLimits-S01-01.png?alt=media&amp;token=4401433d-bbf1-4d33-8f50-d24ce62c13ce" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Set Limit

{% hint style="warning" %}
Only the **ROOT** object has the object **Limit** setting.
{% endhint %}

1. Click the **ROOT** object.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FryAM5uMKcR8jw01lW3fm%2FSettingMigrationRecordLimits-S02-01.png?alt=media&amp;token=20c408da-fcd4-4da5-83a2-3af011f58879" alt="" width="563"><figcaption></figcaption></figure></div>
2. Click the **Settings** tab.
3. Click **Add Limit** in the **Limit** section.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2Fgo57EWbMc1OzJd6FjZxa%2FSettingMigrationRecordLimits-S02-02.png?alt=media&amp;token=dd0339d2-5be8-4a9e-9cca-99284dca118a" alt="" width="563"><figcaption></figcaption></figure></div>
4. Enter a record limit in the **Limit** number box.

{% hint style="info" %}
To remove the limit, click the **Minus** button to the right of the Limit.
{% endhint %}

5. Click **Save**.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2F9WGxSOe13541g75EhUdT%2FSettingMigrationRecordLimits-S02-03.png?alt=media&amp;token=1a25d088-bf45-491e-b433-9498edf55733" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Save Template

Once you have set the limit, save the template.

1. Click **Save template** to save your changes.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FT1t2n1zakh47B7avUIrd%2FSettingMigrationRecordLimits-S03-01.png?alt=media&amp;token=c02f87c7-ead4-49ba-859b-386c19819e3b" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/data-migrator/templates/template-designer/setting-migration-record-limits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
