Salesforce · Arazzo Workflow

Salesforce Create Opportunity with Contact Role

Version 1.0.0

Create an Opportunity and then attach an OpportunityContactRole linking a Contact to the deal.

1 workflow 1 source API 1 provider
View Spec View on GitHub Fortune 500Artificial IntelligenceAnalyticsCloudCommerceCRMCustomer ServiceEnterpriseMarketingPlatformSalesArazzoWorkflows

Provider

salesforce

Workflows

create-opportunity-with-contact-role
Create an Opportunity and link a Contact to it via an OpportunityContactRole.
Inserts an Opportunity record, then creates an OpportunityContactRole that associates a supplied Contact with the new Opportunity in a named role.
2 steps inputs: contactId, isPrimary, opportunity, role outputs: contactRoleId, opportunityId
1
createOpportunity
Insert a new Opportunity record using the supplied field values. Returns the Id of the newly created Opportunity.
2
createContactRole
Create an OpportunityContactRole that links the supplied Contact to the newly created Opportunity with the given role.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Create Opportunity with Contact Role
  summary: Create an Opportunity and then attach an OpportunityContactRole linking a Contact to the deal.
  description: >-
    A core sales-process pattern: open a new Opportunity and immediately record
    which Contact plays which role on that deal. The workflow inserts the
    Opportunity, captures its Id, and then creates an OpportunityContactRole
    that references both the new Opportunity and an existing Contact. Every step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: recordsApi
  url: ../openapi/salesforce-records-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-opportunity-with-contact-role
  summary: Create an Opportunity and link a Contact to it via an OpportunityContactRole.
  description: >-
    Inserts an Opportunity record, then creates an OpportunityContactRole that
    associates a supplied Contact with the new Opportunity in a named role.
  inputs:
    type: object
    required:
    - opportunity
    - contactId
    properties:
      opportunity:
        type: object
        description: >-
          Field map for the new Opportunity (e.g. Name, StageName, CloseDate,
          Amount). Name, StageName, and CloseDate are required by Salesforce.
      contactId:
        type: string
        description: The 18-character Id of the Contact to attach to the Opportunity.
      role:
        type: string
        description: The role the Contact plays on the deal (e.g. Decision Maker).
      isPrimary:
        type: boolean
        description: Whether this Contact is the primary contact on the Opportunity.
  steps:
  - stepId: createOpportunity
    description: >-
      Insert a new Opportunity record using the supplied field values. Returns
      the Id of the newly created Opportunity.
    operationId: createRecord
    parameters:
    - name: sobjectType
      in: path
      value: Opportunity
    requestBody:
      contentType: application/json
      payload: $inputs.opportunity
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      opportunityId: $response.body#/id
  - stepId: createContactRole
    description: >-
      Create an OpportunityContactRole that links the supplied Contact to the
      newly created Opportunity with the given role.
    operationId: createRecord
    parameters:
    - name: sobjectType
      in: path
      value: OpportunityContactRole
    requestBody:
      contentType: application/json
      payload:
        OpportunityId: $steps.createOpportunity.outputs.opportunityId
        ContactId: $inputs.contactId
        Role: $inputs.role
        IsPrimary: $inputs.isPrimary
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactRoleId: $response.body#/id
  outputs:
    opportunityId: $steps.createOpportunity.outputs.opportunityId
    contactRoleId: $steps.createContactRole.outputs.contactRoleId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/salesforce-create-opportunity-with-contact-role-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.