The Smart flows tool lets you choose event forms (target forms) that will automatically create new records for people when a different event form (a trigger form) is entered and saved. For example, if a record is created and saved for a Vaccination event form (the trigger form in a Smart flow), a record for a Vaccination Review event form (the target form in a Smart flow) can be created simultaneously.
Smart flows are useful for a number of different scenarios. They can be used to combine data from multiple sources into one form, like a summary form, or can be useful in a scenario where data entered in one form is relevant to the subsequent creation of a record for another form, like in the example mentioned above.
Smart flows can also be useful in scenarios where people should only be able to see certain information entered into an event form. For example, a coach might need to see details about an athlete’s injury, but they should only see high level details such as the injury diagnosis and the athlete’s availability to train. Instead of giving the coach Read access to the Injury Record form, a Smart flow could be set up that fetches the required information from the Injury Record form and displays it in the Smart flow form. The coach would then only need Linked access to the Injury Record form so they see relevant information in the Smart flow record. This could also apply to scenarios where people need to enter data related to information collected in a form they don’t have Write access to. The information could be linked into the Smart flow form and they could add any notes in the subsequent record.
Setting up trigger criteria
When setting up a Smart flow, you need to select which event form will be used as the trigger form - that is, the form that when a record is saved, will trigger the creation of a target record. Any event form can be used as a trigger form. Only one trigger form can be selected per Smart flow.
Smart flows can be triggered by manual data entry, group data entry or importing data into a record of the trigger form. Smart flows can also be triggered by records that have been created by a Smart save and records created as a result of a Multiple athletes field being used.
After selecting the trigger form, you can add Trigger criteria, which are specific conditions that need to be met in order for the Smart flow to run. The Trigger criteria can be set to Match all criteria, where all criteria listed need to be met for the Smart flow to run, or Match any criteria, where the Smart flow will run if any of the listed criteria are met. Alternatively, you can set the Trigger criteria to No alert criteria so that a target record will always be created when a record of the trigger form is saved.
This example shows a Smart flow that is set up to help doctors follow up on an athlete's recent injuries. Athletes complete the Daily Diary event form and answer a question relating to whether they have any new injuries. The Daily Diary event form is selected as the trigger form for the Smart flow. Once an athlete saves their record, the Smart flow creates a new Medical Consultation form (the target form) if the athlete said that they had a new injury. The Medical Consultation record can be used later by doctors to record notes when examining the injured athlete.
Setting up target events
After selecting a trigger form and setting any Trigger criteria, you will need to set the Target events. One or multiple event forms can be set as target forms, meaning that a record of these forms will be created each time a record of the trigger form is saved.
It is possible to create multiple Smart flows with the same target form but with different trigger forms. This might be useful if you have a summary form that links data from multiple event forms.
Configuring a Smart flow to save at specified dates and times
Target records are always created immediately after a record of the trigger form is saved. Target records can, however, be future dated by configuring the Date type field when setting up the Smart flow. The Date type can be set to Point in time, Period or Specific date / annual.
- Setting the Date type to Point in time means that the target record will be created immediately after the trigger record is saved, with the same start date and time as the trigger record. If an Interval is set, the target record will be dated at the specified number of hours, days, months, or years after the trigger record was saved. This type of Smart flow will be activated every time a trigger record is created.
- Setting the Date type to Period allows you to specify on which day in a week, month or year the target record will be saved by setting the When field. You can also specify the start and end time of the target record by setting the Start and Finish fields. If the Entry on same day is entered next period field is ticked, trigger records that are saved on the same day as the day specified in the When field will result in the target record being dated as the next occurrence of that day, not the current day. For example, if When was set to Week on Sunday and the trigger record was saved on a Sunday, then the target record would be dated the following Sunday. Note that only one target record will ever be created on this date and time for this Smart flow, despite the number of trigger records created.
- Setting the Date type to Specific date / annual allows you to specify the exact date and time that the target record is dated. If Ignore year is ticked, the target record will be saved regardless of whether it falls in the current or next calendar year. You cannot set up a Smart flow with a date that has already passed unless the Ignore year option is ticked. Note that only one target record will ever be created on this date and time for this Smart flow, despite the number of trigger records created.
The above example shows a Smart flow that has been set up to trigger the creation of a Performance Plan Review record (target form) when a record of the Performance Plan (trigger form) is saved. Point in time has been selected as the Date type with an Interval set to one month. This means that while the Performance Plan Review record is created immediately after a Performance Plan record is saved, it will be dated one month in advance, prompting the coach to check in with their athlete and review their progress one month after the Performance Plan was created.
The creation of the Performance Plan Review record could also be used to send the coach a performance alert to prompt them to fill out the review form.
If there is a performance alert set up based on the creation of the target record, the alert will be triggered when the record is created, that is, immediately after the trigger record is saved, not at the time specified in the Date type field. Keep this in mind when choosing whether to enable a performance alert from a target record and when selecting the communication method for the performance alert.
Setting up a Smart flow template
When setting up a Smart flow, you can use a Template to store pre-filled data for the target form record. You have the option to either select an existing template or create a new one. When creating a new template, you will be provided with the target form which can be filled out with pre-defined values. The form appears similar to how it does when entering data using Smartabase Online - all manual data entry fields can be interacted with but linked and historical calculations will not appear in this view of the form. After completing a new template, you must save it before you save the Smart flow. The values entered into the template will be used to populate a record of the target form every time one is created from a Smart flow.
Note that default values aren't retained when a form is saved via a Smart flow, so a template can be used to achieve the same result.
Adding monitored athletes and/or groups
When setting up a Smart flow, you have the option to enable it for everyone or set specific people or groups of people that the Smart flow will apply to. If the Enable for all users check-box is left unticked, you will need to add Smart flow athletes and/or Smart flow groups in order for the Smart flow to run. If these options are left empty, then the Smart flow will not be active. The Smart flow athletes and Smart flow groups options will appear underneath the Save button after the Smart flow is first saved.
It’s always important to test new workflows in Smartabase, so we recommend adding a test account as a Smart flow athlete before adding real people or groups to the Smart flow.
Target forms used in Smart flows often contain data that is linked from other event forms, including data collected in the trigger form. It is important to note that any data linked from the trigger form is limited to only pull through data from the record that triggered the Smart flow. This means that any linked settings (Group By, Match to, Select value and Date restriction) and Advanced properties (e.g. Ignore if blank) set for the linked field in the target form will be ignored and the value from the trigger record will be pulled through instead. Linked settings will still apply to values being pulled from other forms that did not trigger the Smartflow for that particular record.
If you want a target record to contain data linked from multiple forms and have all calculations adhere to the linked settings you will need to manually save a record of the form or a create a Smart save to automatically save a target record each day.
The above example shows two Smart flows that have been set up in a Smartabase site. The first Smart flow is set up to trigger the creation of a Fitness Test Summary record (target form) when a record of the 20m Sprint Test form (trigger form) is saved. The second Smart flow also has the Fitness Test Summary form as the target form, but the trigger form is the Vertical Jump Test form. The summary form has linked values from both trigger forms, pulling in the minimum 20m Sprint Duration and the maximum Vertical Jump Height, using the Select value linked setting.
If a record of the 20m Sprint Test form is saved, a record of the Fitness Test Summary will be created, pulling data from both trigger forms. The 20m Sprint Duration pulled into the summary form will not necessarily be the minimum value from all records, instead, it will be the value from the record that triggered the Smart flow. However, the Vertical Jump Height pulled through will be the maximum from all records, as the linked settings are applied to fields pulling data from forms that did not trigger the Smart flow.
Managing Smart flows
Using the Smart flows tool, you can edit and delete existing Smart flows or create a new Smart flow. To find a particular Smart flow you have created, use the search menu in the sidebar. The search menu lets you search for:
- The Name of the Smart flow.
- Content in the Description field for the Smart flow.
Steps to set up a Smart flow
- Log in to the administrator interface.
- Select the Smart flows tool to create a new Smart flow and see a list of existing ones.
- Click on Create new Smart flow.
- Provide a Name and Description for the Smart flow.
- Select the event form you want to use as the Trigger criteria for the creation of records in another event form (target event form).
- If required, specify an alert criteria for the Smart flow using a condition set for a field in the trigger form.
- Add a Target event and select the event form you want to use from the drop-down field. You can add more than one target form if needed.
- Determine the date and time that you want the target record to be saved at by setting the Date type.
Note that these settings determine the date that the target record is saved against, not the date that the record is created. Target records are always created immediately after the trigger record is saved.
- Select Point in time if you want the target record to be dated with the same start and end date and time as the trigger record.
- Set an Interval if you want the target record to be dated at a specified number of hours, days, months or years after the trigger record.
- Select Period if you want the target record to be saved on a specific day in a week, month or year.
- Tick Entry on same day is entered next period if you want the target record to be dated against the next occurrence of the day specified if the trigger record is saved on the specified day.
- Select Specific date / annual if you want the the target record to be saved on a specific date at a specific time.
- Tick Ignore year if you want the target record to be saved regardless of whether it falls in the current or next calendar year. You cannot set up a Smart flow with a date that has already passed unless the Ignore year option is ticked.
- Select Point in time if you want the target record to be dated with the same start and end date and time as the trigger record.
- Tick the Save as draft box if you want the trigger record to be saved as a draft.
- (Optional) Include a Template created to store pre-filled data in the target form.
- If you are creating a new template, you will need to save it before you save the Smart flow.
- Select Delete target event(s) to automatically delete all target records associated with a trigger record when the trigger record is deleted.
- If you want your Smart flow to apply to all people on your Smartabase site, tick Enable for all users. If you want to apply your Smart flow to specific people or groups, leave this unticked.
- Click Save.
- If you haven't ticked the Enable for all users option, you can add the people or groups you want to monitor with the Smart flow.
- Monitored athletes and members of monitored groups will have target records automatically entered for them after a trigger record is saved. This behavior will continue unless you remove the athletes or groups from the Smart flow settings or delete the Smart flow.
- Click on Save to confirm your Smart flow settings and exit.