From 0203f9a3babcf138abd6d8c3421abd64a462dd9b Mon Sep 17 00:00:00 2001 From: Abhishek Thakur <146176327+at8807602@users.noreply.github.com> Date: Fri, 3 Oct 2025 00:42:48 +0530 Subject: [PATCH 1/2] Create Trigger notification for particular catalog item.js This advanced condition can help to trigger the notification based on the particular catalog item. --- ...igger notification for particular catalog item.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Specialized Areas/Advanced Conditions/Check Catalog item for notification/Trigger notification for particular catalog item.js diff --git a/Specialized Areas/Advanced Conditions/Check Catalog item for notification/Trigger notification for particular catalog item.js b/Specialized Areas/Advanced Conditions/Check Catalog item for notification/Trigger notification for particular catalog item.js new file mode 100644 index 0000000000..41c3f90439 --- /dev/null +++ b/Specialized Areas/Advanced Conditions/Check Catalog item for notification/Trigger notification for particular catalog item.js @@ -0,0 +1,12 @@ +var item = new GlideRecord("sc_req_item"); +item.addQuery("request",current.sys_id); //filter the request from the RITM table. +item.query(); +if(item.next()){ + var ID = item.cat_item.toString(); + var itemId = "sys_id of the catalog item"; + if(itemId == ID){ + answer = true; + }else{ + answer = false; + } +} From be495a43a075e3ff16d244f771ff104889aad34a Mon Sep 17 00:00:00 2001 From: Abhishek Thakur <146176327+at8807602@users.noreply.github.com> Date: Fri, 3 Oct 2025 00:46:28 +0530 Subject: [PATCH 2/2] Readme.md Advance condition section in notification, enables with the capability to filter any kind of data present in the system and based on that you can trigger the notification. In my scenario, I have done it for the specific catalog item, whenever you request any catalog item, this notification would only trogger when the sys_id matches with the particular catalog item's sys_Id. Note: Advance condition section always returns the Boolean value as same as we have in entitlement scripts and if condition passes it returns true or else it returns false. --- .../Check Catalog item for notification/Readme.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Specialized Areas/Advanced Conditions/Check Catalog item for notification/Readme.md diff --git a/Specialized Areas/Advanced Conditions/Check Catalog item for notification/Readme.md b/Specialized Areas/Advanced Conditions/Check Catalog item for notification/Readme.md new file mode 100644 index 0000000000..3661b5d0e2 --- /dev/null +++ b/Specialized Areas/Advanced Conditions/Check Catalog item for notification/Readme.md @@ -0,0 +1,3 @@ +Advance condition section in notification, enables with the capability to filter any kind of data present in the system and based on that you can trigger the notification. In my scenario, I have done it for the specific catalog item, whenever you request any catalog item, this notification would only trogger when the sys_id matches with the particular catalog item's sys_Id. + +Note: Advance condition section always returns the Boolean value as same as we have in entitlement scripts and if condition passes it returns true or else it returns false.