Salesforce Sales Cloud · Arazzo Workflow

Salesforce Sales Cloud Bulk Import Accounts

Version 1.0.0

Create a batch of Accounts in one collection call, then verify the count with SOQL.

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

Provider

salesforce-sales-cloud

Workflows

bulk-import-accounts
Bulk-create Accounts via a collection request, then verify via SOQL.
Posts a collection of Account records with allOrNone semantics, then runs a SOQL query to confirm the imported Accounts are present.
2 steps inputs: accessToken, allOrNone, records, verifyQuery outputs: firstRecordId, verifiedCount
1
createAccounts
createSObjectCollection
Create the batch of Account records in a single collection call.
2
verifyImport
executeSOQLQuery
Run a SOQL query to confirm the imported Accounts exist.

Source API Descriptions

Arazzo Workflow Specification

salesforce-sales-cloud-bulk-import-accounts-workflow.yml Raw ↑
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: restApi
  url: ../openapi/salesforce-sales-cloud-rest-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: 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: 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