arazzo: 1.0.1
info:
title: Salesforce Sales Cloud Bulk Import Accounts
summary: Create a batch of Accounts in one collection call, then verify the count with SOQL.
description: >-
A bulk-load pattern over the SObject Collections and Query resources. The
workflow creates up to 200 Account records in a single allOrNone collection
request, then runs a SOQL count query over the same names to confirm the
records landed. Every step inlines its request and the OAuth bearer
Authorization header.
version: 1.0.0
sourceDescriptions:
- name: queryApi
url: ../openapi/salesforce-sales-cloud-query-api-openapi.yml
type: openapi
- name: sobjectCollectionsApi
url: ../openapi/salesforce-sales-cloud-sobject-collections-api-openapi.yml
type: openapi
workflows:
- workflowId: bulk-import-accounts
summary: Bulk-create Accounts via a collection request, then verify via SOQL.
description: >-
Posts a collection of Account records with allOrNone semantics, then runs a
SOQL query to confirm the imported Accounts are present.
inputs:
type: object
required:
- accessToken
- records
- verifyQuery
properties:
accessToken:
type: string
description: OAuth 2.0 access token used as the Bearer credential.
records:
type: array
description: >-
Array of Account records, each with an attributes.type of "Account"
plus field values, to create in one call.
items:
type: object
allOrNone:
type: boolean
description: If true, all records must succeed or the whole batch rolls back.
default: true
verifyQuery:
type: string
description: SOQL query used to confirm the imported records exist.
steps:
- stepId: createAccounts
description: Create the batch of Account records in a single collection call.
operationId: $sourceDescriptions.sobjectCollectionsApi.createSObjectCollection
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: allOrNone
in: query
value: $inputs.allOrNone
requestBody:
contentType: application/json
payload:
allOrNone: $inputs.allOrNone
records: $inputs.records
successCriteria:
- condition: $statusCode == 200
outputs:
firstRecordId: $response.body#/0/id
firstRecordSuccess: $response.body#/0/success
- stepId: verifyImport
description: Run a SOQL query to confirm the imported Accounts exist.
operationId: $sourceDescriptions.queryApi.executeSOQLQuery
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: q
in: query
value: $inputs.verifyQuery
successCriteria:
- condition: $statusCode == 200
outputs:
totalSize: $response.body#/totalSize
outputs:
firstRecordId: $steps.createAccounts.outputs.firstRecordId
verifiedCount: $steps.verifyImport.outputs.totalSize
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.