Opportunity Roles

Opportunity Roles Endpoint Reference

Leads are linked to opportunities via the intermediate opportunityRole object.

Opportunity Role APIs are only exposed for subscriptions which do not have a native CRM sync enabled.

 

Describe

Like opportunities, a describe call and CRUD operations is exposed for opportunity roles.

Query

You’ll notice that both dedupeFields and searchableFields are a little different from opportunities.  dedupeFields actually provides a compound key, where all three of externalOpportunityId, leadId, and role are required.  Both the opportunity and lead link by the id fields need to already exist in the destination instance, in order for record creation to succeed.  For searchableFields, marketoGUID, leadId, and externalOpportunityId are all valid for queries on their own and use a pattern identical to Opportunities, but there is an additional option of using the compound key to query, which requires submitting a JSON object via POST, with the additional query paremeter _method=GET.

This produces the same type of response as a standard GET query, it simply has a different interface for making the request.

Create and Update

Opportunity roles have the same interface for creating and updating records as opportunities.

Delete

You may delete opportunity roles by dedupe fields or id field.  Specify using the deleteBy parameter with a value of either dedupeFields or idField.  If not specified, the default is dedupeFields.  The request body contains an input array of opportunity roles to delete.  A maximum of 300 opportunity roles per call are permitted.

Timeouts

  • Opportunity Role endpoints have a timeout of 30s unless noted below
    • Sync Opportunity Roles: 60s 
    • Delete Opportunity Roles: 60s