Salesforce · Arazzo Workflow

Salesforce Upsert by External Id

Version 1.0.0

Create or update an SObject record keyed on an external id field value.

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

Provider

salesforce

Workflows

upsert-by-external-id
Upsert a Salesforce SObject record by an external id field.
Upserts a record of the given SObject type using an external id field and value, then reads the record back by the same external id to verify the result.
2 steps inputs: externalIdField, externalIdValue, fields, sobjectApiName outputs: record
1
upsertRecord
Upsert the record by external id field and value. Salesforce creates a new record when no match exists and updates the existing record when one does.
2
getUpsertedRecord
Retrieve the upserted record back by the same SObject type and external id field to confirm the persisted field values.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Upsert by External Id
  summary: Create or update an SObject record keyed on an external id field value.
  description: >-
    The canonical Salesforce integration pattern for syncing records from an
    external system of record. The workflow upserts a record by SObject type and
    an external id field: Salesforce creates a new record when no match exists
    for the supplied external id value and updates the existing record when one
    does. The matched or created record is then retrieved by the same external
    id so callers can confirm the persisted state. 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: externalApi
  url: ../openapi/salesforce-external-api-openapi.yml
  type: openapi
workflows:
- workflowId: upsert-by-external-id
  summary: Upsert a Salesforce SObject record by an external id field.
  description: >-
    Upserts a record of the given SObject type using an external id field and
    value, then reads the record back by the same external id to verify the
    result.
  inputs:
    type: object
    required:
    - sobjectApiName
    - externalIdField
    - externalIdValue
    - fields
    properties:
      sobjectApiName:
        type: string
        description: >-
          The API name of the Salesforce SObject type (e.g. Account, Contact,
          MyCustomObject__c).
      externalIdField:
        type: string
        description: >-
          The API name of the external id field to match on (e.g.
          External_Id__c).
      externalIdValue:
        type: string
        description: The value of the external id field used to match a record.
      fields:
        type: object
        description: >-
          Map of field API name to value to write to the matched or created
          record.
  steps:
  - stepId: upsertRecord
    description: >-
      Upsert the record by external id field and value. Salesforce creates a new
      record when no match exists and updates the existing record when one does.
    operationId: SObjectRowsbyExternalID
    parameters:
    - name: SOBJECT_API_NAME
      in: path
      value: $inputs.sobjectApiName
    - name: FIELD_NAME
      in: path
      value: $inputs.externalIdField
    - name: FIELD_VALUE
      in: path
      value: $inputs.externalIdValue
    - name: Content-Type
      in: header
      value: application/json
    requestBody:
      contentType: application/json
      payload: $inputs.fields
    successCriteria:
    - condition: $statusCode == 200
  - stepId: getUpsertedRecord
    description: >-
      Retrieve the upserted record back by the same SObject type and external id
      field to confirm the persisted field values.
    operationId: SObjectRowsbyExternalID
    parameters:
    - name: SOBJECT_API_NAME
      in: path
      value: $inputs.sobjectApiName
    - name: FIELD_NAME
      in: path
      value: $inputs.externalIdField
    - name: FIELD_VALUE
      in: path
      value: $inputs.externalIdValue
    - name: Content-Type
      in: header
      value: application/json
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      record: $response.body
  outputs:
    record: $steps.getUpsertedRecord.outputs.record

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-upsert-by-external-id-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.