How do Lifecycle Event Notifications workDescriptionYou might encounter an issue where Emails defined in Lifecycle Events are not being sent. Under an Activity Set on a Lifecycle Event, you have created a new Activity [sn_hr_le_activity] of type "Notification". You have also populated its "Email Template" with an Email Content [sn_hr_core_email_content] and selected one of the "Recipients" available options: - Recipient users- Recipient groups- Users/Groups on case Issue: After an LE Case is created and the Activity Set is triggered, the expected email is not being sent. Release or EnvironmentAll releasesCauseWhen the LE Case is created and the Activity Set is triggered, the first troubleshooting step is to confirm whether the Activity Set containing the Notification Activity has been triggered. 1. Open the "Activity Set Execution" Related Link on the LE Case. This will open the "Activity Set Contexts" [sn_hr_le_activity_set_context] list. 2. Confirm whether the Activity Set has been triggered (state = "Running Activities" or "Finished"). 3. If it has been triggered, open the Activity Set Context and check whether the Activity of type "Notification" has been launched: From the above screenshot, notice how the Related Record for the "Reminder Email" activity is a Workflow contenxt. 4. Review the OOB Workflow "Lifecycle Event Notification": In the "Check if there is at least one recipient" activity, it checks whether any recipient has been defined in the Recipients section of the Activity [sn_hr_le_activity]: In the "Send event to generate notification" activity, a new Event named "sn_hr_le.notification_activity" is generated with Parm 1 = recipients from above, Parm 2 = sys_id of the sn_hr_le_activity record. 5. Check if the event "sn_hr_le.notification_activity" has been generated successfully: https://instance_name.service-now.com/sysevent_list.do?sysparm_query=name%3Dsn_hr_le.notification_activity&sysparm_view= 6. OOB Notification "Lifecycle Activity Notification" is sent when event "sn_hr_le.notification_activity" is created: https://instance_name.service-now.com/sysevent_email_action.do?sys_id=de49d5a9537232003585c3c606dc344f 7. To make sure that the recepient(s) selected in the Activity definition will be the one(s) receiving the email, under the "Who will receive" section, confirm that the "Event parm 1 contains recipient" field is set to true. 8. Under the "What it will contain" section, confirm that the Message HTML contains the following code: ${mail_script:set_email_content_from_le_activity} 9. Select the "Show Notification Scripts" Related Link, then open the Email Script "set_email_content_from_le_activity" https://instance_name.service-now.com/nav_to.do?uri=sys_script_email.do?sys_id=ba9b273053b232003585c3c606dc34f4 This script queries the Activity [sn_hr_le_activity] table for sys_id passed in event's "Parm 2" and gets the related "Email Template". It then calls function "replaceFieldTokens" in Script Include "hr_ActivityUtils" (sys_id=940b94b10b71320074646f3ef6673a1e), which in turn calls the homonymous function in Script Include "hr_EmailUtil" (sys_id=83311704534332003585c3c606dc340d), to replace the tokens defined in thesn_hr_core_email_content record with the actual values, before sending the email. ResolutionTroubleshooting steps: - Confirm that the event is being triggered and the correct parameters have been passed. If not, review the Workflow "Lifecycle Event Notification" and/or the Activity definition. - The most common cause of this issue is that the OOB Notification "Lifecycle Activity Notification" might have been deactivated. If that's the case, and no other custom notifications have been set up to trigger when event "sn_hr_le.notification_activity" is fired, then no emails will be sent from the Lifecycle Event. - Make sure that the Email Script "set_email_content_from_le_activity" is OOB. - Confirm that all the Script Includes invoked by the from the Email Script are OOB and are not missing any of the functions being called in this scenario.