Workflow can be used to automate routine tasks such as sending email notifications, updating record security, and associating Child Records with their appropriate Parent Records. This is accomplished by configuring a Trigger and an Action. The Trigger is the event that occurs on a record in order for the Workflow to run. This event could be the creation of the record or the updating of a field in the record. The Action is then defined as what occurs when this trigger is triggered.
Think of Workflow as an IF… THEN statement. IF this condition is met (e.g. a 'Status' Field has turned Red) THEN send an email to the Executive. Workflow requires a 'Trigger' to decide when the workflow will occur and also an 'Action' to determine what occurs when the Workflow has been triggered.
However, setting Workflow needs the App Builder to understand who the key stakeholders for an App are, what process is to be followed and who does what. This will then indicate the key steps requiring automation.
This process can be enabled by working with the App owner or client to create what is called an Activity-vs-Role (or 'swimlane') Process Map.
It can be very useful to automate administration tasks such as: linking Child Records to appropriate Parent Records, setting Security for a Record based on the creation User creating the record, or even Field values within the Record.
Look for opportunities to set up Workflow on an App whenever there is a hand-off from one stakeholder group to another.
Workflow V2 Concept:
Each app in Workflow V2 can contain a number of workflow elements, each of which is made up of nodes that are connected to one another. Each node represents a single, separate action that can be applied to the app's records. Nodes are divided into three types:
- Triggers are nodes that start a workflow and indicate what initiates it.
- Filters are nodes that decide which records to send to the repository.
- Actions are nodes that take action in response to the records they receive, such as sending a notification, updating the database record, and so on.
Workflow is directional. Each node can be connected to one or more subsequent nodes, but it can only be connected from one node at a time. A trigger node must be the first node in all workflow; trigger nodes cannot be connected to from other nodes.
When a node gets a document (an object containing record data), Workflow V2 is a dataflow system in which each node executes an action. The document may be passed on to the associated nodes or dropped depending on the outcome of the action (no further processing is performed on it.) This means that during trigger time, record data is normally read only once.
Creating a new Workflow
Create a new Workflow item by clicking 'Add Workflow' in the Workflow section, either as shown below or in the section's top right corner. Alternatively, you can update an existing workflow by clicking on its name.
Configuration of the Trigger Node
On the left panel, you'll see a list of trigger nodes. To begin your workflow, either drag a trigger node into the workspace or click on the empty node.
When you drop a node onto the workspace, the edit node window appears, allowing you to specify whether this trigger can be triggered only by a specific team or user. Additionally, you can include notes.
Configuration of the Filter Node
Trigger options enable the User to apply filters to the Workflow, preventing it from being executed unless certain Field values meet certain criteria. This is frequently useful for sending notification messages to users when a specific record criteria is met, for example.
To add a filter node, in the left-hand node menu, click the filter tab. The String filter node can then be dragged onto the workspace and attached to your trigger node.
NOTE: A more user-friendly method of setting Filters will be available soon; for the time being, Filters can be entered using the string format.
For information on string filters, see this page. You can include multiple Field value criteria in the Filter String by including and/or, in which case all defined criteria must be met for the Workflow to trigger.
The trigger node is an optional step; if it is not required, you may proceed to the next step, which is adding an action node.
Configuration of Action Node
To add an action node, click the action tab in the left-hand node menu. After that, you'll see a list of actions that you can drag onto the workspace.
- Changes that have not been saved are highlighted in green.
- Multiple workflows can be added to a single workflow builder.
Send email node:
You can email a User with data from the Record that generated the Workflow. This is accomplished by typing in the 'To' box, which allows you to search for specific Users and Teams, as well as users named in the Person and Email fields.
Within the email, you can choose to attach a Templated Report - at the bottom, there is a 'Add Attachment' button that allows you to specify the templated report to attach to the email being sent. This must be a pre-existing record-level word export template.
Additionally, you can select 'Use Base Template?'. If you choose this format, the email will be formatted with a Softools header and footer. As illustrated below.
You can now customise the email's subject line and message body. You can reference Record data in these by using the Keyword @Softools.FieldValue("FieldID"). Additionally, you can include a link to the Record that generated the workflow by using the @Softools.RecordLink().
Note: The message's entry is in Rich Text format. This means that if you copy and paste values, the text formatting will be preserved. This could result in a conflict with the @Softools. FieldValue("Field") if the text format has changed as a result of a copy and paste of the Field ID. To avoid this, we recommend that you type the entire keyword reference into the Email message rather than copying and pasting values.
Note: Certain field types are not supported due to the fact that emails are rich text and thus cannot support more complex field types such as ImageFields, Grids, or InAppChart fields. It is preferable to include these in a Templated Report and attach it.
Note: To incorporate a static email address into an email workflow, you must first create an email field in the app with the email as the default value and then refer to that field in the workflow as:
@Softools.FieldValue("EmailFieldId") otherwise the '@' in the email will try and reference a field that doesn't exist
Note: To send the email, the recipient list must contain at least one 'To'. If a User is referred to more than once as a result of being selected as a User and a member of a Team and being named in a Person or Email Field, they will receive the email only once in priority order of 'To', 'Cc', and 'Bcc'.
Send combined email node:
Send Slack message node:
To send a Slack notification, you must first obtain the Slack Webhook.
You can refer to Record data by using the Keyword @Softools.FieldValue("FieldID"). Additionally, you can include a link to the Record that generated the workflow by using the @Softools.RecordLink().
The message will use a syntax that is similar to Markdown.
Send Notification node:
When this workflow is executed, the user will see a notification with the message specified in the node configuration.
Update field value node:
This node enables the updating of field values via an expression specified in the node configuration.
The Parameter conflict behaviour setting controls what happens when the value of a field referenced in the expression changes between the time the workflow is triggered and the time it is run.
The Target conflict behaviour setting specifies what the workflow should do if the value of the target field changes between the time the workflow is triggered and the time it is executed.
Update Record Node:
Make sure to click the 'Save' button when making any changes in order for them to be added to the next app version. Once you have made all the changes you need to an application you are then ready to publish it to workspace.