In this example scenario, we want to notify the Accounts Director when a new starter submits their bank details into a form to set up payroll.
Throughout this scenario, you will learn:
-
How to use the 'Retrieve information' and 'Send notification' workflow actions.
Prerequisites
For this scenario, we have built:
- Three basic models, 'Department,' 'Person,' and 'New starter checklist.' See the screenshots below for an idea of the properties we have included. See our knowledge base section, Models.
- To input data into the 'Department' model, we imported the data from an Excel spreadsheet. See our knowledge base article, Import data into your model.
- To input data into the 'Person' model, we created an 'Edit person' page with a form connected to the 'Person' model. See our knowledge base section, Pages.
- For the 'New starter checklist' model, we have created a 'New starter checklist' page, with a form connected to the 'New starter checklist' model where new starters can go to input their bank details.
- To enable the Accounts Director to view the new starter's bank details, we have created a 'View bank details' page, connected to the 'New starter checklist' model, and containing a list block displaying the bank details. We then applied a condition to the list block, ensuring the only person who can see this information is the Accounts Director. See our knowledge base section, Pages.
Now we have all our data set up, let's create our workflow.
Create your workflow
- Navigate to the model that you want to trigger the workflow. In this example, our model is the 'New starter checklist.'
- Select the 'Workflow' tab.
- Select 'Create.'
- Enter a meaningful title for the workflow.
- Select 'Form submissions' from the 'Trigger on' options.
- Select the relevant form from the 'Forms' drop-down list. In this example, our form is 'Bank details.'
- Select 'Add.'
- Your workflow will remain inactive in your workflow list until you activate it. Jump to the next section to get started.
Build your workflow
- Locate and select the workflow you created in the previous step.
- As you can see, you created the first trigger instance when you set up the workflow. Next, select the plus symbol to add additional steps.
- The workflow action modal window opens.
Retrieve information
Before we can send a notification to the Accounts Director, we need to tell the workflow. To do this, we need to retrieve the information from another model.
- Select 'Retrieve information.'
- Select the model from which to retrieve the information. In this example, our 'Person' model stores job title data, so this is the model we choose.
- Enter a meaningful label for the information you're retrieving. In this example, we are entering 'Accounts-director.'
- We now need to enter a condition, as when we specify to retrieve 'Employee user,' the system will return all users, and we only want the Accounts director. For this, we add the following condition: Property: Job title Criteria: is any of Value: Accounts director.
- Select 'Employee user' from the 'Property' drop-down' list.
- Select either 'Ascending' or 'Descending' from the 'Direction' drop-down list.
The 'Direction' option is only relevant if you are retrieving more than one value. In this example, we only retrieve one person, so it's irrelevant which option you choose.
- Select 'Add' when you are happy with your configuration.
Send notification
The next step is to create a notification to send to the Accounts Director. To do this, we need to add a 'Send notification' action.
- Select the plus symbol to add additional steps.
- The workflow action modal window opens. select 'Send notification.'
- Select the retrieved property from the 'Send to' drop-down list. In our example, the retrieved property value is 'Retrieved Accounts-director.owner.'
The 'Employee user' property we added to the person model is set to the employee's user account and works the same as 'Owneruser.' As 'Job title' is in the same model as 'Employee user,' the retrieve information function is searching for the job title and connecting any user or 'owner' to this and returning the information.
- Enter a meaningful subject in the 'Subject' field.
- Enter a meaningful message in the 'Body' text box.
Use tokens in your text to enter dynamic details. For example, entering 'triggeringUser.Name' will enter the person who submits the form and changes depending on the person. To enter tokens into the body of your messages, type @, and a list of tokens will appear.
- Select an existing task type, or create a new type.
- Select an icon for your new task type if you created one.
- Select how you would like to notify the person.
- Select the page the information relates to. In this example, the page is 'View bank details.'
- Select 'Add' when you are happy with the configuration.
Activate and test your workflow
Now that you have built your workflow, it's time to activate and test it.
- Select 'Activate' in the top-right corner of your workflow.
- Navigate to the page you set up to submit the details. In our example, we set up the 'New starter checklist' page, and we'll submit some bank details to try out the workflow.
What happens next?
If your workflow is set up correctly, when you submit your form, you will see a banner across the top of the page that tells you your changes are in the workflow.
The person you retrieved will then receive a notification with a link to the details the user submits.