The webhook is getting fed by Lemlist and Linkedin - What I’m looking to do is for the automation to check if the person already exists in Pipedrive - if yes, update the deal with relevant data (if any) or if it doesn’t exist yet (most of the time), create the deal.
How do I setup the router to accomplish this?
To check if the conditions in the previous steps have been met or not.
Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module, save the bundle contents in your text editor as a bundle.json file, and upload it here into this discussion thread.
Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.
This will allow others to better assist you. Thanks!
After the call to the Pipedrive Search module, there is certainly a “return code” indicating if it is found or not, that’s this “return code” you have to use to drive the Router.
You’ve said that you’re looking for the automation to check if the person already exists in Pipedrive - but I don’t see any module that’s searching for a Pipedrive person.
If the existence of the Person is the decision factor for the Router, then you’ll need to search for the Person first.
@Philippe_Billet yes, this is precisely what I was looking for.
There is ‘result score’ if that’s what you’re referring to?
I would expect it to return either 0 or 1 depending on if there was a match or not.
One question - there isn’t a field for the full name. If I search both for first and last name individually, will it return as ‘true’ if either a match in first name or last name is found?
Example: It’s looking for John Doe.
In Pipedrive, there are 3 other Johns. Will the condition be true (because it found a match for first name)?
I will test it with live data tomorrow (will have access to the LinkedIn account) and update this post with the bundle results.
I’ve no idea what the Result Score value relates to. It’s something that Pipedrive send back in response to the API call, but their documentation doesn’t define what it means.
Instead, you’d be better using the Total number of bundles value. This is returned by Make - it’s a count of how many hits the Search operation found.
One last point … unless you’re very sure that first name and last name will be spelled exactly the same in both Pipedrive and your data source, and unless you’re also certain that you won’t find duplicates, you might be better searching on something unique such as the email address.
You’re definitely right with searching with something specific.
I wasn’t quite sure how to search for emails, but with searching for company, would I simply map the company value from the webhook to Organisation ID?
Or to Title?
Also, does Make lose (delete) previously collected data?
I run the scenario once to get test data, and with subsequent runs I had the option to use the existing data (which is what I need), but I no longer have the option.
Reading the Pipedrive API docs in more detail, it looks like the Search Deals endpoint only allows you to search by Title, Notes or Custom fields.
You can’t search by contact name, or by company. This is a limitation of the Pipedrive API.
Instead, you’re going to need use either the Search Persons or Search Organizations module first, to get either the Pipedrive Person ID or Organization ID.
You can then use the Search Deals module to return all Deals associated with that ID.
Apologies for the delay in responding over the holiday period! I don’t have any easy answer for this I’m afraid.
The only think I can think of is that Pipedrive doesn’t like the Title you’ve specified - but in which case I’d expect their API to throw an error which would be visible in Make.
The Pipedrive API spec makes it clear that the Title is a required field - so it it’s accepted it, it should use it.