Creation of email notification with approve & reject button

Rose17
Tera Contributor

Hi All,

I have a requirement as below-

I have a catalog item to which a workflow is attached. On the catalog item form there is a variable(type- select box) which has options as A,B,C,D,E.

Also the workflow has configured in such a way that for eg- when we select option A, the approval should be sent to 'xyz' manager using aproval activities, option B- the approval should be sent to 'abc' group and so on. But the notification is yet to be configured.

So the requirement is I want to create email notification for all the options- A,B,C,D and E.

When we select option A, the email should be sent to 'xyz' manager with approve and reject button. If the manager clicks on approve button, the RITM should be approved and for reject button, the RITM should be rejected.

Could someone help me with the whole iimplementation to achieve above requirement.

@Ankur Bawiskar Your help is highly appreciable.

Thanks in advance.

 

22 REPLIES 22

Girish12
Kilo Sage

Hi Rose

Please find the below thread this might help you.

https://community.servicenow.com/community?id=community_blog&sys_id=8080e8dc1babb380d01143f6fe4bcb0e

 

Thanks & Regards,

Girish.

Rose17
Tera Contributor

@Ankur Bawiskar 

Could you help me on this?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

So where you are you stuck?

you can set the approval group using Group Approval/User Approval script based on the variable value

Sample script for User Approval Script

answer = [];

if(current.variables.type == 'A'){
	answer.push('userSysId1');
}
else if(current.variables.type == 'B'){
	answer.push('userSysId2');
}

Now to send email with approve reject button check this blog

Approve/Reject button in Approval notification

Regards
Ankur

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

Hi Ankur,

I checked out that link and tried to follow the same. But i am not get the approve/reject buttons on the email.