I am trying to find multiple number of records in Salesforce but it looks like the Zap “Find Record(s) in Salesforce or “Find Record by query in Salesforce” returns only the one recent record instead of giving all the products.
Use Case - In the Salesforce Order Object - One order can have multiple order products. But Zap only gives me the recent order product. I tried it by “Find Record (s) in Salesforce” as well as by “Find Record by Query in Salesforce”
Does anyone has experienced this same situation? Any support is really appreciated.
Thanks
Page 1 / 1
Having the same issue. Would like an answer too if you found it outside this group.
Hey @BatonVapor and @pesmonde! :)
This is currently the expected behaviour. It allows you to carry out multiple different searches but will only return the first result of each search. It doesn’t provide multiple results for each search.
We’ve got a feature request open for multiple search results to be returned, and we’ve added your votes to that. I don’t have an ETA on when it will be implemented but we’ll be sure to email you as soon as it has been added.
Hi @pesmonde and @BatonVapor
The advanced approach to query and handle multiple Saleforce records would be to use the Salesforce API.
App APIs can be used with the Code app or Webhook app in Zaps.
Thanks for the answer, but that still makes no sense to me. Why is it plural “record(s)” if it only returns one? It specifically says it has line-item support. Maybe I’m reading it wrong?
@pesmonde
The description indicates 1 Record.
Why is “record(s)” plural then? What does “line item support” mean in this context? Do you see how this is confusing seing that there is another zap just called Find a Record and does not mention line item support?
@pesmonde
Yes, I can see how that’s confusing.
Appears the original intent was to return multiple records via this action because the results are returned as an array, but seem to be limited to 1 record.
Ok, thanks--at least my comprehension skills are not diminished. My guess is that Zapier built this function but did not have the loop function done yet (I think it’s still in beta?) so without a way for folks to handle the array, it just returns one. I even asked to develop my own app to do it and the dev team said that all of their searches by design only return one record. They said I’d need to write custom javascript and then loop through it with another piece of code to do it. I love zapier and it makes my life SOOOO much easier, but being able to loop through an array is data flow 101--especially with searches. I hope this moves up their list.
@SamB - Thanks for your reply, but as stated in my last comment, handling arrays is pretty basic data management. I hope Zapier can make this happen, as even a custom search zap will still only return one record. Seems like a pretty big limitation for a data management platform--not just for the salesforce app.
@pesmonde
Most Zap app integrations are configured and meant to work on a per record basis, as that keeps the logic simpler for basic to intermediate integrations and automations, rather than large data sets, advanced logic, and/or bulk data.
When getting into mutli-record results that introduces additional factors that have to be handled, including:
Data payload size
Arrays / Line Items (can be nested)
Pagination of Results
API limits (throttling, timeouts, max requests, etc.)
Race conditions
Generally more advanced configuration would be suitable with app APIs via the Webhook app and/or Code steps.
@Troy Tessalone - I totally get that and all of the points you’ve brought up are completely valid. I have also explored the loop function, but that only works if I can get an array sent to it. I think at least a portion of my consternation is that the title of the zap function is worded in such a way that would imply you will get an array back which you can then process. Thanks for your clarification and timely responses.
I encountered this issue today, it annoyed me so much but thankfully I have found a workaround.
I created a flow on Salesforce so whenever a child record is added to my Opportunity the Id is added to a long text field, as a new value is added it becomes a comma separated list with a space after each comma.
This comma separated list can be used in the search value to return all of the child objects. This saves taking up extra tasks on Zapier or having to spend loads of time creating some custom code.
Thanks @Oscar via Shrewsbury Food Hub So, once you get that array, do you then parse it with a loop or similar? In my case, I want to send a list of email addresses from a salesforce campaign to SendInBlue.
Once I have my array of Ids Zapier iterates through the values and returns each record with all its values. Afterwards when you select a field from the Find Record(s) results you will be provided with.
I’m not familiar with SendInBlue but it uses line items feature for sending multiple emails then once you return all of your campaign members you would reference the Email List field.
Hi all! I wanted to loop back here and update this thread with some good news!
We recently updated the Find Record(s) search on the Salesforce integration to be able to return all records found, instead of just the first record found for each search value. To setup your Zap this way, use the Salesforce integration's "Find Record(s)" search and set the "Search Results" option to "Return all matching record(s)".
One thing to note, this functionality is only available in the Salesforce integration, and not in the Salesforce (Legacy), Essentials, or Marketing Cloud integrations. If your search step hits a time out error, you may be trying to return too many records at once - try narrowing your search.