Using scheduled tasks
System administrators can add scheduled tasks, enabling iMIS to run a task when a pre-defined trigger (Process Automation trigger), event, or scheduled time frame occurs. Once a trigger event occurs, iMIS will run the appropriate task.
Each scheduled task can have Process Automation Triggers, Data sources, Conditions, and Actions. A scheduled task must contain Process Automation Triggers and Actions; Data sources and Conditions are optional.
There are two different versions of Process Automation available to you: Standard and Plus. Standard is available to you out-of-the-box. Plus requires additional licensing.
Standard
Standard Process Automation allows you to perform the following:
- Edit Triggers, Data Sources, Conditions, and Actions.
- Add or delete Triggers, Data sources, and Conditions.
- (Action tab) Edit the Recipient data source or Communication.
- (Action tab) Edit the Run a report action.
- (Logs tab) Search by the Status and Start dates.
Plus
In addition to the Standard Process Automation functionality, PLUS Process Automation allows you to perform the following:
- Add new scheduled tasks.
- Copy existing scheduled tasks by clicking Save As.
- Modify the Name, Description, and Type.
- Add or delete Actions.
- (Actions tab) Edit the existing action Type.
- (Actions tab) Edit the Run a stored procedure action.
Since these scheduled tasks are disabled by default, go to RiSE > Process automation, select the task you want to use, then select Enabled.
Using out-of-the-box scheduled tasks
iMIS provides out-of-the-box scheduled tasks that are already set up for your organization to use and modify.
The out-of-the-box scheduled tasks include:
- Calculate engagement scores - See Defining engagement score formulas for more information.
- Content and Navigation Workflow - Sends expiration notices and removes content and navigation that has expired.
- Event confirmation email - Sends a confirmation email to event registrants when they submit their registration. This scheduled task is not enabled out-of-the-box.
- Donation thank you email -Sends out a thank you email to donors who have made a donation.
- New member welcome email - Sends a welcome communication on a weekly basis to members who have joined in the past week.
- PCI Data Retention Cleanup - Scans the database for outdated credit card data, after a specified period, then deletes it.
- Process recurring donations - Ability to generate the next recurring donation invoices and send them to DataVault for payment. Retrieve the payments and apply to the iMIS invoice.
- Event cancellation notification - Sends a notification to registrants when an event is cancelled.
- Event registered from waitlist notification - Sends a notification email when an event registrant is registered from the waitlist for a registration option or program item.
- Contact erasure request confirmation – Sends a nightly email to contacts who have requested erasure. This task is not enabled out-of-the-box.
- Contact erasure requests – Update email - Nightly email sent to all system administrators with a count of the outstanding erasure requests, as well as a count of the number of users marked for erasure. This task is not enabled out-of-the-box.
- Contact erasure task – Task that runs nightly erasing all contacts marked for deletion in the last 7 days. This period can be shortened or extended by editing the Waiting period until information is erased parameter in the EraseParty action (Actions tab).
Except Content and Navigation Workflow, each scheduled task is using an iMIS communication template (Marketing > Communication templates > Templates). You will need to make a copy of the template and then modify the copy so that it is unique to your organization. Once the template is ready, delete the system template from the Actions tab, and add your template.
Query-based tasks
If you would like to tailor the task for your organization, it is recommended that you copy the tasks’ recipient data source queries and communications. Modify the copied queries and communications as needed. Then, edit the scheduled tasks to use your versions of the queries and communications.
- If you need to change the recipient query used to determine who will receive a communication, in the Staff site, go to RiSE > Intelligent Query Architect:
- Select Common > Tasks > Queries.
- Copy and modify the recipient data source query used by the task:
- The Donation thank you communication task uses the Donations received today query.
- The New member welcome communication task uses the New members in the last 7 days query.
- From the Staff site, go to RiSE > Process automation.
- Select the Tasks tab.
- Open the scheduled task you want to use.
- (Triggers tab) Review the schedule of the included trigger, and modify it if needed.
- (Actions tab) Review the action, and modify it if needed.
- To activate the task, select Enabled.
- Save the task.
- (optional) Click Run task now to instantly execute the task.
Creating new scheduled tasks [PLUS]
📘 Note
The following information is considered a PLUS feature and additional licensing is required. For more information, contact your AiSP or ASI Technical Support.
Each task can have Triggers, Conditions, and Actions. A scheduled task must contain Triggers and Actions; Conditions are optional. Logs provide the ability to review a detailed log of scheduled tasks.
📘 Note
The Default publishing server must be enabled; if this publishing server is disabled, your scheduled tasks will not run. To determine the Default publishing server, go to RiSE > Maintenance > Publishing servers. The Default column will indicate which publishing server (if there are more than one) is the default.
Do the following to create a new scheduled task:
- From the Staff site, go to RiSE > Process automation.
- (Tasks tab) Click Add new task.
- Enter a Name that indicates the purpose of the task.
- (optional) Enter a task Description.
- Select Scheduled task as the task Type.
- (Triggers tab) Create Triggers that tell the task when to run.
- Click Add trigger.
- Select a trigger Type.
- Select a Frequency of One time or Daily. You can Schedule a Daily task to run at specified intervals.
- If you select a Frequency of Weekly or Monthly, you can select the Day of week or Day of month when the task will run. You can select multiple days of the week or month.
- Select the Start date and time. When using a Frequency of Daily, Weekly, or Monthly, you can also select an End date and time. The start date and time is based on the system Time zone setting.
- Select a Table:
- The drop-down contains commonly used tables. If you would like to use a table that is not listed, select Other and enter a Table Name.
- The primary key from the trigger table can be used in an IQA query by adding a filter value of "@TriggerID". For example, if there is a trigger for Activity, reference the triggered row in an IQA query by adding a filter of CsActivity.Sequence = "@TriggerID".
- If the table has more than one primary key, add multiple filters in the form of "@TriggerID1" and "@TriggerID2". For example, Order_Lines has a composite primary key of ORDER_NUMBER and LINE_NUMBER. Reference the triggered row in an IQA query by adding two filters of CsOrderLines.Order Number = "@TriggerID1" and CsOrderLines.Line Number = "@TriggerID2".
- Select at least one type of data change for which the trigger is run. You can select more than one type of data change:
- Row inserted
- Row deleted
- Row updated
- Any update - select to run the trigger when any column in a row has been changed or adjusted.
- Specific column - select a specific Column from the previously defined table. Enter any specific Value changed from and Value changed to for the selected column. Leave the values blank to indicate any change of the column value.
- Select Enabled to enable the new trigger.
- Save the new trigger.
- (optional) (Data sources tab) Create and manage query data sources for the task.
- Select Add data source.
- Enter a Data source name. It is recommended that you choose a name that indicates the type of records returned by the data source. The name must be unique.
- Select an existing query or click Create source query to add a new query.
- If you select an existing query, the $/Common/Tasks/Queries folder opens by default.
- If you choose to add a new query, you are taken to the Intelligent Query Architect where you can define a new query.
- Save your data source.
- If needed, add additional data sources.
- (optional) (Conditions tab) Specify Conditions that must be met in order for the task to run.
- If a query data source was defined on the Data sources or Actions tab, select one of the following options:
- Use existing data sources - select a previously defined data source from the drop-down that will only display data sources that are not being used in any otherConditions.
- Use results of IQA query as data source - select this option to define a new data source.
- Enter a Data source name. It is recommended that you choose a name that indicates the type of records returned by the data source.
- Select an existing query or click Create source query to add a new query.
- If you select an existing query, the $/Common/Tasks/Queries folder opens by default.
- If you choose to add a new query, you are taken to the Intelligent Query Architect where you can define a new query.
- If there were no previously defined data sources from the Data sources or Actions tab, provide the following required information:
Enter a Data source name. It is recommended that you choose a name that indicates the type of records returned by the data source.
Select an existing query or click Create source query to add a new query.
- If you select an existing query, the $/Common/Tasks/Queries folder opens by default.
- If you choose to add a new query, you are taken to the Intelligent Query Architect where you can define a new query.
- Save your data source.
- If needed, add additional data sources.
- (Actions tab) Define the action the task performs when it runs.
- Click Add action.
- Select an action Type.
-
Send a communication
- For more information, see Sending scheduled communications.
-
Calculate engagement scores
- Select the communication you want to send.
-
Process recurring donations
- The Process recurring donations action initiates processing recurring donations. This is an automated process that performs the same process available from the Staff site at Fundraising > Automatic payments > Process payments. For more information, see Processing recurring transactions (AutoPay).
- Generate invoices
- Submit invoices for processing - You can select an Invoice source query to use as the source of the invoices you want to submit for processing.
- Retrieve processed payments
This action has the following options. You must select at least one option:
📘 Note
The Invoice source query you select must include the code_InvoiceRefNum column. Use the following values:
Property - Reference Num
Alias - code_InvoiceRefNum
If your queries are not updated, you will receive an error.
📘 Note
The Retrieve processed payments option should be used in a separate task. That task must be run after an initial task using the Generate invoices and Submit invoices for processing options, to allow enough time for the payments to be processed by the tokenization engine (DataVault).
It is recommended that you do not run the Retrieve processed payments option until ten minutes after the Submit invoices for processing task has been run.
See Creating the Retrieve processed payments scheduled task.
-
Run a report
- For more information, see Sending scheduled reports.
-
Run a stored procedure
- Enter the name of the stored procedure you want to run.
-
Run content workflow
- Select the communications for the content and navigation workflows.
- (optional) If you select Type of Send a communication , select a Recipient data source query, which determines the recipient list for your communication. Data sources added on the Conditions or Data Sources tab are available. For more information on creating recipient data source queries, see Creating a list of contacts to email.
- (optional) If needed, you can click Add new data source to select additional query data sources if you select Type of Send a communication .
Enter a Data source name. It is recommended that you choose a name that indicates the type of records returned by the data source.
- Select an existing query or click Create source query to add a new query.
- If you select an existing query, the $/Common/Tasks/Queries folder opens by default.
- If you choose to add a new query, you are taken to the Intelligent Query Architect where you can define a new query.
- If you select the Type of Send a communication, specify the Communication email template that you want to send to the recipient list:
- Select an existing email template.
- Create a new template.
- (optional) If you select the Type of Run a stored procedure and your task contains a Trigger with the Type of On database change, an option to Enable TriggerIDs as parameters is available. The stored procedure specified must contain at least one TriggerID parameter if this option is enabled. Select the information icon for specific parameter names and data types depending on which database table was selected in the Trigger.
- If you select the Type of Run content workflow, specify the communication email template that you want to send to the recipient list:
- Navigation workflow communication sends a notice for navigation that has expired.
- Content workflow communication sends a notice for content that has expired.
For more information on content workflow, see Workflow Management tab.
- Save the action.
- To activate the task, select Enabled.
- Save the task.
- (optional) Click Run task now to run the task immediately.
- (optional) Review the Logs to determine which scheduled tasks have been run, which actions have been performed, and whether any scheduled tasks did not complete successfully.
- From the Staff site, go to RiSE > Process automation, and select the Logs tab. You can also review the log for each scheduled task by opening the task and reviewing the task Logs tab.
- You can search for specific scheduled tasks based on the name of the task, the status of the task, or the date when the task was initiated.
- In progress - The task has been initiated, and is currently running. The task has not yet ended.
- Completed - The task has been initiated, and ended. There were no results by which a Succeeded or Failed status could be determined. The task evaluated the data source specified in the Conditions, but there were no results for the task to act upon. The task only executes its action if the selected data sources return one or more records, or no Conditions are defined.
- Failed - The task was initiated and ended, but the task did not complete successfully.
- Succeeded - The task was initiated and ended, and the task completed successfully.
- A list of scheduled tasks is displayed. You can click the name of the scheduled task to open a task editor.
- To view the log for a scheduled task, click the Expand ( + ) icon. This will open the log details for the specified scheduled task. You can also click Expand All to see log details for all scheduled tasks.
- Trigger execution - This is the moment when the scheduled task is initiated.
- Datasource evaluation - The scheduled task evaluated the data source specified in the Conditions. If there are results for the task to act upon, this event will have a Succeeded status, and an Action execution event is initiated.
- Action execution - If the Datasource evaluation is successful, the task continues to perform the action defined for this task.
- You can also do one of the following to delete logs that you no longer need:
- Click the red X to delete a selected log.
- Click Delete All Logs to delete all recorded logs on the Logs tab.
- By default, the list of scheduled tasks will only display the latest 500 entries. You can adjust this configuration option by editing the PagedResults.Maxrecords option in the web.config file located in the C:\Program Files (x86)\ASI\iMIS\Net\web.config file. If this configuration option does not exist in or removed from the web.config file the log will still display the latest 100 entries.
- You can manage the scheduled task log entries to avoid expanding your database size. See Process automation for more information.
Click for details
Triggers determine when and how frequently the communications are sent. You can schedule one time, daily, weekly, and monthly communications.
Click for details
System administrators can add triggers to scheduled tasks, enabling iMIS to run a task when a pre-defined trigger event occurs. Once a trigger event occurs, iMIS will run the appropriate task.
You can add triggers to tasks as you create new tasks, or you can add triggers to already-defined tasks. Select the type of trigger to use:
On a schedule
System administrators can specify the exact time a task will run, as well as the frequency with which the task is run.
On database change (use sparingly)
🚧 Warning
Database changes will create triggers directly on the database table. These triggers will run every time the selected actions occur: Row inserted, Row deleted and/or Row updated. To minimize performance impacts avoid overusing these triggers.
Best practice: Disable any trigger on a user-defined table before you click Create/Update Server Table in iMIS Desktop.
The task can be defined to run based on specific changes to database tables in the iMIS system:
Click for details
All query data sources created for this task are listed. The name of all data sources will populate in a drop-down when defining a Condition or Action. You cannot delete a data source if the data source is selected within a Condition or Action, however not every data source you have defined must be used when creating a Condition or Action.
Click for details
🚧 Warning
When a task is triggered, it only executes its action if the selected data sources return one or more records or no Conditions are defined.
📘 Note
This data source will populate on the Data sources tab once you click Save. You can also edit and remove data sources from the Conditions tab.
Click for details
The Actions tell the task what to do when it runs. When the Triggers occur and the Conditions are met, the task executes the Actions. In this case, the action is sending a communication to a recipient list generated by a selected recipient data source using a specified communication template.
📘 Note
Some of the following list items might not be displayed depending on the Type that is selected.
Click for details
📘 Note
You are not required to select a recipient data source if the communication template used by the action already contains a recipient data source. If you select a recipient data source in the action and the communication also contains a recipient data source, the action’s recipient data source is used.
📘 Note
For more information about templates, see Creating email communication templates.
📘 Note
You can also edit and remove actions from the Actions tab.
Click for details
You can search for scheduled task logs based on the following statuses:
The log identifies the following events for most tasks:
If any of these events cannot be completed, a Failed status is displayed, and the task is ended. You can then investigate why a task event failed.
📘 Note
If you are not self-hosted, you must contact your host for assistance modifying web.config files.
Creating the Retrieve processed payments scheduled task
You must create a separate task to retrieve processed payments, which should be scheduled after a task to Process recurring donations.
📘 Note
It is recommended that you do not run the Retrieve processed payments task until ten minutes after the Process recurring donations task with the Submit invoices for processing option has been run.
Do the following to create a Retrieve processed payments scheduled task:
- Go to RiSE > Process automation.
- (Tasks tab) Click Add new task.
- Name the task Retrieve processed payments.
- (optional) Enter a task Description.
- Select Scheduled task as the task Type.
- (Triggers tab) Create Triggers that tell the task when to run. Select On a schedule, and then select the Frequency and Start time for the task.
- Select Enabled to enable the trigger.
- (optional) (Data sources tab) Create and manage query data sources for the task.
- (optional) (Conditions tab) Specify Conditions that must be met in order for the task to run.
- (Actions tab) Click Add action.
- Select Process recurring donations as the Type.
- Deselect the following options:
- Generate invoices
- Submit invoices for processing
- Save the task.
- To activate the task, select Enabled.
- Save the task again.
Leave only the Retrieve processed payments option selected.
This task can be run manually or scheduled to run after the Process recurring donations task.
