---
title: "Walkthrough: Preparing Sitecore for synchronizing a text file"
slug: "walkthrough--preparing-sitecore-for-synchronizing-a-text-file"
abstract: "Guide to preparing Sitecore for synchronizing a text file using Sitecore Data Exchange Framework."
---
# Walkthrough: Preparing Sitecore for synchronizing a text file

This walkthrough is part one of [Synchronizing data from a text file to Sitecore walkthrough series](https://doc.sitecore.com/xp/en/developers/def/80/data-exchange-framework/synchronizing-data-from-a-text-file-to-sitecore-walkthrough-series.html "Synchronizing data from a text file to Sitecore walkthrough series") and describes how to prepare for constructing a data synchronization of a text file.

The walkthrough describes how to:

- Create a text file with test data
- Create a tenant in Sitecore
- Create a target item template
- Add a parent item for target items

<details>
<summary><h2>Create a text file with test data</h2></summary>

This example source file contains information about cities. Each row in the file represents a different city. The first line in the file contains the names of the columns in the file.

> [!note]
> You only need this file in order to complete the walkthrough series. It has no purpose other than as an example.

To create this source file in Data Exchange Framework:

1. Create a new file, for example, `C:\Sitecore\cities.dat`

    > [!important]
    > You can place this file wherever you want, but it must be accessible from your Sitecore server. This includes file permissions.

2. Add the following text to the file:

    ```

    id,country,city
    fr1,France,Paris
    dk1,Denmark,Copenhagen
    jp1,Japan,Tokyo
    us1,United States,New York
    us2,United States,Los Angeles
    ```

3. Save the file.

</details>

<details>
<summary><h2>Create a tenant in Sitecore</h2></summary>

A tenant is the parent item for all of the settings related to a set of related data synchronization processes. In this example, you use a tenant to group the settings needed to read data from a text file and to create Sitecore items from that data.

To add a tenant:

1. In the Content Editor, navigate to */sitecore/System/Data Exchange*.
2. On the ribbon, on the **Home** tab, click **Empty Data Exchange Tenant** to add a new tenant, and name it *File System Provider Test Tenant*. Click **OK**.

    > [!note]
    > While Sitecore is creating the tenant, it displays the progress in the Creating tenant dialog.

3. When the tenant has been created, in the content tree, select the new tenant, for example, *sitecore/System/Data Exchange/File System Provider Test Tenant*.
4. On the **Content** tab, select the **Enabled** check box.
5. Save the item.

</details>

<details>
<summary><h2>Create a target item template</h2></summary>

In this walkthrough each row from the source text file represents information about a city. The data synchronization process maps the data from the text file to a Sitecore item. In order to store this information you must create a Sitecore template to store this information, add an icon to the template, and assign the data fields to the template.

To create a template:

1. In the Content Editor, navigate to *Templates*. On the menu ribbon, on the **Home** tab, in the **Insert** group, click **New Template**.
2. In the **Select name** dialog, enter the following values:

    | **Name** | *City Information* |
    | --- | --- |
    | **Base template** | *Templates/System/Templates/Standard Template* |

    ![Select name dialog with Name and Base template fields filled in](https://doc.sitecore.com/api/markdown-image/xp/en/developers/def/80/data-exchange-framework/images/select-name-for-city-template.png)

3. Click **Next**.
4. In the **Location** dialog, select *Templates/User Defined*. Click **Next**. In the confirmation dialog, click **Close**.
5. To set an icon for the new template, in the content tree, select the template, for example, *Templates/User Defined/City Information*.
6. In the right-hand pane, on the **Content** tab, click the icon next to title.

    ![City Information icon on Content tab](https://doc.sitecore.com/api/markdown-image/xp/en/developers/def/80/data-exchange-framework/images/icon3.png)

7. In the **Change Icon** dialog, in the **Icon** field, enter, for example, `Office/32x32/pin.png`
8. To add fields to the template, on the **Builder** tab, type *Data* in the **Add a new section** field.
9. In the **Data** section, add the following fields:

    | Name | Type | Shared |
    | --- | --- | --- |
    | **Identifier** | `Single-Line Text` | selected |
    | **Country** | `Single-Line Text` |  |
    | **City** | `Single-Line Text` |  |

    When you have finished, the section looks like the following:

    ![Added fields in Data section](https://doc.sitecore.com/api/markdown-image/xp/en/developers/def/80/data-exchange-framework/images/city-template.png)

10. Save the item.

</details>

<details>
<summary><h2>Add a parent item for target items</h2></summary>

The data synchronization process creates a Sitecore item for each row in the text file. These target items represent, for example, the cities described in the text file. The data synchronization adds the city items as child items under a Sitecore parent item.

You must create the parent item before the synchronization can create the child items.

To add a parent item:

1. In the Content Editor, navigate to */sitecore/Content*.
2. On the ribbon, on the **Home** tab, in the **Insert** group, click **Insert from template**.

    ![Insert from template option on the ribbon](https://doc.sitecore.com/api/markdown-image/xp/en/developers/def/80/data-exchange-framework/images/insert-from-templates.png)

3. In the **Insert from Template** dialog, in the **Template** field, select *Templates/Common/Folder*. In the **Item Name** field, enter *Cities*.

    ![Insert from Template dialog](https://doc.sitecore.com/api/markdown-image/xp/en/developers/def/80/data-exchange-framework/images/insert-from-template-cities-folder.png)

4. Click **Insert**.

</details>