> 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/adding-objects-to-a-template.md).

# Adding Objects to a Template

## ![](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

This article explains how to add a related object to your root object in the Template designer. Objects are related to each other in a parent-child relationship. Review the section on object connections in the following article to learn more about the object relationships.

* [Overview of Templates](/data-migrator/templates/template-designer/overview-of-templates.md#object-connections)

After adding objects to a template, see the following article to learn how to add fields to objects.

* [Adding Fields to Objects](/data-migrator/templates/template-designer/adding-fields-to-objects.md)

{% hint style="info" %}
Objects can be added to any object, not just the root, allowing for customizable templates to meet specific migration requirements.
{% endhint %}

{% hint style="warning" %}

#### Preserving Relationships

To preserve the link between parent and child records during migration, migrated child records must include the **Relationship Field** that connects them to their parent. This applies to both Master-Detail and Lookup relationships. To learn more about this, see the following article.

* [Preserving Object Relationships](/data-migrator/templates/template-designer/preserving-object-relationships.md)
  {% endhint %}

## Add Child and Parent Objects

{% hint style="info" %}

#### Adjusting Template Canvas

To ensure the items you are working with fit on your display, you may need to adjust the canvas view. Here's how you can manipulate the canvas:

* **Zoom In and Out**: Adjust your view by using the mouse scroll wheel or by pinching in or out on your trackpad to change the zoom level.
* **Pan Across the Canvas**: Click and hold the canvas, then drag in any direction to move your view around and explore different areas.

Experiment with these tools to optimize your workspace and view all necessary items comfortably.
{% endhint %}

{% stepper %}
{% step %}

### Select Template

1. Click **Templates** from the left sidebar menu.
2. Click the template to add objects to.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FS78bjRkZ4epby86F34u4%2FAddingObjectsToATemplate-S01-01.png?alt=media&amp;token=a6fea7c2-cf13-41be-adab-753f3b461009" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Add Child Objects

1. Hover the cursor over the object to add a child object to.
2. Click the **+** icon below the object to display the child object selector.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FOcho538nCNqmAxnugJun%2FAddingObjectsToATemplate-S02-01.png?alt=media&amp;token=adfe6b35-4a0d-4c85-ae95-0403867ba44a" alt="" width="563"><figcaption></figcaption></figure></div>
3. Search or scroll to find the child object to add.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FhiyjVvnO7qCHylKk8GaS%2FAddingObjectsToATemplate-S02-02.png?alt=media&amp;token=6a9baf3c-454e-48d0-879f-524c3774e960" alt="" width="563"><figcaption></figcaption></figure></div>
4. Click the object to add.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FQMYANj1uHyJv5t5FfEQz%2FAddingObjectsToATemplate-S02-03.png?alt=media&amp;token=94d68b0f-6e2b-4c96-be05-8f2cb138fa77" alt="" width="563"><figcaption></figcaption></figure></div>
5. Once added, the child object will appear on the canvas with a line connecting the parent object's bottom to the child object's left side.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FxnyfG9nFlKagvJCHSYys%2FAddingObjectsToATemplate-S02-04.png?alt=media&amp;token=63e8554a-8cac-4815-a60a-c42070fc5228" alt="" width="563"><figcaption></figcaption></figure></div>
6. Repeat this process to add as many child objects as you need.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FWd6Z4G1Q3dDE76SkR534%2FAddingObjectsToATemplate-S02-05.png?alt=media&amp;token=ba532161-a6bc-4f76-b6f2-4fb7ddc32174" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### Add Parent Objects

1. Hover the cursor over the object to add a parent object to.
2. Click the **+** icon above the object to display the parent object selector.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2Fs2IW3kXUTW9bwE5y9JnV%2FAddingObjectsToATemplate-S03-01.png?alt=media&amp;token=6ef2d381-4e88-4516-bcc9-2a87e09df5c4" alt="" width="563"><figcaption></figcaption></figure></div>
3. Search or scroll to find the parent object to add.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FwbK0fQvRCMmuQal1JmmF%2FAddingObjectsToATemplate-S03-02.png?alt=media&amp;token=2609f263-63a8-4e40-847d-dab208787eb5" alt="" width="563"><figcaption></figcaption></figure></div>
4. Click the object to add.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FiieU55lFv6pnJUYTC2OT%2FAddingObjectsToATemplate-S03-03.png?alt=media&amp;token=b07dd0ac-ce22-4b32-8a6d-6c384409b8d0" alt="" width="563"><figcaption></figcaption></figure></div>
5. Once added, the parent object will appear on the canvas with a line connecting the child object's right side to the parent object's top.

   <div align="left"><figure><img src="https://2769999621-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvaxzColPOlNbsq4imqpd%2Fuploads%2FWQ3ZXWjvzdKQGW8BtaEg%2FAddingObjectsToATemplate-S03-04.png?alt=media&amp;token=ba9d1088-1f44-4336-be92-d2240c50c886" alt="" width="563"><figcaption></figcaption></figure></div>
6. Repeat this process to add as many parent objects as you need.
   {% endstep %}

{% step %}

### Save Changes

Once you are done adding objects to 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%2FEQ9eFULtRewwSK1NKxhU%2FAddingObjectsToATemplate-S04-01.png?alt=media&amp;token=0abdd459-6de5-4a4d-860e-1544eebf357f" 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/adding-objects-to-a-template.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.
