arazzo: 1.0.1 info: title: Salesforce Create Record summary: Create an SObject record then retrieve it by its newly assigned record id. description: >- A foundational Salesforce data pattern. The workflow creates a new record of the supplied SObject type using the field values provided, captures the 18-character record id returned by the create call, and then reads that record back so callers can confirm the write and inspect the persisted field values. 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: recordsApi url: ../openapi/salesforce-records-api-openapi.yml type: openapi workflows: - workflowId: create-record summary: Create a single Salesforce SObject record and retrieve it by id. description: >- Creates a new record of the given SObject type from the supplied field map, then fetches the newly created record by id to verify the persisted state. inputs: type: object required: - sobjectType - fields properties: sobjectType: type: string description: >- The API name of the Salesforce SObject type (e.g. Account, Contact, MyCustomObject__c). fields: type: object description: >- Map of field API name to value for the new record (e.g. {"LastName": "Smith", "Email": "jane@example.com"}). steps: - stepId: createRecord description: >- Create a new record of the requested SObject type using the supplied field values. Returns the id of the newly created record. operationId: createRecord parameters: - name: sobjectType in: path value: $inputs.sobjectType requestBody: contentType: application/json payload: $inputs.fields successCriteria: - condition: $statusCode == 201 outputs: recordId: $response.body#/id success: $response.body#/success - stepId: getRecord description: >- Retrieve the record just created, by SObject type and id, to confirm the write succeeded and inspect the persisted field values. operationId: getRecord parameters: - name: sobjectType in: path value: $inputs.sobjectType - name: id in: path value: $steps.createRecord.outputs.recordId successCriteria: - condition: $statusCode == 200 outputs: record: $response.body outputs: recordId: $steps.createRecord.outputs.recordId record: $steps.getRecord.outputs.record