When user from Watch list add additional comments state should change to WIP

iztgokul
Tera Contributor

Hi Team,

We have a Business Rule that changes the HR Case state from Suspended to Work in Progress (WIP).

Currently, the Business Rule runs when:

  • The State is Suspended

  • The Opened for or Subject person is Dynamic – Me

  • Additional comments field changes

This works fine for our current use case.

Now, we have a new requirement:
If any user from the Watch list adds Additional Comments while the case is in the Suspended state, the case should automatically move to Work in Progress.

However, if an HR Agent adds additional comments, the state should not change.

Since we can’t use the condition “Additional comments changes” directly on the Business Rule (because it triggers irrespective of who made the comment), how can we configure or script this logic properly?

 

Thanks,

Gokul

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@iztgokul 

how are you determining who is agent?

User with particular role? or user belonging to particular group

My thoughts

-> update BR condition as this i.e. Add big OR clause and update as this

AnkurBawiskar_0-1762859307219.png

 

-> then in BR condition check for role or group membership for logged in user (this covers your agent part)

add either of this in condition based on role or group check

!gs.hasRole('agentRole')

!gs.getUser().isMemberOf('Agent Group')

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

iztgokul
Tera Contributor

Hi Ankur,

 

Agent is the person who is assigned to the case. Watchlist is Dynamic Me will not solve the issue. Because, In watchlist there can be more than one person, and my use case is when user in watchlist add any additional comments then the state changes to WIP from suspended

 

Thanks,

Gokul

 

@iztgokul 

watch list condition will work fine here

If you are in watch list along with others and you are updating the comments the BR condition will evaluate as true

Since Agent is the Assigned to of Case then update as this'

 

AnkurBawiskar_0-1762860614269.png

Watch List Dynamic Me works, see here

AnkurBawiskar_1-1762860715000.pngAnkurBawiskar_2-1762860724572.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@Ankur Bawiskar 
Subject person and Watch list person will be different.