SAP Sales and Distribution (SD) · Arazzo Workflow

SAP SD Quotation to Order

Version 1.0.0

Create a sales quotation, read it, list its items, then create a sales order from it.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub DistributionERPODataS/4HANASalesSAPArazzoWorkflows

Provider

sap-sales-and-distribution-sd

Workflows

quotation-to-order
Convert a sales quotation into a sales order.
Creates a quotation, retrieves it, lists its items, and creates a sales order carrying the same sold-to party and material forward.
4 steps inputs: csrfToken, distributionChannel, material, organizationDivision, requestedQuantity, salesOrderType, salesOrganization, salesQuotationType, soldToParty outputs: salesOrder, salesQuotation
1
createQuotation
createSalesQuotation
Create a sales quotation header with one deep-inserted item for the sold-to party.
2
getQuotation
getSalesQuotation
Read the created quotation back to confirm it persisted.
3
listQuotationItems
listSalesQuotationItems
List the quotation items to confirm the quoted lines before ordering.
4
createOrder
createSalesOrder
Create a sales order carrying the quotation's sold-to party and material forward into a new order document.

Source API Descriptions

Arazzo Workflow Specification

sap-sales-and-distribution-sd-quotation-to-order-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: SAP SD Quotation to Order
  summary: Create a sales quotation, read it, list its items, then create a sales order from it.
  description: >-
    Models the presales-to-order conversion in SAP Sales and Distribution. The
    workflow creates a sales quotation with a deep-inserted item, reads the
    quotation back, lists its items, and then creates a sales order for the
    same sold-to party and material. Each step inlines its OData request so the
    flow reads and runs without opening the underlying OpenAPI descriptions.
    Both modifying POSTs require an X-CSRF-Token header supplied as a workflow
    input. Adaptation note: the SalesOrderItem create schema does not expose a
    ReferenceSDDocument field, so the conversion is modeled by carrying the
    quotation's sold-to party and material forward into a new order rather than
    by an OData document reference.
  version: 1.0.0
sourceDescriptions:
- name: salesQuotationApi
  url: ../openapi/sap-sd-sales-quotation-openapi.yml
  type: openapi
- name: salesOrderApi
  url: ../openapi/sap-sd-sales-order-openapi.yml
  type: openapi
workflows:
- workflowId: quotation-to-order
  summary: Convert a sales quotation into a sales order.
  description: >-
    Creates a quotation, retrieves it, lists its items, and creates a sales
    order carrying the same sold-to party and material forward.
  inputs:
    type: object
    required:
    - csrfToken
    - salesQuotationType
    - salesOrderType
    - salesOrganization
    - distributionChannel
    - organizationDivision
    - soldToParty
    - material
    - requestedQuantity
    properties:
      csrfToken:
        type: string
        description: X-CSRF-Token fetched from the OData service for write operations.
      salesQuotationType:
        type: string
        description: Quotation document type (e.g. QT).
      salesOrderType:
        type: string
        description: Sales order document type (e.g. OR).
      salesOrganization:
        type: string
        description: Sales organization.
      distributionChannel:
        type: string
        description: Distribution channel.
      organizationDivision:
        type: string
        description: Division.
      soldToParty:
        type: string
        description: Sold-to party customer number.
      material:
        type: string
        description: Material number for the quoted and ordered item.
      requestedQuantity:
        type: string
        description: Requested quantity for the item.
  steps:
  - stepId: createQuotation
    description: >-
      Create a sales quotation header with one deep-inserted item for the
      sold-to party.
    operationId: createSalesQuotation
    parameters:
    - name: X-CSRF-Token
      in: header
      value: $inputs.csrfToken
    requestBody:
      contentType: application/json
      payload:
        SalesQuotationType: $inputs.salesQuotationType
        SalesOrganization: $inputs.salesOrganization
        DistributionChannel: $inputs.distributionChannel
        OrganizationDivision: $inputs.organizationDivision
        SoldToParty: $inputs.soldToParty
        to_Item:
          results:
          - Material: $inputs.material
            RequestedQuantity: $inputs.requestedQuantity
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      salesQuotation: $response.body#/d/SalesQuotation
  - stepId: getQuotation
    description: Read the created quotation back to confirm it persisted.
    operationId: getSalesQuotation
    parameters:
    - name: SalesQuotation
      in: path
      value: $steps.createQuotation.outputs.salesQuotation
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      salesQuotation: $response.body#/d/SalesQuotation
      soldToParty: $response.body#/d/SoldToParty
  - stepId: listQuotationItems
    description: List the quotation items to confirm the quoted lines before ordering.
    operationId: listSalesQuotationItems
    parameters:
    - name: SalesQuotation
      in: path
      value: $steps.getQuotation.outputs.salesQuotation
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      items: $response.body#/d/results
  - stepId: createOrder
    description: >-
      Create a sales order carrying the quotation's sold-to party and material
      forward into a new order document.
    operationId: createSalesOrder
    parameters:
    - name: X-CSRF-Token
      in: header
      value: $inputs.csrfToken
    requestBody:
      contentType: application/json
      payload:
        SalesOrderType: $inputs.salesOrderType
        SalesOrganization: $inputs.salesOrganization
        DistributionChannel: $inputs.distributionChannel
        OrganizationDivision: $inputs.organizationDivision
        SoldToParty: $steps.getQuotation.outputs.soldToParty
        to_Item:
          results:
          - Material: $inputs.material
            RequestedQuantity: $inputs.requestedQuantity
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      salesOrder: $response.body#/d/SalesOrder
  outputs:
    salesQuotation: $steps.getQuotation.outputs.salesQuotation
    salesOrder: $steps.createOrder.outputs.salesOrder