0

I want to thank anyone in advance for anything they can contribute to this issue I've run into. My goal is to dispatch email's when an Opportunity stage changes. The email's need to dispatch to the originating Opportunity's Account Owner (The 'Early' Email Activity I have in the flow). Then it needs to search down and email the account owners of ALL of the children below that Account. The problem is that this org has 'nested' accounts .. or account hierarchies that are 3-4 (possibly even more) levels deep (see image). I know in the flow that I'm showing you guy's here, the bottom branch is probably not even necessary.. right now it's just there to satisfy a condition where the originating opportunities account is not the parent. BUT .. forget about that for now.. What I really need to focus on and figure out, is how to search/loop down multiple levels of children accounts. Hopefully the attached images give some context. Thanks again!

NOTE: 'Get_All_Account_Records' API refers to the very first Get Records labelled in clearer english on the flow

Flow

Hierarchy

Decision

2nd Get Record between early email and loop

3 Answers 3

0

A couple of points: Here is an example of flow loop on my Youtube channel: https://youtu.be/Y9AA5ke-5cw In your case, you may need to hardcode how many levels down you need to check. I would also include a counter in my loops and abandon it after e.g. 3 emails in every loop just in case so that you don't cause many emails being generated by mistake. Or even better, why don't you generate one email or only a few emails to multiple recipients? If you are available, I will run a free training session covering loops this Tuesday. Find out here (recording will be posted on the Youtube channel above): https://superpeer.com/utkan

2
  • Thank you for the input Andy! Commented Jan 26, 2021 at 16:03
  • You are very welcome. Commented Jan 26, 2021 at 20:13
0

I figured it out with a lot of trial and error.

Unfortunately right now this only solves the problem with a '3rd-level' of children..

flow_ss

0

Found your post when researching the same requirement, haven't implemented this but should work (since winter 23 release).

Get the first level of child accounts > Add to collectionX

Create a counter for say 6 levels

per count get records where parentId IN collectionX > Assign results again to collectionX

repeat for every count.

Then deduplicate collectionX

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .