---
title: "Working with Templates and Instances"
canonical: "https://docs.devo.com/space/latest/315818076/Working%20with%20Templates%20and%20Instances"
format: markdown
---
> Macro (toc)

## What is a template?

Devo Flow templates are designed to streamline data analysis and context sharing within Flow. Use them to create parameters that can be easily inserted into units.

## What permissions do I need?

What you will see in this view is permissions dependent. Users with *Domain flows* permission will see all the Templates in the domain, whereas users with *Own flows* permission will see only Templates created by them.

![image](media://7d233dee-668a-48db-ba71-144b7da19f3e)

## Working with templates

### Template manager

You can view all the available templates in your domain via the [Flow Manager](https://devodocs.atlassian.net/wiki/spaces/latest/pages/134414516).

If it is your first time accessing Flow, you can open the Flow Manager directly from the Flow Homepage.

![image](media://ad19ce0f-b098-4f62-8e82-4387f01d888a)

If you already have a Flow open, click the Flow Manager icon in the left-hand side.

![image](media://82ef6be9-5173-4399-87e8-e3a605c33b59)

The Flow Manager provides information on Flows in your domain in two tabs: [Flows](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213164), and Templates. 

![image](media://3627b377-01b2-4fc8-9a50-638ef4e6af93)

### Managing templates

From this view, you can carry out the following actions:

| **Instantiate template** | ![image](media://5ec8f4a4-53ef-4b91-995a-8741139084ba) | This will create an instance for the selected template. To learn more about instances, see the section below. |
| --- | --- | --- |
| **Load in a new tab** | ![image](media://d68427d4-ddba-4fbf-b344-27cf827c3337) | This opens the Template in a new tab, allowing you to keep the Flow Management view open in a different tab. |
| **Clone** | ![image](media://a95f8884-c997-4e94-947f-32e1989c215f)<br>&<br>![image](media://31c7d968-b733-4cd7-b103-725b0994f72e) | Click this button and then select **Clone **to clone the selected Template.<br>A new window will appear, where you can assign a new name for the cloned Template.<br>Click **Apply **and the new Template will appear. You can now make modifications to this Template without changing the original. |

### Create a Template

These are the basic steps you must follow to define a new Devo Flow Template:

From the **Homepage, **simply go to **New Template:**

![image](media://48aa60ad-aaae-4d0a-affb-b5d3c530a983)

If you are using the** Flow area**:

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> After accessing the **Flow Editor** area, click the go to **File **in the toolbar and select** New template**.
> 
> > Macro (rw-step)
> 
> You can choose to create the Template in a new tab, or disable the **Open in a new tab** tickbox to replace the current tab. The previous Flow will disappear if you did not save it before opening in the current tab.
> 
> > Macro (rw-step)
> 
> Give the new template a name, then select **Apply**. The name of your template will appear at the top of the canvas, next to a color circle that indicates its current status. When you create a template, its status is always *Scratch *(orange) until you first save it. Learn more about flow statuses [here](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213200).
> 
> > Macro (rw-step)
> 
> Now you can start adding the required units to the canvas. Search units in the left panel using the available search box or navigating through the different categories. Select the required units and drop them into the canvas.
> 
> ![image](media://edb9e309-36e9-4b9e-bf43-1bea7cf1bae7)
> 
> > ℹ️ **Alternative ways to add units**
> > ℹ️ 
> > ℹ️ You can also add new units by right-clicking anywhere on the canvas and selecting **Add unit.**
> 
> > Macro (rw-step)
> 
> Once you have created and configured all the units required for the template, you can change some of the configurations using **Parameters**.** **When the template is instantiated, you can use parameters to adapt and insert your own data variables.** **
> 
> Let’s say you have a template containing a [Tick](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214835) unit, a [Repeater](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214715), and a [Devo Sink](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214553) unit. However, you wish to modify specific parameters of the Tick unit without having to redo the Flow.
> 
> Click the **parameters** icon to open the form.
> 
> ![image](media://ffdfa8b6-2525-4484-8a33-2731440081ee)
> 
> > Macro (rw-step)
> 
> Select **Add parameter **and fill in the properties:
> 
> ![image](media://c5b5d5b8-10c9-4b64-964b-f22978eb8af3)
> 
> In the original Flow, the Tick will send an integer of 4 as specified in its properties. With this new parameter, we are modifying this integer value to 3, whilst maintaining the rest of the Flow chain.
> 
> Select **Create **and the new parameter will appear in the list.
> 
> > ℹ️ **Save your template to save new parameters.**
> > ℹ️ 
> > ℹ️ If you add or modify any parameter, keep in mind that the changes will not be reflected in your template until you save it.
> 
> > Macro (rw-step)
> 
> You can only run Flows and Instances. Therefore, in order to use a template, it must be instantiated. 
> 
> Go to **File → Instantiate template.**
> 
> > Macro (rw-step)
> 
> In the **New Instance **window, enter a name and select **Create instance.**
> 
> ![image](media://1f751e3d-5e15-48b8-b5bc-611584ce3e28)
> 
> A new window will open with your instance, indicating that your Template is ready to use.
> 
> To learn more about **instances**, see the section below.

### Publish a template

Once you have initiated a Template, instead of having to reinstantiate it every time you make changes, you can **Publish **it to reflect any changes made. For this, use the **Publish **option in the toolbar.

![image](media://86bd5a87-b02c-4d81-a8f7-92c970251af0)

This way, modifying the original template will also modify it in any instances it is contained in.

> Macro (rw-ui-textbox-macro)
> 
> **Icon greyed-out?**
> 
> You must first **Save **the Template using the option in the toolbar in order to enable the **Publish **button.
> 
> ![image](media://79bb00c6-72cf-4e89-9f17-04806aba14f0)

## Working with Instances

An instance is a Flow created from a Template. The Flow is activated so that you can test it, save it, run it and more.

### Open an instance

You can open an instance in two ways.

If you already have a Flow open, go to **File → Open **and select the instance from the list.

You can filter for instances, or scroll to the desired Instance.

![image](media://a1421e71-9b1d-46c6-9bda-60bdb772faf1)

> ℹ️ **Open in a new tab**
> ℹ️ 
> ℹ️ Make sure to tick this option if you wish to keep the current Flow open. Unticking this option will open the Instance in the same tab, replacing the current tab.

You can also use the [Flow Manager](https://devodocs.atlassian.net/wiki/spaces/latest/pages/134414516) to see a list of instances.

### Using instances

As well as the common [Flow operations](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213331), the Instance toolbar provides buttons specific to instances:

![image](media://c7221579-b5c0-40e5-ab46-00c61b1c6d26)

1. **Parameters: **Click this button to open the **Parameters **window with the available parameters.
2. **Master template: **This will take you to the original template that the instance was created from.

### Detach instance

If you have an instance you wish to convert to a Flow, use the **Detach instance **option in the **File **menu.

![image](media://c48f7184-fde4-4434-903b-61327ea2ba95)

> ℹ️ **Option disabled?**
> ℹ️ 
> ℹ️ You must first save your instance on the server before you can save it as a Flow.

### Template manager

You can view all the available templates in your domain via the [Flow Manager](https://devodocs.atlassian.net/wiki/spaces/latest/pages/134414516).

If it is your first time accessing Flow, you can open the Flow Manager directly from the Flow Homepage.

![image](media://ad19ce0f-b098-4f62-8e82-4387f01d888a)

If you already have a Flow open, click the Flow Manager icon in the left-hand side.

![image](media://82ef6be9-5173-4399-87e8-e3a605c33b59)

The Flow Manager provides information on Flows in your domain in two tabs: [Flows](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213164), and Templates. 

![image](media://3627b377-01b2-4fc8-9a50-638ef4e6af93)

### Managing templates

From this view, you can carry out the following actions:

| **Instantiate template** | ![image](media://5ec8f4a4-53ef-4b91-995a-8741139084ba) | This will create an instance for the selected template. To learn more about instances, see the section below. |
| --- | --- | --- |
| **Load in a new tab** | ![image](media://d68427d4-ddba-4fbf-b344-27cf827c3337) | This opens the Template in a new tab, allowing you to keep the Flow Management view open in a different tab. |
| **Clone** | ![image](media://a95f8884-c997-4e94-947f-32e1989c215f)<br>&<br>![image](media://31c7d968-b733-4cd7-b103-725b0994f72e) | Click this button and then select **Clone **to clone the selected Template.<br>A new window will appear, where you can assign a new name for the cloned Template.<br>Click **Apply **and the new Template will appear. You can now make modifications to this Template without changing the original. |

### Create a Template

These are the basic steps you must follow to define a new Devo Flow Template:

From the **Homepage, **simply go to **New Template:**

![image](media://48aa60ad-aaae-4d0a-affb-b5d3c530a983)

If you are using the** Flow area**:

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> After accessing the **Flow Editor** area, click the go to **File **in the toolbar and select** New template**.
> 
> > Macro (rw-step)
> 
> You can choose to create the Template in a new tab, or disable the **Open in a new tab** tickbox to replace the current tab. The previous Flow will disappear if you did not save it before opening in the current tab.
> 
> > Macro (rw-step)
> 
> Give the new template a name, then select **Apply**. The name of your template will appear at the top of the canvas, next to a color circle that indicates its current status. When you create a template, its status is always *Scratch *(orange) until you first save it. Learn more about flow statuses [here](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213200).
> 
> > Macro (rw-step)
> 
> Now you can start adding the required units to the canvas. Search units in the left panel using the available search box or navigating through the different categories. Select the required units and drop them into the canvas.
> 
> ![image](media://edb9e309-36e9-4b9e-bf43-1bea7cf1bae7)
> 
> > ℹ️ **Alternative ways to add units**
> > ℹ️ 
> > ℹ️ You can also add new units by right-clicking anywhere on the canvas and selecting **Add unit.**
> 
> > Macro (rw-step)
> 
> Once you have created and configured all the units required for the template, you can change some of the configurations using **Parameters**.** **When the template is instantiated, you can use parameters to adapt and insert your own data variables.** **
> 
> Let’s say you have a template containing a [Tick](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214835) unit, a [Repeater](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214715), and a [Devo Sink](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95214553) unit. However, you wish to modify specific parameters of the Tick unit without having to redo the Flow.
> 
> Click the **parameters** icon to open the form.
> 
> ![image](media://ffdfa8b6-2525-4484-8a33-2731440081ee)
> 
> > Macro (rw-step)
> 
> Select **Add parameter **and fill in the properties:
> 
> ![image](media://c5b5d5b8-10c9-4b64-964b-f22978eb8af3)
> 
> In the original Flow, the Tick will send an integer of 4 as specified in its properties. With this new parameter, we are modifying this integer value to 3, whilst maintaining the rest of the Flow chain.
> 
> Select **Create **and the new parameter will appear in the list.
> 
> > ℹ️ **Save your template to save new parameters.**
> > ℹ️ 
> > ℹ️ If you add or modify any parameter, keep in mind that the changes will not be reflected in your template until you save it.
> 
> > Macro (rw-step)
> 
> You can only run Flows and Instances. Therefore, in order to use a template, it must be instantiated. 
> 
> Go to **File → Instantiate template.**
> 
> > Macro (rw-step)
> 
> In the **New Instance **window, enter a name and select **Create instance.**
> 
> ![image](media://1f751e3d-5e15-48b8-b5bc-611584ce3e28)
> 
> A new window will open with your instance, indicating that your Template is ready to use.
> 
> To learn more about **instances**, see the section below.

### Publish a template

Once you have initiated a Template, instead of having to reinstantiate it every time you make changes, you can **Publish **it to reflect any changes made. For this, use the **Publish **option in the toolbar.

![image](media://86bd5a87-b02c-4d81-a8f7-92c970251af0)

This way, modifying the original template will also modify it in any instances it is contained in. A new window will show you the results of the changes.

![image](media://3e9a304e-ff67-43ba-95b4-5894578af652)

> Macro (rw-ui-textbox-macro)
> 
> **Icon greyed-out?**
> 
> You must first **Save **the Template using the option in the toolbar in order to enable the **Publish **button.
> 
> ![image](media://79bb00c6-72cf-4e89-9f17-04806aba14f0)

## Working with Instances

An instance is a Flow created from a Template. The Flow is activated so that you can test it, save it, run it and more.

### Open an instance

You can open an instance in two ways.

If you already have a Flow open, go to **File → Open **and select the instance from the list.

You can filter for instances, or scroll to the desired Instance.

![image](media://a1421e71-9b1d-46c6-9bda-60bdb772faf1)

> ℹ️ **Open in a new tab**
> ℹ️ 
> ℹ️ Make sure to tick this option if you wish to keep the current Flow open. Unticking this option will open the Instance in the same tab, replacing the current tab.

You can also use the [Flow Manager](https://devodocs.atlassian.net/wiki/spaces/latest/pages/134414516) to see a list of instances.

### Using instances

As well as the common [Flow operations](https://devodocs.atlassian.net/wiki/spaces/latest/pages/95213331), the Instance toolbar provides buttons specific to instances:

![image](media://c7221579-b5c0-40e5-ab46-00c61b1c6d26)

1. **Parameters: **Click this button to open the **Parameters **window with the available parameters.
2. **Master template: **This will take you to the original template that the instance was created from.

### Detach instance

If you have an instance you wish to convert to a Flow, use the **Detach instance **option in the **File **menu.

![image](media://c48f7184-fde4-4434-903b-61327ea2ba95)

> ℹ️ **Option disabled?**
> ℹ️ 
> ℹ️ You must first save your instance on the server before you can save it as a Flow.