4. Set up the logic

4. Set up the logic

To send the Sales Order data to SAP Build Process Automation, we need to configure the Get Approval button so that it triggers the process workflow.

  1. Select Get Approval button. Open the logic canvas by clicking Add logic to Button1 at the bottom right.

  2. Drag a Trigger process function onto the canvas, and connect the component tap event to it.

  3. In the logic canvas, click on the Trigger process and then click on Custom object.

  4. Map the Sales Order fields to their corresponding page variable (example below for material).

    Sales Order fields Page variable
    email email
    material material
    quantity quantity
    shipToParty customer
    expectedDeliveryDate date

  5. Enter the following Static Text values for the remaining fields:

    Sales Order fields Static Text Value
    soldToParty 1000292
    salesOrderType OR
    salesOrganisation 1710
    distributionChannel 10
  6. Select SAVE.

  7. Drag a Toast flow function onto the logic canvas.

  8. Connect the top output of the Trigger process flow function to it.

  9. Choose the Toast flow function and configure it in the Properties pane on the right. For Toast message, click on the ABC.

Select Formula > Formula.

Code Snippet
12
"Triggered process with ID: " + outputs["Trigger process"].newProcessInstance.id
  1. Save the formula using the Save button.

  1. Select SAVE on the top-right corner of the screen.