arazzo: 1.0.1 info: title: Salesforce Sales Cloud Create Then Retrieve Contact summary: Create a Contact, then read it back by id to confirm the persisted field values. description: >- A create-and-verify round trip over the SObject Rows resource. The workflow creates a Contact record, captures the returned id, and retrieves the record by that id requesting a specific field set so the caller can confirm exactly what Salesforce persisted. 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: create-then-retrieve-contact summary: Create a Contact and immediately fetch it by id. description: >- Creates a Contact, then reads the same record back using the returned id, limiting the response to the supplied fields parameter. inputs: type: object required: - accessToken - lastName properties: accessToken: type: string description: OAuth 2.0 access token used as the Bearer credential. firstName: type: string description: First name of the Contact. lastName: type: string description: Last name of the Contact (required on Contact). email: type: string description: Email address of the Contact. fields: type: string description: Comma-separated list of fields to return on retrieval. default: Id,FirstName,LastName,Email steps: - stepId: createContact description: Create the Contact record. operationId: createSObjectRecord parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: sObjectName in: path value: Contact requestBody: contentType: application/json payload: FirstName: $inputs.firstName LastName: $inputs.lastName Email: $inputs.email successCriteria: - condition: $statusCode == 201 outputs: contactId: $response.body#/id - stepId: retrieveContact description: Read the newly created Contact back by id. operationId: getSObjectRecord parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: sObjectName in: path value: Contact - name: recordId in: path value: $steps.createContact.outputs.contactId - name: fields in: query value: $inputs.fields successCriteria: - condition: $statusCode == 200 outputs: contactId: $response.body#/Id email: $response.body#/Email outputs: contactId: $steps.createContact.outputs.contactId persistedEmail: $steps.retrieveContact.outputs.email