The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Service Now Express - Watch List dynamic manager

thaddeus-lithia
Mega Contributor

Hello,

I am trying to create a dynamic watch list based on caller ID. Ive found the following article how to and followed the instructions to the dot but I am still unable to update my watch list on my incident table.

https://express.servicenow.com/support/videos/servicenow-express-use-case-dynamically-adding-users-t...

Ive ensured my admin user account is set to "fake" user that is apart of the admin group, I also went through and made sure the api's put fields are correct. I am hoping someone may be able to shed some light. I know I am using express and perhaps that is my problem to start with, we have yet to migrate to enterprise, but this feature would be extremely helpful.

As instructed I went to Application Config> Web Services> api explorer> modify a record (PUT) https://company.service-now.com/api/now/table/{tableName}/{sys_id}

I adjusted {tablename} to Incident (the table I want to adjust), then I set the "/{sys_Id}" to "/${sys_id}" after that I went to REST Messages

Created a New REST Message, set the endpoint to "https://company.service-now.com/api/now/table/Incident/${sys_id} ", set the authentication type to basic, made an admin account using a an administrator credentials. Next I created an HTTP Methods Put and once again set the endpoint to "https://company.service-now.com/api/now/table/Incident/${sys_id} " and HTTP method to PUT. I set the HTTP REquest content to "{'watch_list':${existing_watch_list},${opened_by_manager}'}" and saved the HTTP Method

Next I headed over to Business Rules   and created a new one, I set the table to "Incident" and to run when state is set to active, then I headed over to Web services. I set the REST Service to the REST Message I created, and set the REST Method to the HTTP Method put that I created.

Variable substitutions populated corrected. I then set the sys_id to "Sys ID" , Opened_by_manager to (show related fields > assigned to - user fields > Manager - User Fields > Sys ID) , existing_watch_List to Watch list, with all of them set to "same as"

Now I know the rule is running because I did a simple test for actions to verify the rule is running. any suggestions? please let me know if I need to clarify anything! Thank you in advance for your assistance and help!

1 ACCEPTED SOLUTION

The issue is still with the formatting. You are still missing a '


{'watch_list':'${opened_by_manager},${existing_watch_list}'}


View solution in original post

17 REPLIES 17

darius_koohmare
ServiceNow Employee
ServiceNow Employee

Hi Thaddeus,


Having authored said video I am quite familiar with what you are attempting to accomplish.


If I understand correctly, you want to always add a callers manager to the watchlist of any incident they open, correct?


Are you setting the ${opened_by_manager} variable to the caller.manager.sysID? (note you need to select sysID and not just caller.manager).



Please add screenshots of your rest   business rule action definition, as well as the rest payload and endpoint.



Finally, have you tested the rest business rule using the test feature? You can statically enter a users sysID and a incidents sysID in the variable substitutions, and then run the test to see if the user gets added to the watchlist.


Hey Darius,



I believe I did tie it to the caller.manager.sysID as you can see in the below screen shot it is set to "opened by userfield > Manager User field > SysID


find_real_file.png



Here is the Rest Message and Put Method


find_real_file.png


find_real_file.png



I have not used the Test Feature of Business rules, I will have to look into how to use that. I was hoping there might be something like that.


darius_koohmare
ServiceNow Employee
ServiceNow Employee

Not sure if it makes a difference, but ensure you also use incident (lowercase) instead of uppercase.


The test feature will help diagnose further.


How do I find the test feature? I did take capitalization into consideration and noticed it did not make a difference