Help with lookup actions in Flow designer

Snowman15
Tera Expert

Hi All, 

I need assistance understanding how lookups work in Flow Designer.

Essentially, I need to:

 

1. Look up all the account records where "status" is "open" 

 

2. For each of those accounts, lookup all "general cases" records where "active" is true and "account" matches each of the accounts found in the previous lookup.

 

3. If "status" of lookup in step 2 is "Success" (ie there are active cases associated with any of the accounts), then update all the cases associated with each account returned and update the work notes with any comments.

 

4. If "status" of lookup in step 2 is "error" (ie no active cases), then perform another lookup on the customer_contact table for each of the accounts from step 1 to see if there's a contact associated with the returned accounts.

 

5. If "status" lookup in step 4 is "success" (ie there is a contact), do nothing.

 

6. If "status" lookup in step 4 is "error" (ie there is no contact), then create a new general case for each of the accounts returned.

 

Thank you in advance

1 ACCEPTED SOLUTION

@Snowman15 

this should help.

I believe I have answered your question and you can take it from here

flow logic accounts case 1.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

9 REPLIES 9

Hi @Ankur Bawiskar thanks for sharing this, are you able to expand every step 4 -6 -7 -9 - 10- 11 so I can see the condition you applied and then test mine? Thank you

@Snowman15 

this should help.

I believe I have answered your question and you can take it from here

flow logic accounts case 1.gif

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Ankur Bawiskar thank you very kind. I'll test and let you know. 

It worked, thank you so much!!!

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Snowman15 

It is doable, but it would be better if you try it yourself.

Instead of going directly into ServiceNow, try creating the flow on paper first. This will make it easier for you to visualize where to add each part.

Flow Designer Action: Look up records
Flow Logic: For Each
Action: Create/Update record.

https://www.servicenow.com/docs/bundle/yokohama-build-workflows/page/administer/flow-designer/refere...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************