Bulk Finding and/or Updating of Deals

Hi there,
I’ve seen a couple threads floating around and bulk updating, but I wanted to check in to see if there’s been any progress on this front and if what I want to achieve is possible.

My scenario is that I have a list of deal Titles, and for each of those deals, I need to set the value of a custom field (the value will differ for each deal)

My first thought was maybe I could use the /deals/find endpoint, but it doesn’t appear I can do any sort of “OR” condition here.

I could obviously just loop over and do a find and update, but that will be very slow and most likely hit rate limits (we’re got a few hundred deals, and this process will be happening daily)

Does anyone have any suggestions?

Cheers

Hi @leomylonas,

Bulk updates are still in the future I’m afraid (maybe some time next year).

For this, have you tried filtering instead? I’m not sure exactly what goal you’re trying to achieve, but that may be the solution you need if you’re looking for an “OR” condition

POST/filters

Hi David,

Here’s a bit of pseudo code as to what I want to achieve.

var dealsWithCustomValues = [
	{
		title: "First Deal",
		customField: "1"
	},
	{
		title: "Another Deal",
		customField: "apple"
	},
	{
		title: "Something Else",
		customField: "Hello there"
	},
	
	... etc
]


foreach (dealWithCustomValue in dealsWithCustomValues) {

	// Fetch the deal from pipedrive by its title
	var pipedriveDeal = findDealByTitle(dealWithCustomValue.title);
	
	// Set the value of a custom field on the pipedrive deal
	pipedriveDeal.setCustomField(customFieldId, dealWithCustomValue.customFieldValue);
	
	// Post the deal back to pipedrive
	pipedriveDeal.save();
}

So, I can already do this with single API calls, but we have hundreds of deals, so we’re going to hit rate-limit exceptions here unless we build in some speed reductions or queuing. (Which we’d rather not do if we can avoid it)

So at the moment, there’s no alternate way to achieve this?

Cheers,
Leo

Hey Leo,

So there’s no way (now at least) to do a bulk update on those custom fields, but can you not retrieve those particular deals via a shared Filter or perhaps through webhooks? This should help reduce the calls you’re making.