Creating data sources (queries) for alert tasks
Using queries as data sources in alert tasks is necessary because they tell iMIS when to display an alert.
Example: Brian Murphy wants to create an alert that lets all members of an organization know when a staff member's birthday is coming up.
You can create or add queries to existing alert tasks or go to Intelligent Query Architect to create new queries for tasks not yet created. See Defining queries.
Creating or adding queries to existing alert tasks
Do the following to create or add a query to an existing alert task:
- Go to RiSE > Process automation.
- Select the alert task for edit.
- 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.
- 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.
Creating new queries for new alert tasks
Do the following to create a new query before creating the task:
- Go to RiSE > Intelligent Query Architect.
- Select New > Query.
- (Summary tab) Enter a Name and Description.
- (Sources tab) Add the sources for the query. If using multiple sources, specify the Relations between the sources.
- (Filters tab) Add filters to narrow the query results. Keep in mind the following:
- Alerts do not support filters in the following format: "@url:id","@url:itemid". Instead, use two filters separated by an OR.
- Insert a URL parameter for an alert to only display for a selected event. For more information, see Adding dynamic filters to queries.
- (Display tab) Select columns that must be available to merge into the alert message. These fields will be available from the Insert field drop-down within the alert message.
- Save the query at $/Common/Tasks/Queries in the Document system.
- Run the query to confirm that it returns the appropriate results.
- (optional) If you only want the alert to display when a contact views their own record or on the record of the selected contact for staff users:
- Add the ContactKey property to the Filters tab.
From the Value drop-down, choose Dynamic and then choose Selected Contact.
Note: If you do not add the Selected Contact dynamic filter to the query, the alert will display for all contacts.
- (optional) (Security tab) Confirm that the appropriate security options for the query are selected. If a user does not have permission to run the query, they will not be able to view an alert generated by a task using the query as a data source. It is recommended that you do not limit access beyond authenticated users.
- Save the query.