An administrator can create a scheduled workflow and the frequency in which it will be executed.
- On the left sidebar, open the ADMINISTRATION section.
- Select WORKFLOWS.
- Click on the Plus button in the lower right corner of the screen.
- Select Scheduled.
- In the New Workflow pop-up window, specify the name and a brief description.
- Click the Create button.
- Click the plus to set the result of the trigger: notify, create (event or task), fill.
- If you select Notify as the result of the response, specify the message for notification, recipients and frequency.
- If you select Creation as the triggering result, select what you want to create (a task or an event) and specify additional parameters: name, type, general information and the triggering delay.
Note: when creating a task, you can specify several responsible persons.
- If you select Fill as the result of the trigger, select the object, the field to be filled in and the triggering delay.
- You can create an unlimited number of script response results. All of them will work one after another, depending on the specified parameters.
- Select the response time of the script — with time delay or at specific date.
- In the Delay field, enter the number of days.
- From the drop-down list Delayed Options select the option: Use calendar days or Use working days.
- Click the Save button.
- To set the conditions under which the script will run, go to the Settings tab.
- In the Conditions section in the Add conditions field, select the desired filter.
- When conditions in a scheduled script are saved, the following checks are performed:
- in the scheduled script, the operators Create or Fill are used;
- according to the filtering results, more than X cases remain (at the moment of saving the script; where X is the number of cases specified in the settings).
- When working with scripts according to the schedule, the operators Script, Create, Fill and Notify can be performed in two different ways:
- for each case that satisfies the specified filtering;
- once in one iteration run the automation script.
- It is possible to move to the Script operator a list of tasks that satisfy specified filtering conditions in a script according to a schedule. If it is necessary to perform a launch for each case, then this must be written in the script itself.
- The Create and Fill operators (in a script according to a schedule) are executed for each case that satisfies the filtering conditions. If no filters are specified, then the operators work for all active affairs in the system. Operators can use the data to fill in the trigger condition from the object (fields of the case in which the script is processed are taken into account).
Scheduled workflow settings
On the Settings tab, you can:
- Change the main parameters of the workflow: name, description and status (the block with the main parameters is available for all types of scenarios);
- Set workflow launch rules;
- Add filters that will trigger the workflow.
Setting filtering conditions
In the Conditions section, you can add filters that will trigger the scheduled automation workflow.
To add a filter condition:
- Click on the line Add condition.
- Press the button ➕ and select an object to filter from the list.
- Click on Filter by and select the type of filtering:
- Selected values (default);
- Not empty.
- If you have specified the filtering type as Selected values, click the Value field next to the filter object and set the filter values.
If there are filtering conditions in the scheduled workflow:
- The Script, Create, Modify, and Notify statements can be executed in two different ways:
- For each case that satisfies the filtering conditions;
- Once per iteration of running the automation script.
- It is possible to pass a list of cases that satisfy the filtering conditions in the scheduled workflow to the Script operator. If it is necessary to run a run on each case, this should be written in the script itself.
- The Create and Modify statements are executed for each case that satisfies the filter conditions. If no filters are set, agents work for all active cases in the system. Operators can use the data to fill in the trigger condition object (the fields of the case in which the scenario is processed are taken into account).
When filtering conditions are saved in a workflow, the following checks are performed on a schedule:
- The scheduled workflow uses the Create and/or Modify statements;
- According to the filtering results, more than X cases remain (where X is the number of cases specified in the settings) at the time the script is saved.
Configuring launch rules
If no launch rules are specified for a workflow (even an active one), then it is not executed.
The workflow skips the run if the previous run of the automation workflow did not have time to complete.
To configure workflow launch rules:
- In the workflow launch rules section, click the Add button.
- Select the start frequency and start interval from the list depending on the frequency value:
- Day — every n days, where n is the number of the day in the month;
- Week — every n weeks, where n is the number of the week in the year;
- Month — every n months, where n is the number of the month in the year;
- Specified period is every n, where n is the number of days, weeks, months, hours, or minutes.
- When choosing a frequency:
- Week — select the day of the week;
- Month — specify the day of the month;
- Specified period — specify the start date of the period.
- Specify the launch start time.
- Check the status of the workflow.
- Add other workflow launch rules in the same way, if necessary.
- Click the save button in the lower right corner of the screen.