I have a flow that has been working fine but now for some large scenarios users getting a "too many SOSQL queries 101" error.
The FLOW does the following:
- Get Case (1)
- Get Account (1)
- Get Price Book (1)
- Get all Case Assets (child of Case) for Case (can be 100 records, but normally about 2)
- For each Case Asset
- Get all Case Asset Solutions (child of Case Asset) for Case Asset (about 2 records)
- For each Case Asset Solution
- Get Product (1)
- Get Price Book Entry (1)
So thats about 4
#Sales Cloud #Automation 03 queries in worst case scenario.
How could I redesign the FLOW to lower the queries? See attached FLOW for the relevant info.
4 answers
I know this is going to be a very generic answer, but my suggestion would be to break up your second loop and put it outside of your first Loop Case Assets. What I mean is, once you've assigned values to all the Case Assets that meet the right criteria, close the loop, then do another Get Records for Case Assets where the criteria aren't met and continue this way. Let me know if that makes sense.