How to Get Approvals from Flow to Display in an Email Notification

robbies7897
Tera Contributor

Hello community!

I've been asked recently to look into placing the first three upcoming approvals for a RITM (whether it be a person or a group) and put them in an outbound notification email. However, some of these approvals aren't generated at the same time but come in a "tiered" way -- for example, a manager approval that then goes to a group for approval before the RITM goes to fulfillment. I know that approvals are stored in the sysapproval_approver table once approval is requested. Is it possible to look at the upcoming approval requests for an item as well?

 

Thank you so much for any help you can provide!

1 ACCEPTED SOLUTION

Zach Koch
Giga Sage
Giga Sage

If all of the approvals are generated when you need to check, then yes you could look at them, however if they are generated sequentially, then no, there is no way to look at the upcoming approval as it is not generated yet.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

View solution in original post

4 REPLIES 4

Zach Koch
Giga Sage
Giga Sage

If all of the approvals are generated when you need to check, then yes you could look at them, however if they are generated sequentially, then no, there is no way to look at the upcoming approval as it is not generated yet.

If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!

Thank you so much for your response. This was my suspicion. I appreciate the help!

James Chun
Kilo Patron

Hi @robbies7897,

 

I guess that depends on how you are generating these approvals.

 

Do you have a central place for storing all the approval logic (i.e. who the approver is, when to trigger etc)?

If so, you can query the logic in advance to fetch all the upcoming approvals.

 

If not and you have a different Flow/Workflow per catalog item, you may just need to store the upcoming approvals somewhere (e.g. workflow variable, requested item variable) and fetch the data from the notification.

But note that you are hardcoding the approval sequence and it will need to be adjusted everytime you update the workflow/flow.

 

Hope that makes sense, Cheers

That makes sense! However, that may be a little much for us as we've got a LOT of flows and workflows out there. I was just looking to see if something existed out of the box or if there was a way to get into the flow context to see upcoming approvals. Thank you for your help!