Rollback Catalog Task Revert Reason field in email notification

Brett21
Tera Guru

Team,

I am working on an enhancement that needs to rollback to the 1st catalog task if the IP address is wrong.  When the 2nd catalog task is generated and the fulfillment team see's the IP Address entered is wrong the team wants to close skip the 2nd catalog task and rollback to the 1st catalog task with the 'revert reason' details sent in the email notification as to why.

 

The rollback of catalog task works as expected, but the 'Revert reason' data doesn't show up in the email notification.  My guess is the rollback activity removes it since tasks needs to restart.  

 

My question is - is there a way to get the 'revert reason' data (single line text field on sc_task table)?  I currently have an event task in my workflow to kick off the email notification.

 

Brett21_1-1701453512395.png

 

Thanks for any assistance to getting this to work

8 REPLIES 8

Shane J
Tera Guru

Have you tried a BR to replace current with previous for that field?

Do you mean instead of having the event task in the workflow.  I could possibly try a BR to get the previous data before the task/tasks are rolled back?

Leave your build as is, but add a Business Rule to sc_task with an advanced script:

 

if (previous.u_revert_reason != ''){ //or you could try this in the BR's Condition

current.u_revert_reason = previous.u_revert_reason;

}

 

You might want to play with the Condition so it doesn't run more often than it needs to.


If that doesn't work, maybe you can do something with the workflow.scratchpad.  Let me know.

No luck with getting the revert reason data into the email notification.  I tried the BR as an onBefore update and onAfter update.  I even placed the event trigger in the BR.