Creating a New Trigger Template

A trigger template enables you to create new triggers based on an existing trigger.

  1. Click Developer, and then on the Developer page, click Triggers.
  2. On the Triggers page, click the View icon of the trigger that you want to use as a template.
  3. To create a template from the trigger you are viewing, click Create template.
  4. In the Add Trigger Template window, add the following details:

    The Name is a unique name for the template.

    The Description describes the template.

    The Group is a unique or existing name to categorize different trigger templates. This is an auto-complete search field to find existing group names or enter a new group name.

    The Natural description is a human-readable string that includes field keys to describe what the trigger does. To include a field key, press the [ key to complete the [[]] key field. Inside the brackets, type in a unique key, for example [[thingkey1]].

    A super ops user can select the  Shared global check box to share the template with all organizations. Only a super ops user can edit and delete a globally shared trigger template.

    Values inside brackets in the Natural description box appear as fields in the Fields section of the window.

  5. In the Fields section, fill in the fields that appear automatically based on the values in the Natural description.

    The Key is a unique name from the Natural description.

    The Field description describes the unique key.

    The Type  menu lists the types of keys that can be included, such as string, number, tags, thing key, property key.

  6. After defining the fields, add the keys to the Trigger window on the right in JSON format.
    The key values are entered while adding a new trigger from templates. For more information about adding values to the key fields, see Adding a New Trigger From a Template.

    If the key is not in the Trigger window in the JSON object, it is not used when creating a trigger.

  7. When you finish, click Save.

The new template appears on the Triggers page under the Templates tab.