+ Start a Discussion
Mark GuildayMark Guilday 

Flow works sometimes but not others, identical inputs

Hello developers,

I tried to get SFDC support to help but because we don't have premier support they sent me here. Hoping you can help, or at least give me your thoughts so I can test out some theories.

What my flow does:

We get 15,000 cases in via emal 2 case every day. Yes, that's right, 15k every day! My flow takes an incoming case, and waits an hour(there is a lot going on when a case comes in so I found by delaying the flow, it has a much better success rate), and then takes an ID feild (Partner ID) and searches all the accounts in salesforce and the first one it finds with a matching Partner ID, pulls the SFDC account ID and inputs that into a lookup field on the case. We are essentially doing a vlookup so we can link all of our incoming CS cases to existing sales accounts (Yes if we were starting over we would design it right so the contact would do the linking for us but just pretend that is 100% off the table and we have to make this idea work).

What goes right:

So I have the exact same flow fire off a custom button I made and it works everytime, even for the ones I get the fault error from, so that is telling me the flow is working, as long as there is a match in Salesforce.

What is wrong:

Even for accounts where the IDs match the flow seems to error out and says it can't find a match, even though there is one. I run reports and see that the automatic flow is working on cases with the same values. It seems sporatic, like it works on most cases and then it will fail here and there without apparent reason.

My theory:

I'm thinking that maybe the ticket volume we ingest might be causing limit errors or somethine to that nature. Also, another theory is that maybe the times it errors out, even when there is a match, that the case might be being updated at the same time it is trying to update via the flow?

Anyways, even if you don't understand what I'm trying to do, I'd love to hear your thoughts on why a flow might fail sometimes and other times work just fine.

This will only let me post 2 screenshots so I'll choose carefully, but if you really want to investigate this I'll be happy to email you as many screenshots as you want.


See below: CS cases is my lookup field. Some are populated and some aren't but you can see they all have the same ID and also there isn't any patterns as far as open vs closed, queues, owners, etc.
report showing some are linked and some aren't, all same ID, no patterns

See Below: In this screenshot you can see that case#02630422 was blank in the above report screenshot but this shot was taken right after I launched the flow from a button and it worked perfectly
User-added image

Any help, thoughts, theories, links to other docs would be super helpful.

Thanks!
Mark
VineetKumarVineetKumar
Try running the flow only for the errored out record, perhaps that may give you some clue.
Mark GuildayMark Guilday
Hi Vineet,

I created a button to kick off my flow manually and everytime I run it on the errored out flows it works. It has to be something to do with limits, order of operations, or maybe that the record was being edited simultaneously. 

Any other thoughts anyone?

Thanks,
Mark
VineetKumarVineetKumar
Yes, some how the bulk operation is conflicting with each other.
You may want to refer debug logs for error reporting, if you can replicate this bulk operation with some test data.