---
title: Add an Instance
slug: litmusedge-v2/product-features/digital-twins/add-an-instance
description: Learn how to add an instance to a digital twins model. 
docTags: 
createdAt: 2022-09-08T19:10:59.000Z
---

:::hint{type="info"}
**Note**: To access the Digital Twins feature, you need a Scale or Growth Litmus license.&#x20;
:::

You can add a Digital Twins Instance by navigating to **Digital Twins&#x20;**>**&#x20;Instances**.&#x20;

Instances are inherited from a model. They are the actual data objects that contain static and dynamic data from different sources. You must create a model before creating an instance.

# Before You Begin

Before you add an Instance, you will need to create a Digital Twins model. See [Create and Import Models](docId:09KfTUdhJli4UJYVwdCkE) for details.&#x20;

# Step 1: Add Instance

**To add an instance:**

1. Navigate to **Digital Twins***&#x20;>&#x20;***Instances**.&#x20;
   The *Instances&#x20;*&#x70;ane appears.&#x20;
2. From the *Instances&#x20;*&#x70;ane, click the **Add an instance** tile.&#x20;
   The *Add an Instance&#x20;*&#x64;ialog box appears.
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/FCtM5lf-5l6fkVm8-2PhF_addinstance.png" size="80" width="1148" height="490" caption="Add an instance icon" position="center" showCaption="true"}
3. Select a model to associate with the instance. Either search for a model or select one from the list.&#x20;
   ::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/h0tpnhh0XilO6mSD7lQZg_addinstancedialogbox2.png" size="80" width="981" height="354" caption="Add an instance dialog box" position="center" showCaption="true"}
4. Enter the details for the Instance.&#x20;
   - **Name**: Enter a name for the instance. &#x20;
   - **Interval**: Enter the interval between retrieving data from the instance. The minimum interval allowed is one second.&#x20;
   - **Topic**: Review the default topic name for the instance. You have the option of entering a custom topic name.&#x20;
   - **Flatten hierarchy**: Select the checkbox to send hierarchy data in a flat JSON structure. When selected, it will take a nested JSON object and convert it into a JSON object with one layer using dot notation. This is useful when sending JSON objects to InfluxDB, because InfluxDB does not accept nested JSON objects.
5. Click **Add**.&#x20;

# Step 2: Configure Instance

After creating the instance, you can customize the model parameters it is associated with.&#x20;

Click the Instance tile (grid view) to view the instance details.&#x20;

After making changes to an instance, you must save the changes and then restart the instance to implement the updates. See the "Restart Instance" section below.&#x20;

## Static Attributes

The *Static Attributes* tab displays the metadata values for the model the instance belongs to. You can customize the attribute values for the instance.&#x20;

![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/uVea-2brvLRP6AZ3j_IY6_image.png)

| **Action**                 | **Details**                                                                                                                     |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| \[1] **Search Attributes** | Search for static attributes configured in the model the instance is associated with.                                           |
| \[2] **Refresh**           | Refresh attribute values.                                                                                                       |
| \[3] **Import Attributes** | Import Attributes. See [Create and Import Models](docId:09KfTUdhJli4UJYVwdCkE) to learn more about importing static attributes. |
| \[4] **Save Instance**     | Save changes to the instance.                                                                                                   |
| \[5] **Edit**              | Customize static attribute value.                                                                                               |

## Dynamic Attributes

The *Dynamic Attributes* tab displays the variable data attributes configured in the model the instance belongs to. You can map one-to-one relationships with data topics and attributes by updating the topic field for the instance.&#x20;

:::hint{type="warning"}
**Important**: To view data from a topic in the instance payload, you must map the topic to a dynamic attribute.&#x20;
:::

![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/dTbIulFqz7kfCyAY38RO6_image.png)

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/w3jTGnjDZi46jtEFSn-dN_image.png" size="80" width="820" height="280" position="center" showCaption="false"}

| **Action**                  | **Details**                                                                                                                                                                                                                                   |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| \[1] **Search Attributes**  | Search for dynamic attributes in the model the instance is associated with.                                                                                                                                                                   |
| \[2] **Edit**               | You have the option of adding topics from different data sources in Litmus Edge, such as from DeviceHub or an integration. Click the **Edit** icon, and search for a DeviceHub tag or enter the topic name in the **Topic&#x20;**&#x66;ield.  |
| \[3] **Refresh**            | Refresh attribute values.                                                                                                                                                                                                                     |
| \[4]  **Import Attributes** | Import Attributes. See [Create and Import Models](docId:09KfTUdhJli4UJYVwdCkE) to learn more about importing dynamic attributes.                                                                                                              |
| \[5] **Save Instance**      | Save changes to the instance.                                                                                                                                                                                                                 |

## Data Access

The *Data Access* tab allows you to view real-time data for the instance.&#x20;

![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/bGcnkXHGcgeW92mW8mWF4_image.png)

| **Details**                                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------- |
| **\[1]&#x20;**&#x52;eview the topic name and interval configured for the instance. Click the **Copy&#x20;**&#x69;con to copy the topic name.  |
| **\[2]&#x20;**&#x53;ubscribe and unsubscribe for data access to view real-time data for the instance.                                         |

## Restart Instance

After making changes to the instance, make sure to click **Save instance** and then **Restart instance** to implement the updates.&#x20;

![](https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/c5snXObEliR-QDkweOMup_image.png)

