Salesforce Sales Cloud · Arazzo Workflow

Salesforce Sales Cloud Query Then Update Account

Version 1.0.0

Find an Account with a SOQL query, then patch the matched record's fields.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub CloudCRMCustomer ManagementEnterpriseSalesArazzoWorkflows

Provider

salesforce-sales-cloud

Workflows

query-then-update-account
Locate an Account via SOQL and update it when found.
Executes a SOQL query for an Account by name, extracts the first matching record id, and patches that Account. Branches to an end state when the query returns no records.
2 steps inputs: accessToken, accountName, updates outputs: matchedAccountId
1
findAccount
Run a SOQL query to locate the Account by name.
2
updateAccount
Patch the matched Account with the supplied field values.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Sales Cloud Query Then Update Account
  summary: Find an Account with a SOQL query, then patch the matched record's fields.
  description: >-
    A read-modify pattern over the Query and SObject Rows resources. The
    workflow runs a SOQL query to locate an Account by name, branches on whether
    a record was returned, and when a match exists patches that record with the
    supplied field values. When no record matches, the workflow ends without a
    write. Every step inlines its request and OAuth bearer Authorization header.
  version: 1.0.0
sourceDescriptions:
- name: queryApi
  url: ../openapi/salesforce-sales-cloud-query-api-openapi.yml
  type: openapi
- name: sobjectRowsApi
  url: ../openapi/salesforce-sales-cloud-sobject-rows-api-openapi.yml
  type: openapi
workflows:
- workflowId: query-then-update-account
  summary: Locate an Account via SOQL and update it when found.
  description: >-
    Executes a SOQL query for an Account by name, extracts the first matching
    record id, and patches that Account. Branches to an end state when the
    query returns no records.
  inputs:
    type: object
    required:
    - accessToken
    - accountName
    - updates
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 access token used as the Bearer credential.
      accountName:
        type: string
        description: Account Name to match in the SOQL WHERE clause.
      updates:
        type: object
        description: Map of Account field name/value pairs to patch onto the match.
  steps:
  - stepId: findAccount
    description: Run a SOQL query to locate the Account by name.
    operationId: executeSOQLQuery
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: q
      in: query
      value: "SELECT Id, Name FROM Account WHERE Name = '$inputs.accountName' LIMIT 1"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      totalSize: $response.body#/totalSize
      matchedAccountId: $response.body#/records/0/Id
    onSuccess:
    - name: accountFound
      type: goto
      stepId: updateAccount
      criteria:
      - context: $response.body
        condition: $.totalSize > 0
        type: jsonpath
    - name: accountMissing
      type: end
      criteria:
      - context: $response.body
        condition: $.totalSize == 0
        type: jsonpath
  - stepId: updateAccount
    description: Patch the matched Account with the supplied field values.
    operationId: updateSObjectRecord
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: sObjectName
      in: path
      value: Account
    - name: recordId
      in: path
      value: $steps.findAccount.outputs.matchedAccountId
    requestBody:
      contentType: application/json
      payload: $inputs.updates
    successCriteria:
    - condition: $statusCode == 204
  outputs:
    matchedAccountId: $steps.findAccount.outputs.matchedAccountId

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-query-then-update-account-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.