Workflow parameters are parameters that can be used in components in the workflows. You can define your own parameters inside of a workflow, so that they can be used later on. For instance, you might request information from a driver, such as their date of birth. In a following step, you can use the “date of birth”-parameter and other information to automatically request a new charging card from the card provider.
Using parameters enables the most powerful use cases in workflows. It is crucial to understand them in order to create well-designed automations.
Available parameters
Depending on what triggered your workflow, some default parameters might be present in the workflow. In the workflow component configuration screen, to the right, you can review all of the parameters you have available at that point in your workflow.
Parameter references
Parameter references are the keywords you use to refer to the values of specific parameters. For instance, in your workflow, you might include a “form” action in which you ask a driver some questions about a damage incident, such as when it took place and where.
Below the question, you can add a “Parameter reference”. This is the keyword via which the value of the response will be available later on in the workflow.
If you now navigate to a workflow component downstream from the form, you will notice that the relevant parameter referneces appear in the “available parameters” to the right of the screen.
Using parameter references
Parameter references can be accessed in almost any field in your workflow component configurations. Where parameters are often used, Headlight has provided dropdown menus to select a parameter from your available parameters. However, that is not a prerequisite, in longer pieces of text or sentences, you are almost always able to insert parameter references. First, let’s review a dropdown example.
Parameter reference from dropdown
For instance, in the target field for a Notification action, you can choose “employee reference” as the type, and then choose a parameter reference from the dropdown menu. In this concrete case, the administrator is configuring the Notification action such that it is the employee who initiated the workflow who will be notified.
Parameter reference in freefrom text
Aside from selecting parameter references from dropdown menus, you can insert parameters into freeform text by encapsulating the parameter reference in double curly brackets {{parameter_reference}}.
For instance, in the introduction to the following form, the administrator has configured a message to the fleetmanager that describes an incident in a structured way, making use of a driver’s inputs. The fleetmanager has encapsulated the relevant parameter references in double curly brackets to include the data in the message.
You can even use parameter references inside hyperlinks in message bodies. This can be useful in cases where you want someone receiving a message to be able to access content easily, or display an image inside a message body.
Where can parameter references be used?
- Forms
- Target
- Introduction title
- Introduction body
- Attachments
- Question title
- Notifications
- Target
- Subject
- Message body
- Approval
- Target
- Document details
- Title
- Message body
- Wait
- Wait for date
- Mapper
- Source
- Sink
- Headlight operation
headlight operations allow various parameter inputs. Specifications are detailed in the relevant configuration screens once you select a particular headlight operation