I need to include Approval History on RITM approval notification.

Teri Bobst
Mega Guru

I have a catalog item that requires multiple levels of approvals: Manager, Director, General Manager, VP. I have the workflow for this working correctly. Now, when the approval notifications get sent out at each stage of approval, I need the approval history to show on the notification. If I can accomplish this, each management level that is required to approve will see who approved before them and when.

I have tried adding the sysapproval.approval_history to the email notification that is created from the Approval table, but it doesn't display any of the previous approvers.

Does anyone know how to add the approval history to a RITM approval notification?

Thanks,

Teri

1 ACCEPTED SOLUTION

Teri Bobst
Mega Guru

I found the answer at the thread below. I modified the code slightly to work with my instance.



Include past approvers in Approval Notification


View solution in original post

8 REPLIES 8

Teri,



I found this morning that the 'approval rule Manager Approval' that no longer matches is a step in our workflow. I think the deletion of the past approvers is happening because of our workflow script. Can you share how you handle your chain of command approvals? How do you step through each level?



Thanks,
Sarah


Hi Sarah, our scenario is this: I need to obtain up through senior VP level for a certain item. Since I had no way of knowing how many levels (between 1 - 5) of approvals this would be, I did the following:


Created 4 Approval items in workflow, labelled Manager 1 Approval, Manager 2 Approval, Manager 3 Approval, and Manager 4 Approval.


I then created 1 more approvals labelled Senior VP Approval.


I also did not want the VP to approve at any of the manager stages, so I built it to skip the manager approvals if the VP was at that level, and just collect his approval in the VP Approval item.



In order to accomplish all of this I worked through the .manager levels for approval and set criteria that if the manager == the senior VP, skip that approval.



I know this probably sounds complicated, so I will try to simplify below.



  • Manager Approval 1: Approver = requested_for.manager, criteria: requested_for.manager != Senior VP ( I used .user_name and his name as he is the only one that requires this level of approval)
  • Manager Approval 2: Approver = requested_for.manager.manager, criteria: requested_for.manager != Senior VP, and requested_for.manager.manager != Senior VP
  • Manager Approval 3: Approver = requested_for.manager.manager.manager, criteria: requested_for.manager != Senior VP, and requested_for.manager.manager != Senior VP, and requested_for.manager.manager.manager != Senior VP
  • Manager Approval 4: Approver = requested_for.manager.manager.manager.manager, criteria:requested_for.manager != Senior VP, and requested_for.manager.manager != Senior VP, and requested_for.manager.manager.manager != Senior VP, and requested_for.manager.manager.manager.manager != Senior VP
  • Senior VP Approval: Approver = Senior VP (this is scripted to set this approval to this individual only)


As you can see, to step though each level you walk through the related felds of requested_for.manager, adding a .manager level at each step.


I hope this helps. It was due to this approval workflow that I needed to find a way to print the approval history on the email notifications.



Thanks,


Teri


Teri,



Thanks so much for the guidance!!! I tried your solution above and it worked perfectly for us!



Sarah


Awesome! Glad I could help



Teri