When using SearchResults to perform a search for user email, the response contains objects like Deals and Person.
When a Deal has only one person, I can associate it with the person using the
“person_id” field inside the Deal object.
The problem is when the Deal has more than one person and I’m searching for a person that is not the main/primary of the deal. In the results I get both the Deal and the Person, but I couldnt find a way to associate the secondary person to the deal because in the deal object all I get is the “person_id” which refers to primary person.
Am I missing something?
No, you’re not missing anything on that. Unfortunately the SearchResults won’t provide the Person ID of any Participants, only that Primary connected Person to the Deal.
Have you tried using https://app.pipedrive.com/docs/api/v1/#!/Deals/get_deals_id_participants to return all Participants of a Deal?
Thanks for your quick response!
In my scenario, the user of my application is integrated with Pipedrive and when he wants to associate an activity (in my software) with his Pipedrive account, so we provide an input and he needs to enter with the name of the deal or the email of a person associate with the deal.
We use the SearchResults method because is the only that I can have (almost) all information on a single call to API. So in the results we have both Persons and Deals, but currently we can only associate deals with theirs primary person. This is already working but sometimes our users have to go to Pipedrive, change the primary contact and go back to our software.
From what I’ve understood, the solution would restrict the search for only the Deal’s name and after ask for the person, right? Maybe this is not the best case, because it’s easier for people to remember a person’s name rather than a deal’s name
Hey, sorry for the wait. Was looking into a couple things that might work.
For that method, yes, you can only use Deal name (as it’s the only thing that would have Participants). It’s a restriction unless you maybe used custom Fields to associate People with each other.
Sadly, I can’t think of a method that would work better in this case.