How to check if RITM requested for has replied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 06:58 AM
Hello Experts,
I have a requirement, If fulfillers want any information from requested for on RITM, they put RITM in "Awaiting User" state and wait for reply. If requestor for replies the RITM should move to Work In Progress state.
This will happen from service portal, to achieve that I have written a after update business rule but it's working intermittently:
Condition: State is Awaiting User
Script:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 10:12 AM
Why are you only looking for the email? What if the user logs into the portal and just types in comments. Then there would be wording like Reply from like when you get a response from email. I would just change the BR to something like this. I have this setup for incident. You will need to update the code accordingly.
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
var updated_by = gs.getUserID();
//Allow Assigned to put the incident into Pending with Awaiting User Info or Awaiting User Confirmation
if (updated_by != current.getValue('assigned_to')) { //prevent updates from the fulfiller setting back to WIP
//Allows Caller, Opened By, and Watch List users to updated comments and set state back to in progress
if (updated_by == current.getValue('caller_id') || updated_by == current.getValue('opened_by') ||
current.getValue('watch_list').indexOf(updated_by) > -1) { //updated by can be caller, opened by or someone on the watch list.
current.setValue('state', 2);
current.setValue('incident_state', 2);
current.setValue('hold_reason', '');
}
}
})(current, previous);