catalog item and ask for approval , 3days, 9 dys not approved send mail

purnendu
Tera Contributor

How can I set reminder notifications for approvals using Flow Designer with a Catalog Item that includes a Multi-Row Variable Set (MRVS)?

I have a Catalog Item that goes for Manager Approval, and I want to send reminder notifications to the manager on the 3rd, 6th, and 9th day, and so on, until the item is approved or rejected.

This Catalog Item includes a Multi-Row Variable Set (MRVS) with five fields. One of the fields is similar to an "incident" record and includes a Caller ID. I need to fetch the manager of the user specified in the Caller ID and send the approval request to them.

I plan to use a subflow to fetch the manager details.
How can I:

  1. Loop through each row in the MRVS in Flow Designer?

  2. Retrieve the manager of each Caller ID using a subflow?

  3. Set up reminder notifications to be sent every 3 days until approval is completed?

What's the best approach to achieve this entirely within Flow Designer?


Any help  will be Appreciated, thanks in Advance.

1 ACCEPTED SOLUTION

Not applicable

hi @purnendu ,

You're on the right track wanting to use Flow Designer and a subflow to loop through a Multi-Row Variable Set (MRVS) and send reminders for approvals based on the manager of each caller. Since MRVS values are stored as a JSON object in a single variable, the trick is parsing that properly, looping through it, and triggering the reminders effectively.

 

 

  • In Flow Designer, when the RITM is created, use the "Get Catalog Variables" action.

  • Select your Multi-Row Variable Set (MRVS) field.

  • The result is a JSON string – so next, add a Script step to parse it using JSON.parse().

var rows = JSON.parse(inputs.mrvs_variable);
return rows;

This will allow you to access each row (i.e., each "Caller ID") for looping.

 

 

  • Add a For Each loop in Flow Designer, looping through the parsed MRVS rows (returned by the previous step).

  • Inside the loop, you’ll handle one row at a time (i.e., one "Caller ID").

  • Inside the loop, call a Subflow that you’ve already planned to create.

  • The subflow should accept a Caller ID (sys_id) and return the Manager sys_id from the manager field of the user record.

  • After getting the manager, use the Ask for Approval action.

  • Assign the approval to the manager sys_id returned by your subflow.

  • Store the Approval record sys_id somewhere (e.g., Flow Data Pill or Data Store

    • Use a Wait for Condition or Wait Until action after sending the approval.

    • Add a Timer: Wait for 3 days.

    • Check if the approval is still pending (query sysapproval_approver where state = 'requested' and your approval sys_id).

    • If it’s still pending, send a notification to the manager and loop again with another timer.

    Use a loop with counters or a separate flow logic with a "Do Until" style loop — keep checking every 3 days and stop when it's no longer pending.

  •  

 

 

View solution in original post

4 REPLIES 4

Roshnee Dash
Kilo Sage

1. Loop Through Each Row in the MRVS

MRVS data is stored as a JSON string in the variable set. To loop through it:

  • Use the Script step in Flow Designer to parse the MRVS JSON.
  • Extract each row and convert it into usable variables.

Example Script:

var mrvsData = JSON.parse(current.variables.multi_row_variable_set);
var rows = mrvsData.rows;
rows.forEach(function(row) {
    // Access row.field_name
});

You may need to use a Script Include or Action to handle this if Flow Designer doesn’t support direct JSON parsing.

2. Retrieve the Manager of Each Caller ID Using a Subflow

Create a Subflow that:

  • Accepts a Caller ID as input.
  • Uses a Lookup Record step to get the user record.
  • Retrieves the manager field from the user record.
  • Returns the Manager ID.

In your main flow:

  • After parsing MRVS, call this subflow for each row.
  • Store the manager info in a data pill or variable.

3. Set Up Reminder Notifications Every 3 Days Until Approval

Use a combination of Wait for Condition and Scheduled Notifications:

Option A: Using Scheduled Flow Logic

  • After sending the initial approval request:
    • Add a Wait for Condition step (e.g., approval state is not approved or rejected).
    • Add a Wait Timer for 3 days.
    • Send a reminder notification.
    • Loop this logic using a Do Until loop or recursive subflow call.

Option B: Using Scheduled Jobs (Advanced)

  • Create a Scheduled Job via Flow Designer or Script to run every 3 days.
  • Check approval status.
  • If still pending, send reminder and reschedule.

Best Practice Recommendation

  • Use Subflows for modularity: one for parsing MRVS, one for manager lookup, one for sending reminders.
  • Use Data Pills to pass values between steps.
  • Log actions for debugging and audit.
  • Test with sample data to ensure MRVS parsing works correctly.
  • Use Flow Designer if your reminders are specific to a Catalog Item or approval process and you want modular, maintainable, and scalable logic.
  • Use Scheduled Job if you want a centralized, script-driven solution that checks all pending approvals across the system.

Hi @purnendu 

If you found my response helpful, please mark it as correct and close the thread so others can benefit from it too.

Not applicable

hi @purnendu ,

You're on the right track wanting to use Flow Designer and a subflow to loop through a Multi-Row Variable Set (MRVS) and send reminders for approvals based on the manager of each caller. Since MRVS values are stored as a JSON object in a single variable, the trick is parsing that properly, looping through it, and triggering the reminders effectively.

 

 

  • In Flow Designer, when the RITM is created, use the "Get Catalog Variables" action.

  • Select your Multi-Row Variable Set (MRVS) field.

  • The result is a JSON string – so next, add a Script step to parse it using JSON.parse().

var rows = JSON.parse(inputs.mrvs_variable);
return rows;

This will allow you to access each row (i.e., each "Caller ID") for looping.

 

 

  • Add a For Each loop in Flow Designer, looping through the parsed MRVS rows (returned by the previous step).

  • Inside the loop, you’ll handle one row at a time (i.e., one "Caller ID").

  • Inside the loop, call a Subflow that you’ve already planned to create.

  • The subflow should accept a Caller ID (sys_id) and return the Manager sys_id from the manager field of the user record.

  • After getting the manager, use the Ask for Approval action.

  • Assign the approval to the manager sys_id returned by your subflow.

  • Store the Approval record sys_id somewhere (e.g., Flow Data Pill or Data Store

    • Use a Wait for Condition or Wait Until action after sending the approval.

    • Add a Timer: Wait for 3 days.

    • Check if the approval is still pending (query sysapproval_approver where state = 'requested' and your approval sys_id).

    • If it’s still pending, send a notification to the manager and loop again with another timer.

    Use a loop with counters or a separate flow logic with a "Do Until" style loop — keep checking every 3 days and stop when it's no longer pending.

  •  

 

 

purnendu
Tera Contributor

@Community Alums  Thank you so much Tejas.