Steven
Steven

Reputation: 18869

How do I get a contact's sales from Salesforce using the API?

I'm looking through the API for Salesforce and trying to get familiar with it for a project I'll be working on.

Everything looks fine, I can get a Contact, a Case, an Event, a Lead, etc.

The only thing I don't see in the API is a way to get the actual sales data for a contact. I figured it would be one of the main methods available, but I can't find anything about it.

I don't know if there's a different name for a Sale object, or if I have to use some other method. Can someone lead me in the right direction?

Upvotes: 2

Views: 374

Answers (1)

JeremiahDotNet
JeremiahDotNet

Reputation: 910

SalesForce refers to sales data as an Opportunity. Opportunities move through stages. To tell if an Opportunity has been converted to a sale you can check Opportunity.IsWon field.

As you can see here, you can find opportunities for a contact using the many-to-many OpportunityContactRole table. (OpportunityContactRole.ContactId <-> Opportunity.Id).

Upvotes: 3

Related Questions