evalinkdocs

Site templates

Set up a site in one step from a reusable template, and manage the templates your company uses.

What a site template is

A site template is a recipe for a complete site. You pick a template, fill in a short form, and evalink talos creates the site with its zones, statuses, schedules, contacts and workflows in one step.

Each template has a Name, an optional Description, and a model written in YAML (or JSON). The model has three parts:

  • Parameters: the fields people fill in when they create a site from the template.
  • Variables (optional): values that are calculated once, before anything is created.
  • Resources: the objects that are created, such as the site itself, its zones or its workflow.

You manage templates in Company › Settings › Sites, in the Site Templates section. You need permission to manage site templates. Without it, you see the list but can't add, export or delete templates.

Create a site from a template

In the Create Site dialog, open the From Template tab, select a Site Template and fill in the fields it asks for. For the full steps, see Create a site.

A site created from a template counts against the site limit of your plan. If the limit is reached, a dialog tells you so and no site is created.

Create a site template

To create a site template, go to Company › Settings › Sites.

  1. In Site Templates, click Add Site Template.
  2. Click New to start from a built-in example (Basic, Best Practice Alarm Connection or Advanced Example), then click Continue. Or click From existing Site and select a site that is already set up the way you want.
  3. Enter a Name and, if you like, a Description.
  4. Adjust the model in the editor.
  5. Click Submit.

The template appears in the list and is ready to use. If evalink talos can't save it, a message gives the reason and the editor opens again with your changes, so you can fix them.

Import a site template

To import a site template from a file, go to Company › Settings › Sites.

  1. In Site Templates, click Add Site Template.
  2. Click Import and select one or more .json, .yaml or .yml files.

You can also drag the files onto the Site Templates section. Each file is saved as a new template. If a file can't be read, a message says why, and the other files are still imported.

To get a template as a file, click the download icon in its row. You get Site-Template-<name>.yaml.

Edit a site template

To edit a site template, go to Company › Settings › Sites.

  1. In Site Templates, click the template.
  2. Change the Name, Description or model.
  3. Click Submit.

Sites that were already created from the template don't change.

Delete a site template

To delete a site template, go to Company › Settings › Sites.

  1. In Site Templates, in the row of the template, click the delete icon.
  2. In Confirmation, type delete.
  3. Click Confirm Delete.

The template is gone. Sites created from it stay as they are.

Parameters

Each parameter becomes a field in the From Template form. A parameter has a Type, a Name (the field label), and optionally a Description (shown as a hint), Required, a Validation pattern and a list of Options to choose from.

Type What people fill in
String Text, such as the Site ID. With Options, a drop-down list.
Number A number. With Options, a drop-down list.
Boolean A checkbox.
Address Customer and address fields. Only the fields the template uses are shown. An address parameter must be required.
DeviceGroup A Site Group to put the site in.
ServiceCompany One or more Service Companies.

Before creating anything, evalink talos checks every value: required fields, type, validation pattern and options. If a value is wrong, the form shows why, and you can correct it and try again.

Number Site IDs with a sequence

A sequence is a counter that produces Site IDs one after the other, with an optional prefix and suffix, for example BLD-10000001.

To create a sequence, go to Company › Settings › Sites.

  1. In Sequences, click Add Sequence.
  2. Enter a Name and a Start value. The start value is 10,000,000 unless you change it.
  3. If you like, enter a Prefix and a Suffix.
  4. Click Create.

To use it in a template, set the Site ID of the Device resource to the sequence, by its name:

evalinkDeviceId: ${{ sequence('<name>') }}

Each site created from the template then gets the next number. If creating the site fails, the number is given back.

When you create a site without a template, you can also fill in the Site ID from a sequence: click the sequence icon in the Site ID field.

Create many sites from a CSV file

A site template also defines the columns of a CSV import. In the Create Sites from CSV dialog, select the Site Template, then click Download example CSV to get a file with the right columns. For the full steps, see Create sites from a CSV file.

Share site templates with an installer company

To share templates, go to Company › Settings › Sites.

  1. In Installer Companies, in the row of the installer company, open the menu.
  2. Click Templates.
  3. Select the templates the installer company may use.
  4. Click Submit.

The installer company sees only these templates. Removing a template from the list takes away the installer's access, but doesn't delete the template or change sites already created.