Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

Help with skipping an approval if variable is set to yes

EarlH
Tera Contributor

I have a flow that currently always asks for approvals.  I have a new requirement that if the variable skipApproval is set to Yes it should skip the approval stage and move to the fulfillment stage and create tasks.  I am trying to not create additional actions and use the ones that are already in place.  How can I do this?  I have an if statement created but cannot figure out how to skip to the steps where the fulfillment process begins.

3 REPLIES 3

Vikram Reddy
Tera Guru

Hey @EarlH,

 

You don't need to "skip to" a step, just restructure the branch: put your existing Ask For Approval action inside the false branch of an If/Else flow logic block keyed off skipApproval, leave the true branch empty, and move the fulfillment/task-creation actions to sit after the If/Else block instead of inside either branch. Flow Designer automatically rejoins both branches back into the main flow once they finish, unless you explicitly add an End, so whatever comes after the block runs no matter which path fired. No duplicate actions, no separate flow needed, just the one If/Else and reuse everything downstream of it.

 

Thank you,
Vikram Karety
Octigo Solutions INC

Tanushree Maiti
Tera Patron

Hi @EarlH 

 

A cleaner approach is to check whether approval is required, rather than whether it should be skipped. The flow would look like this:

  1. Get Catalog Variables (retrieve skipApproval).
  2. If skipApproval = No:
    • Update the stage to Waiting for Approval.
    • Ask for approval.
  3. Update the stage to Fulfillment.
  4. Create the Catalog Task (existing task).

This works as follows:

  • If skipApproval = Yes, the flow skips the approval steps and proceeds directly to updating the stage to Fulfillment, then creates the catalog task.
  • If skipApproval = No, the flow first updates the stage to Waiting for Approval and requests approval. After the request is approved, the flow exits the IF block and continues to update the stage to Fulfillment, then creates the catalog task.
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Ankur Bawiskar
Tera Patron

@EarlH 

you will have to modify your flow to handle this.

you can determine the variable value and then use IF logic to handle

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader