The following is a customization that enables the system to conditionally notify the Requestor (or any other contact) of a Change Order when the Scheduled End Date has passed and the CO Status is still in RFC or Scheduled (Different statuses can be configured). Props to Gutis for providing the SPEL Event Method documentation that was used to build this customization. The attached SPEL script will create an event that waits for the Scheduled End Date and will fire if the condition is satisfied. The condition associated with the event can be changed to fit other use cases.
Let me know if you have any questions or comments. Thanks!
- Create a Notification Template to be used by the Multiple Notification Macro. The attached ScheduledReminder.html file has the formatting used in Figure 1.
- Create a Multiple Notification macro and associate the Message Template from step 1. Add the desired Object Contacts to the macro, see Figure 2 for an example.
- Create a site defined condition with a filter to the specific statuses that you want to trigger the notification. See Figure 3
- Create an Event with the name "zChange Order Scheduled Date Reminder". (The event symbol is hard coded into the SPEL script). See figures 4 and 5.
- Set the Delay time to 3 seconds
- Set the Repeat Delay time to the however long you want the event to wait before firing again. (We chose 24 hours)
- Set Allow Time Resetting to Yes (If this is not changed from No the SPEL script will be unable to set the wait_time)
- Choose to either Repeat the event or only allow it to fire once
- Attach the condition that was created in step 3
- Attach the Multiple Notification Macro created in step 2 to the Actions on True list
- Copy zAttach_sched_end_reminder.spl and zAttach_sched_end_reminder.mod to NX_ROOT/site/mods/magic on all Service Desk servers and restart services
Figure 1 - Message Template
Figure 2 - Multiple Notification Macro
Figure 3 - Condition
Figure 4 - Event Details
Figure 5 - Event Actions