Service Now イベント(Event)、メールスクリプト(Email Script)の使い方
1.イベントの登録と発火
登録:
System Policy > Events > Registry にて “incident.updated" を登録。
発火(例:Business Rule内):
gs.eventQueue(“incident.updated", current, current.sys_id, gs.getUserID());
2.通知の作成
モジュール: System Notification > Email > Notifications
「When to send」: “incident.updated" イベントがトリガー
「Who will receive」: 例えば Assigned to のユーザー
「What it will contain」: 件名・本文の中に ${} やメールスクリプトを使用
3.メールスクリプトの使用
Script Include または Email Script モジュールで定義
// Email Script: getAdditionalInfo (function() { return "影響範囲:" + current.impact + "<br>優先度:" + current.priority; })();
通知本文内で使用
${MailScript:getAdditionalInfo}