I want send notification if request is Only Production

JVINAY
Tera Contributor

Hi Team,

I want send notification if the request is " Production" and send subject body " This request is production only request, in order to processed with this production only request, admins will needs to check in the Provision prod check box and save".

suppose when user request" Dev, Test , Prod " or "Dev, Prod "or  Test , Prod this notification should not go through.

This notification send Production Only request.

I want to send notification only for requests that are specially for Production, not for requests that mention Production in the other environments like Dev or Test

JVINAY_0-1744615673437.png

Which condition should i apply and send the notification ? , Please help me how to send.

 

Thank you.

 

2 ACCEPTED SOLUTIONS

@JVINAY 

then simply in the condition field of that notification check the field value is PROD etc

AnkurBawiskar_0-1744623864347.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

@JVINAY 

I can see in the screenshot:

AGLearnNGrow_0-1744624353004.png

 

if you have this field in your table then what you were doing was correct

 

AGLearnNGrow_1-1744624405765.png

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

13 REPLIES 13

Ankur Bawiskar
Tera Patron
Tera Patron

@JVINAY 

in the advanced notification condition use script to check instance name

var instanceName = gs.getProperty('instance_name');

if (instanceName == 'prodinstancename') // give the prod instance name here
    answer = true;
else
    answer = false;

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar , 

I have written above code in Advanced Condition, But notification not triggered.

JVINAY_0-1744622049661.png

This Environment's stored in the : cmdb_ci_environment table

var instanceName = gs.getProperty('Production'); or 
var instanceName = gs.getProperty(' cmdb_ci_environment'); // Instance_name 
JVINAY_0-1744622612425.png

 

 

Can you please look into the above screen shot, Please help me any modification required.

Thank you for your responce.

 

@JVINAY 

what do you mean by production request?

notification is on which table and what's your actual business requirement

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar ,

what do you mean by production request? : When user select Production only environment at the time of submission this notification needs to be sent for Cloud group.

Notification is on which table : u_cloud_intake_request 

what's your actual business requirement :  when a users submits a request Production only , a email notification should be triggered to the Cloud group. if the user adds other environments like Dev or Test along with production , the notification should not be triggered.

EX:

Request for "PROD" environment only, send notification

Request for "PROD and Test" environments , Do not send notification

 

Thank you.