How to check whether user acknowledged or rejected the email through workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 12:54 AM
Hello Team,
I have created new catalog item for that catalog item I created workflow but here I need your help.
when user submitted the request catalog task will be created after catalog task i have added create event as you can see below in that i have created one event registry and added to the event then i have added wit for condition to workflow after that i have got stuck how to proceed? as you can see second image i need to notify user through email notification when user select one of the link "Acknowledged or Reject" how to do capture user update then if it's rejected how to trigger another task to fulfilment group and send notification to user again.
Thanks,
JRY

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 04:49 AM
Yes, the above can be done based on the outcome of setting the variable value. It would consist of a 'wait for condition' waiting for a variable to have a value which the inbound action would set. It will then proceed to an IF activity where based on the answer either the workflow ends or a new task is created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 05:59 AM
can you help me with the script in IF activity how to find the email is acknowledge or rejected.
please share the script if possible.
Thanks,
JRY

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2020 06:23 AM
Hi,
Inbound action will look like below. This is on the principal that you are providing a 'mailto' link in your original notification that prefabricates a subject of <ritm number> - <approval>. e.g RITM012344 - rejected. For this, I'm using a variable called 'state' as a choice list that we can update based on the email reply
Inbound Action
Type: Reply
Table: Requested Item
(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
// Implement email action here
if (email.subject.indexOf("acknowledged") >= 0) {
current.variables.state = "acknowledged";
current.update();
}
if (email.subject.indexOf("reject") >= 0)
current.variables.state = "reject";
current.update();
event.state = "stop_processing";
})(current, event, email, logger, classifier);
Workflow Wait Condition
// Set the variable 'answer' to true or false to indicate if the condition has been met or not.
if(current.variables.state == 'acknowledged' || current.variables.state == 'reject'){
answer = true;
}
If (after wait condition)
use the condition builder to look at the variables and depending on value either proceed to end or add a new taks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2020 03:16 AM
Hi Kieran,
Sorry for late reply to this solution, it worked partially but when task is closed then it's directly going to if condition then automatically creating new task.
can you help how to set this flow as i created a variable on catalog item "State" for testing purpose only in that we have two choices "Acknowledged" & " Rejected" when i select anyone then based on that if condition has to work. Now it's directly going to if condition then it's creating new task. If state is rejected then only new task has to be created.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2020 04:05 AM
Hi Jry,
As part of the wait condition, can you add the below line above the IF statement to see what the value of the variable is. Also ensure the variable you've added to the form isn't defaulting to acknowledge / rejected.
workflow.info("Value of variable is" + current.variables.state);