---
title: Create, import, and merge a template
slug: litmusedge/create-import-and-merge-a-template
docTags: 
createdAt: 2026-08-27T16:31:34.839Z
---

Templates let you capture a working Litmus Edge (LE) configuration as a JSON file and reproduce it on other systems. This guide takes you through creating a template file from a configured system, importing it onto a target system, and merging it into a configuration that is already in use.

:::hint{type="info"}
**Note:** Also see [Templates](docId\:tZ2J4N2mKr_ytLjDtI2v1) for overview and background information.
:::

## Before you begin

Before you create and apply a Template, ensure you have:

- A configured LE system whose configuration you want to capture.
- **Modify** permission for config, to create and apply templates. Users with only **View** permission for config, such as the default Viewer role, can open the **Template** tab and see templates and snapshots, but cannot change them.
- A valid LE license on the target system. When the license is invalid, the template listing stays visible but cannot be applied.
- Confirmed that the target system has the drivers and connectors the template needs. Preflight prevents applying an invalid template.

## Step 1: Create the template file

**To capture the current configuration as a template:**

1. Navigate to **System** > **Device Management** > **Template**.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/SlugBVuCOEU-CiEOBOUEf_image.png" size="80" isUploading="false" width="1445" height="674" darkWidth="1445" darkHeight="674" position="flex-start" showCaption="false"}
2. Choose **Manage Templates** > **Create New Template** to create a new template from the current system configuration.
3. Select the components to include. A template must contain at least one module.
4. Choose whether to encrypt  credentials in the template. Record the encryption key. You cannot retrieve it later.
5. Click **Create**. The new template is added to the listing, sorted by creation date with the newest first.
6. From the action menu at the right, select **Download** to export the template.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Uiij1e7tLPv5Ga5H0jfBH_image.png" size="80" isUploading="false" width="1358" height="510" darkWidth="1358" darkHeight="510" position="flex-start" showCaption="false"}

## Step 2: Import the template onto the target system

LE checks the file before adding it. The check has two layers and runs entirely against the file, without touching the live system:

| Check                | What fails it                                                                                                                                                                                               |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| JSON syntax          | A file that cannot be parsed. The error identifies where parsing failed.                                                                                                                                    |
| Internal references  | A reference inside the file that does not resolve inside the same file, such as a Digital Twin instance naming a model the template does not contain. The error identifies the reference by path and value. |
| Version format       | A `version` or `fileVersion` that is not valid `major.minor.revision` format.                                                                                                                               |
| Schema compatibility | A file whose schema version is newer than this LE build supports.                                                                                                                                           |

A file that passes is added to the listing. If the file fails, correct the reported problem and import it again. A file with non-canonical key ordering imports without error. LE reorders it when the template is saved.

**To add the template to another system's listing:**

1. On the target system, navigate to **System** > **Device Management** > **Templates**.
2. To import the template, select **Manage Templates** > **Upload New Template**.

   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/KJsCajR0sW9tXmpjawvBn_image.png)
3. Select the JSON file you exported and open it.
4. In the *Upload Templates* dialog, name the template and click **Upload**.

The template uploads and is added as a listing.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/MoZktWa9Dbe1TpddCc-X9_image.png" size="80" isUploading="false" width="1361" height="416" darkWidth="1361" darkHeight="416" position="flex-start" showCaption="false"}

## Step 3: Review the template before you apply it

This step matters most before a merge. A merge overwrites items whose IDs already exist on the target system, so knowing what the template contains tells you what is at risk.

**To confirm the template contains what you expect:**

1. Click the open template icon in the **Template Statistics** column for the imported template. The *Template Details* pane opens at the right.
2. Review the component sections.
3. If the template defines parameters, review the parameter list and note the values you need.

## Step 4: Merge the template into the current configuration

**Merge & Apply** combines the template with the configuration already on the system. Items with new IDs are added and items whose IDs already exist are overwritten.

Preflight runs before anything is captured or written. If any connector or driver the template references is missing on this system, the apply is blocked and a report identifies each missing item by component type, reference path, and value. Resolve those items, then start again. A blocked apply makes no changes and takes no snapshot.

**To merge the template:**

1. In the template listing, select **Apply Template** from the action menu at the right. The *Apply Templates&#x20;*&#x64;ialog opens.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/PGO2yxcwZMlOvww24vUGI_image.png" size="80" isUploading="false" width="802" height="442" darkWidth="802" darkHeight="442" position="flex-start" showCaption="false"}
2. Turn on **Advanced Modes**, select **Merge & Apply**, and click **Next**.

   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/8F0y7y3WK_bAhsePaZ4UT_image.png" size="80" isUploading="false" width="802" height="732" darkWidth="802" darkHeight="732" position="flex-start" showCaption="false"}
3. In **Merged Template Name**, specify a name for the merged template that LE creates to apply to the LE instance. For example, `Merge_TemplateName_20260831`. Then, type `I understand` in the confirmation at the bottom. Click **Next**.

   :::hint{type="info"}
   **Note:** LE takes a snapshot of the current configuration, builds a new template from the current configuration and the one you selected, and applies the result. The merged template is saved to the listing and becomes a template you can reuse.
   :::
4. In *Credential Format*, choose whether to encrypt.
5. If the template defines parameters, enter a value for each one. Leave a parameter blank to use its default. LE rejects a value that does not match its declared data type, such as a decimal entered for an `INTEGER`, and names the parameter to correct.
6. Click **Apply**. A message indicates that the template is being applied.

If the apply succeeds, the *Template Applied* dialog shows its status. If a component reports an error, the message names the component that failed and gives the reason. Digital Twins skips any model it can't restore and applies the rest.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/luNgKOyAnLsbNow6upRp9_image.png" size="80" isUploading="false" width="1359" height="633" darkWidth="1359" darkHeight="633" position="flex-start" showCaption="false"}

### Merge conflicts

The *Merge Conflict Warning* dialog appears when the template contains items whose IDs already exist on the system. It reads: `Some components in the selected template have the same IDs as components in the current configuration. Continuing will overwrite all matching components. Do you want to continue?`

:::hint{type="warning"}
**Caution:** The overwrite prompt is all or nothing. Clicking **Yes** overwrites every conflicting item. Clicking **No** closes the dialog, returns you to **Apply Templates**, and sends no request, so the entire merge is abandoned rather than partially applied. If you are unsure what a template will overwrite, cancel and review the template details first.
:::

## Step 5: Verify the template applied

**To confirm the merge worked:**

1. Navigate to the component areas the template provisions, such as **DeviceHub** or **Digital Twins**.
2. Confirm that the items named in the template details are present.

   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/btAvW9RE9QDjsi2BwmBsf_image.png)
3. If the template used parameters, confirm that the values you entered appear on the provisioned items rather than the defaults.
4. On the **Template&#x20;**&#x74;ab, click **Snapshots**.
5. Confirm that a new snapshot entry appears at the top of the history. The newest entry has the **Latest** tag, and its source reads **Automatic · Merge & Apply**. The **Snapshot Timestamp** column shows the relative time and the exact date and time.

The snapshot entry is the clearest signal that the apply completed. LE writes it to history only when the operation succeeds.

:::hint{type="info"}
**Tip:** To capture a snapshot at any time, open the **Snapshots** split button menu and select **Create Snapshot**. Give the snapshot a label, which is pre-filled and editable, and optional notes of up to 512 characters.
:::

## Step 6: Roll back (optional)

**To return the system to the configuration it had before the apply:**

1. On the *Templates* page, click **Snapshots**. The *Snapshots* dialog opens with entries listed newest first.

   ![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/qkHyG4v2ibPHI7OQbZ9NG_image.png)
2. Open the action menu for that entry to rollback to, and select **Rollback**. The *Rollback Preview* dialog opens.
3. Click **Rollback**. A message indicates the rollback is occurring.
4. When the rollback completes successfully, a new snapshots displays in the *Snapshots* dialog.

LE creates a new snapshot entry, then writes the snapshot's configuration to the system. The dialog closes, a success notification appears, and the snapshot history refreshes with the new rollback entry at the top.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/mdB0wXMJEsXFrd4lTzrj-_image.png" size="80" isUploading="false" width="801" height="442" darkWidth="801" darkHeight="442" position="flex-start" showCaption="false"}

**To delete every snapshot except the most recent one:**

:::hint{type="warning"}
**Caution:** You cannot undo **Clear All**.
:::

1. In the *Snapshots* dialog, click **Clear All**.
2. Type `I understand` in the confirmation field. The confirm button stays disabled until you do.
3. Click the confirm button. A message reports how many snapshots were deleted and how many could not be.

:::hint{type="info"}
**Note:** A rollback is itself snapshotted, so you can undo it by rolling back to the entry the rollback created. If the configuration changes between opening the preview and confirming, LE rejects the rollback and asks you to run the preview again.
:::

## Related topics

- [Templates](docId\:tZ2J4N2mKr_ytLjDtI2v1)&#x20;
- [DeviceHub](docId\:bEqeomETSD7CXSM-x9zMc)&#x20;
- [Digital Twins](docId\:F7yUFDBzOQDGxnM5MB6sX)&#x20;
