arazzo: 1.0.1 info: title: Salesforce Get Picklist Values for a Record Type summary: Resolve an object's record type, then fetch its picklist field values. description: >- Lightning forms need picklist values that are scoped to a record type. This workflow reads the object metadata to discover the record types available on the object, then retrieves the picklist values for the requested record type so a client can populate dependent and independent picklist fields with the correct labels and valid 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: salesforceUiApi url: ../openapi/salesforce-ui-api-openapi.yml type: openapi workflows: - workflowId: get-picklist-values summary: Retrieve picklist values for an object's record type. description: >- Reads the object metadata to confirm the record types on the object, then loads the picklist values for the supplied record type so a client can render picklist fields with their labels, valid values, and dependencies. inputs: type: object required: - objectApiName - recordTypeId properties: objectApiName: type: string description: The API name of the Salesforce object (e.g. Account, Contact, MyObject__c). recordTypeId: type: string description: >- The record type ID, or the string '012000000000000AAA' for the master record type. steps: - stepId: getObjectMetadata description: >- Read the object metadata to confirm the object exists and to learn which record types are defined on it before requesting picklist values. operationId: getObjectInfo parameters: - name: objectApiName in: path value: $inputs.objectApiName successCriteria: - condition: $statusCode == 200 outputs: apiName: $response.body#/apiName recordTypeInfos: $response.body#/recordTypeInfos - stepId: getPicklists description: >- Retrieve the picklist values for every picklist field on the object scoped to the requested record type, including labels, valid values, and field dependencies. operationId: getPicklistValues parameters: - name: objectApiName in: path value: $inputs.objectApiName - name: recordTypeId in: path value: $inputs.recordTypeId successCriteria: - condition: $statusCode == 200 outputs: picklistFieldValues: $response.body#/picklistFieldValues outputs: recordTypeInfos: $steps.getObjectMetadata.outputs.recordTypeInfos picklistFieldValues: $steps.getPicklists.outputs.picklistFieldValues