get opportunity, embed party - returns organisation, not person

19 views
Skip to first unread message

Alan Hart

unread,
Dec 18, 2018, 1:30:11 PM12/18/18
to Capsule API
Hi there

if you GET an opportunity with the v2 API and specify that you want the party embedded, the API returns the organisation (if there is one) as that party. It does not return details for the primary person associated with the lead.

A common reason for wanting to grab the party this is that you want to get the email address for the specific customer for this lead. Unfortunately you don't get that unless you've put the email address in the organisation. You presumably have to request the additional parties in order to get the email address(es).

So...


1. I suggest you document it. I don't see this explained in the documentation, but perhaps you could clarify there that only a single party will be embedded and that it will be the organisation if there is one.

2. When retrieving an opportunity, would be nice to be able to embed all people associated with the lead, not just a single organisation.

Best wishes

Alan

Ben Dale

unread,
Dec 20, 2018, 5:49:42 AM12/20/18
to Capsule API
Hi Alan,

Thanks for your comments and questions! I've provided some responses to your points:

1. The opportunity model definition can be found here: https://developer.capsulecrm.com/v2/models/opportunity. If you take a look at the "party" field, it's defined as "The main contact for this opportunity".

It's worth clarifying that the primary contact won't always be an organisation. For example, if you create an opportunity where a person is the primary contact and then add said person to an organisation, the main contact for the opportunity is still the person and will be returned as such in the API response. If an opportunity is created for a person that is already at an organisation, the opportunity's primary contact will be the organisation and the person will be a secondary contact. I hope that makes sense! Please let me know if you have any more questions around this specific behaviour.

2. This is a fair request and I will log this as a feature request, however, it's unlikely that this will be worked on immediately!

Thanks again,

Ben
Reply all
Reply to author
Forward
0 new messages