
Email Debugging and Notifications Guide
Learn about configuring email notifications, handling POP3 and SMTP emails, setting up push notifications, and creating email templates and layouts for effective communication with users. Stay informed about events through email, SMS, and push notifications.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Email & Debugging AUTHOR: RAJALAKSHMI ACCOUNT: TRAVELPORT
Notifications Notifications keep users informed of events that concern them. The system can notify users by email, SMS Text message, or push notification EMAIL abc12@travelport.com TEXT Mobile +44723495679 PUSH Alerts in the Mobile App
Push Notifications In addition to sending email and SMS notifications, an instance can send push notifications to mobile devices
POP3 and SMTP Emails sent to and from your instance are processed by a mail server maintained by ServiceNow. Instead, ServiceNow has pre-configured POP3 and SMTP accounts set up to send and receive emails. SMTP Simple Mail Transfer Protocol POP3 Post Office Protocol version 3 These email addresses are formatted like instance@service-now.com. For example, if your instance name (the URL prefix you use to access your ServiceNow instance) is my_company_name, then the email address corresponding to that instance will be my_company_name@service- now.com. Sending an email to this email address will (if inbound email is enabled) result in the existing inbound email actions being evaluated.
Configure Notifications Use email notifications to send selected users email about specific activities or events that has happened in the System Activities or Events such as Insert or Update or event created Email notifications allow administrators to specify: When to send the notification Who receives the notification What content is in the notification
Subject and Message HTML Add fields: ${short_description} Add URL: ${URI_REF} Add Email Notification Script: ${mail_script:<Name of the Script>}
Email Template and Layout You can use the syntax for the Variables, URL and mail script in the Email Template also Note : If using an Email Template then Subject and Message will be used from the template unless overridden with a Subject and Message on this form Email Layout: Create reusable content for the message body of Email templates
Email Layout Body of the Message - ${notification:body} Two Macros available for adding to the Footer - ${NOTIF_UNSUB} and ${NOTIF_PREFS}
Email Notification Script email.setFrom(current.caller_id.email); email.setReplyTo("joe.employee@yourcompany.com"); email.setSubject("This is the new subject line"); email.setBody("This is the new body"); template.print( message ); template.space( number of spaces );
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template, /* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action, /* Optional GlideRecord */ event) { // Add your code here current.number; template.print("<p>" + current.u_owned_by + "</p>"); template.print("<table border=\"2\"><tr><th>Number</th><th>Short Description</th><th>Owned By</th></tr>"); var bgEm = new GlideRecord('x_217576_root_libr_background_scripts'); bgEm.addQuery('u_owned_by', current.u_owned_by); bgEm.query(); while (bgEm.next()) { template.print("<tr><td>"+bgEm.number+"</td><td>"+bgEm.short_description+"</td><td>"+bgE m.getDisplayValue('u_owned_by')+"</td></tr>"); } template.print("</table>"); })(current, template, email, email_action, event);
Debugging in ServiceNow Field Watcher Syntax Editor Javascript Log Script Debugger Debug ACL Debug Business rules
Syntax Editor Context-sensitive help Keyboard Shortcuts Scripting Assistance (Ctrl and spacebar) Open Parenthesis Syntax Editor Macros
Session Log Error (gs.error) - Logs events that might still allow the application to continue running Warn (gs.warn) - Logs potentially harmful events Info (gs.info) - Logs informational messages that describe the progress of the application Debug (gs.debug) - Logs informational events that are useful for debugging an application gs.addInfoMessage(); gs.addErrorMessage();
Script Debugger System Diagnostics Script Debugger Role script_debugger Local, Global and Closures variables and values Transaction Detail URL of the page, user details, Unique value of the record
Debugging in Service Portal Will be covered in the Service Portal session https://serviceportal.io/docs/documentation/debugging.md