Creating Database Triggers
About Database Triggers
Database triggers monitor the Campus Cafe platform for user-defined changes. When a change occurs, an activity can be triggered, such as sending an email.
To ensure system performance, not all fields are available for database triggers.
Prerequisites
Create activity tracking templates that the change triggers.
Required permissions
Module | Number | Description |
---|---|---|
System Admin | 1182 | Create, change or delete trigger |
Understanding tables and fields
When a record in Campus Cafe is changed, Campus Cafe behind the scenes updates a table and field. You can think of this as adjusting a cell in a spreadsheet.
Actions (triggers) can occur when a field on a specific table is added or changed. A database trigger references the specific table and field.
To identify what table and field is changed by an action, Campus Cafe recommends triggering the action on a test individual and then reviewing the audit log (Person Selected > Audit Log), which will show the table updated and the field changed.
In the example below, the prospect's admissions progress code was changed from applied to accepted. The audit log indicates the table STBIOS (1) was updated and the value of the field ADM_PROGRESS_CODE (2) changed from Y (3) to A (4).
Create a trigger
Go to Admin > Database Triggers.
Click New Record.
Trigger Group: A name to identify the trigger
Description: Text that describes the trigger
Table Name: The record that holds the field that when updated will trigger the activity
Field Name: The field that when updated will trigger the activityÂ
From Operator: The boolean operator for the initial value
From Value: The initial value (enter * for any value)
To Operator: The boolean operator for the new value
To Value: The new value (enter * for any value)Â
Trigger On Event: Specifies whether the trigger will occur when the value is added, changed or both
Template: The activity template to trigger
Click Create.
Go to Admin > Refresh Data Cache.
Delete trigger
Deleting a trigger stops the actions that occurred based on a change from happening. It doesn’t remove or revert any actions the trigger previously initiated.
Go to Admin > Database Triggers.
Select the trigger to delete.
Click Delete Selected.
Examples
Example: Notification to staff on applicant acceptance
In the below example, the activity tracking template Notify Financial Aid of Accept is configured to be added to a prospect's record when the prospect's admissions progress code changes from any status (any value is denoted by *) to the admissions progress code of A (accepted). The activity, in turn, could contain a workflow that emails the prospect or a staff member.
Example: Notification to instructor of student drop
In the below example, the activity tracking template Notify Instructor of Drop is configured to send to the instructor of a class the student drops.Â
For the email to send, the workflow must have Email Faculty checked and the instructor must have an email on his or her Campus Cafe record.
Example: Notification of exit counseling
In the below example, the activity tracking template EXIT COUNSELING is configured to be added to a student's record when the student's degree status code changes from any status (any value is denoted by *) to one of a list of values separated by a comma. The activity, in turn, could contain a workflow that emails the prospect or a staff member letting them know of that Exit Counseling is required after Withdrawing or Completing a program.
Â