Mustache Tags

This topic explains what Mustache is and how to make use of it in the Admin Portal


Mustache is a library that allows for the creation of logic-less templates using tags. This provides powerful dynamic capability when profiling in the Agilit-e Admin Portal.

In short, mustache can be used to replace static values in fields with dynamic values that are passed as a JSON body via the triggered Agilit-e API.

The below tutorial demonstrates mustache in action with an Agilit-e Numbering process:

  1. Access Agilit-e Admin Portal

  2. Navigate to the Numbering Module

  1. Use the Numbering Tutorial to configure a Numbering profile.

  2. Edit the existing numbering profile.

  1. Inside any Agilit-e profile, fields with labels that contain the text {{m}} are mustache-enabled fields. The below example shows that the Prefix and Suffix fields in the Numbering profile are mustache-enabled.
  1. Replace the two static values with dynamic Mustache parameter values, the API Reference docs sends two parameters via the body of the request called param1 and param2, these parameter values can be accessed by providing the parameter names inside the Mustache enabled fields.
  1. Click on "Submit" to save the Numbering profile.

  2. Using the Agilit-e API Reference Documentation

  • Navigate to the Agilit-e API Reference page.
  • Authenticate with Agilit-e by providing your e-mail and password credentials and clicking on the "Try It" button.
  • Once authenticated, the API response will include your user information as well as an Agilit-e token
  • Copy the Agilit-e token as it will be required for executing the Numbering APIs.
  1. Navigate to the Agilit-e Numbering Execution APIs and add Prefix and Suffix values to the param1 and param2 fields, these values will be passed in the body of the request.
  1. Click on the user icon on the top right of the API logic and populate the Agilit-e token into the api-key field.


Regarding API Keys

Note: You will need to create an API Key in the API Keys Module. It is important that this is setup, as the API Key uniquely identifies your Agilit-e Account and tells the Agilit-e API Reference page that you are a part of Agilit-e. Once the API Key is provided for one API, it will exist for the rest of the APIs.
This will also be covered later on in our documentation, in the Obtaining an API Key (Agilit-e Token) section.

  1. Execute the API by clicking on the red Try It button on the top right
  • Response:
    The Prefix and Suffix values were passed to the Agilit-e Admin Portal and appended to the number
  "success": true,
  "messages": [],
  "data": "LEAVE-005-2018"