Salesforce Sales Cloud · Arazzo Workflow

Salesforce Sales Cloud Create And Convert Lead

Version 1.0.0

Capture a Lead, then realize the conversion by creating Account, Contact, and Opportunity records.

1 workflow 1 source API 1 provider
View Spec View on GitHub CloudCRMCustomer ManagementEnterpriseSalesArazzoWorkflows

Provider

salesforce-sales-cloud

Workflows

create-and-convert-lead
Create a Lead, then create the Account/Contact/Opportunity it converts into.
Adapts Lead conversion by chaining record creates. The Lead is captured first; its details seed an Account, Contact, and Opportunity, then the Lead record is updated to a converted Status to close the loop.
5 steps inputs: accessToken, convertedStatus, leadCompany, leadEmail, leadFirstName, leadLastName, opportunityCloseDate, opportunityStage outputs: accountId, contactId, leadId, opportunityId
1
createLead
Capture the inbound Lead record.
2
createAccount
Create the Account the Lead converts into, named after the Lead company.
3
createContact
Create the converted Contact linked to the new Account.
4
createOpportunity
Open the Opportunity that the converted Lead produces.
5
markLeadConverted
Update the Lead Status to a converted value to close the loop.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Sales Cloud Create And Convert Lead
  summary: Capture a Lead, then realize the conversion by creating Account, Contact, and Opportunity records.
  description: >-
    Sales Cloud exposes no dedicated Lead conversion operation in this REST
    description, so the canonical "create lead then convert" pattern is adapted
    using the SObject Rows resource. The workflow captures the Lead, then
    materializes the three records a conversion produces — an Account, a Contact
    linked to it, and an Opportunity — and finally stamps the Lead as converted
    by updating its Status. Every step inlines its request and OAuth bearer
    Authorization header so the flow reads end to end.
  version: 1.0.0
sourceDescriptions:
- name: sobjectRowsApi
  url: ../openapi/salesforce-sales-cloud-sobject-rows-api-openapi.yml
  type: openapi
workflows:
- workflowId: create-and-convert-lead
  summary: Create a Lead, then create the Account/Contact/Opportunity it converts into.
  description: >-
    Adapts Lead conversion by chaining record creates. The Lead is captured
    first; its details seed an Account, Contact, and Opportunity, then the Lead
    record is updated to a converted Status to close the loop.
  inputs:
    type: object
    required:
    - accessToken
    - leadLastName
    - leadCompany
    - convertedStatus
    - opportunityCloseDate
    - opportunityStage
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 access token used as the Bearer credential.
      leadLastName:
        type: string
        description: Last name of the Lead (required on Lead).
      leadFirstName:
        type: string
        description: First name of the Lead.
      leadCompany:
        type: string
        description: Company on the Lead (required) and used as the Account Name.
      leadEmail:
        type: string
        description: Email address of the Lead.
      convertedStatus:
        type: string
        description: A Lead Status value flagged as converted in the org.
      opportunityCloseDate:
        type: string
        description: Close date for the resulting Opportunity (YYYY-MM-DD).
      opportunityStage:
        type: string
        description: Stage name for the resulting Opportunity.
  steps:
  - stepId: createLead
    description: Capture the inbound Lead record.
    operationId: createSObjectRecord
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: sObjectName
      in: path
      value: Lead
    requestBody:
      contentType: application/json
      payload:
        LastName: $inputs.leadLastName
        FirstName: $inputs.leadFirstName
        Company: $inputs.leadCompany
        Email: $inputs.leadEmail
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      leadId: $response.body#/id
  - stepId: createAccount
    description: Create the Account the Lead converts into, named after the Lead company.
    operationId: createSObjectRecord
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: sObjectName
      in: path
      value: Account
    requestBody:
      contentType: application/json
      payload:
        Name: $inputs.leadCompany
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      accountId: $response.body#/id
  - stepId: createContact
    description: Create the converted Contact linked to the new Account.
    operationId: createSObjectRecord
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: sObjectName
      in: path
      value: Contact
    requestBody:
      contentType: application/json
      payload:
        LastName: $inputs.leadLastName
        FirstName: $inputs.leadFirstName
        Email: $inputs.leadEmail
        AccountId: $steps.createAccount.outputs.accountId
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contactId: $response.body#/id
  - stepId: createOpportunity
    description: Open the Opportunity that the converted Lead produces.
    operationId: createSObjectRecord
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: sObjectName
      in: path
      value: Opportunity
    requestBody:
      contentType: application/json
      payload:
        Name: $inputs.leadCompany
        AccountId: $steps.createAccount.outputs.accountId
        CloseDate: $inputs.opportunityCloseDate
        StageName: $inputs.opportunityStage
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      opportunityId: $response.body#/id
  - stepId: markLeadConverted
    description: Update the Lead Status to a converted value to close the loop.
    operationId: updateSObjectRecord
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: sObjectName
      in: path
      value: Lead
    - name: recordId
      in: path
      value: $steps.createLead.outputs.leadId
    requestBody:
      contentType: application/json
      payload:
        Status: $inputs.convertedStatus
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    leadId: $steps.createLead.outputs.leadId
    accountId: $steps.createAccount.outputs.accountId
    contactId: $steps.createContact.outputs.contactId
    opportunityId: $steps.createOpportunity.outputs.opportunityId

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-sales-cloud-create-and-convert-lead-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.