function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Serena SchultzSerena Schultz 

How to reduce the queueable jobs in my visual flow

Hello!
I have a visual flow which is using an incoming SMS message logged in Salesforce to:
  • Identify if the SMS came from a Staff Contact
    • If the SMS did not come from a Staff Contact, a checkbox is set to True on the starting object record to keep the flow from refiring later. THIS WORKS
  • If it did come form a staff contact the flow then stores the message text in a Variable (vStoveID)
  • It then uses vStoveID to look for an Account record with a matching  Stove ID and a "Stage" value of Construction Complete
    • If a matching Account record is NOT found, a specific Failure SMS is sent to the Staff Contact by updating the Staff Contact record and a checkbox is set to True on the starting object record to keep the flow from refiring later. THIS WORKS
  • If a matching Account record IS found, then 3 fields on that matching Account record are updated AND a specific Success SMS is sent to the Staff Contact by updating the Staff Contact record.
    • This is where I'm running into issues. All endpoints above work great, but this endpoint fails with this error: LIMIT_EXCEEDED: System.LimitException: Mogli_SMS:Too many queueable jobs added to the queue: 2.​ I've been researching this and I can't seem to find a way to reduce the queuable jobs. 

Here's the structure of my flow currently:
User-added image

In addition, I need to connect the "Record Update: SMS Success Message" step back to the "Record Update: Flow Completed" step to really finish the flow, but I fear that would add another job and continue to muck things up.

I'd really like to keep from goigng into code on this. Any suggestions?

Thank you!

Serena