Skip to Content

Create an API Trigger for the Process

Create an API trigger for the business process.
You will learn
  • How to create an API trigger to start an instance of a business process from any service, like SAP Build Apps
chaitanya-priya-puvvadaChaitanya Priya PuvvadaOctober 30, 2025
Created by
celineaudinsap
January 25, 2023
Contributors
celineaudinsap
thecodester
khushiyadavsap

Prerequisites

A business process is started by defining a trigger, an event that indicates to your SAP Build Process Automation tenant to start a process instance.

Process triggers can be a form, such as a request form, an API call, where an external system starts the process or an Event.

You can start an instance of your process using an API call, with the inputs for the call configured from the process builder. These inputs can then be used as input fields in your process.

You may also start the instance with an event trigger which on-boards and listens to back-end events emitted from an external source system and reacts to such events by triggering artifacts such as processes and automations.

  • Step 1

    A data type is an artifact describing a data structure that can be used as an input and/or an output parameter in automations or processes. You have two options to create the fields in the data type. You can either import an excel file or define the fields manually.

    Once you have acquired the Template Project from the Store, your process looks as below:

    template
  • Step 2
    1. Open the process Order Processing.

      Process
    2. From the Editable version of the project, choose the three dots of the Order Processing Form and select Remove to delete the form.

      Delete Form

      A warning message will inform you that the related bindings will be removed. Choose OK.

      Warning
    3. Save the project.

    4. To add an API trigger for the process, click on the Add a Trigger > Call an API.

      New API Trigger
      New API Trigger
    5. Enter the name of the trigger as Sales Order Trigger. Choose Create.

      Create API Trigger Pop Up
    6. Save your project.

  • Step 3
    1. Open the Process Details by clicking on the Canvas.

      Process Details
    2. Choose Variables. Then choose Configure to configure process inputs.

      Configure
    3. Delete the existing inputs by clicking on the delete button.

      The existing inputs were configured from the Order Processing Form. Since you have removed it, you will need to configure new input parameters for the Sales Order Trigger.

      Delete
    4. Choose Add Input and add the following parameter:

      Name Type
      salesOrderDetails SalesOrder

      Check the Required box and choose Apply.

      Delete
    5. Save your project.

    6. Once the trigger is created successfully, you can view the trigger under the Triggers section in the Overview page.

      Triggers Overview

      You can edit, deactivate, or delete the API trigger properties from Triggers tab in the respective process builder overview.

      • Deactivate means that while the trigger exists in design-time, you cannot consume it in runtime.

      • Delete will permanently delete the trigger from design-time, but for already deployed processes the trigger will still exist at runtime.

      In general, any changes in the trigger will be effective only when the process is released and deployed.

      Note: All the API triggers that are created in that project will be shown.

    How are the inputs added for an API trigger?

  • Step 4

    Since you have created an API trigger, the bindings were lost. Let’s adjust the process with the new inputs configured for the API trigger.

    1. Choose the condition artifact and click on Open Condition Editor.

      Condition
    2. Enter the condition for orderAmount.

      Condition
      Condition
    3. Enter the condition for shippingCountry.

      Condition
      Condition
    4. Click on Apply.

    5. Choose Approval Form to adjust the bindings. Modify the General section.
      In the Subject field, do the following:

      • Enter Review and approve order
      • Select Order Number from Process Inputs
      • Enter from
      • Select Customer Name from Process Inputs
      • Enter company
      Condition

      Since the process would be started through an API, remove the Users Process Started by and enter your EmailID that was configured for the tenant.

      Condition
    6. Modify the Inputs section.

      Condition
    7. Choose Order Confirmation Form to adjust the bindings. Modify the General section.
      In the Subject field, do the following:

      • Enter Your order
      • Select Order Number from Process Inputs
      • Enter has been successfully received
      Condition

      Since the process would be started through an API, remove the Users Process Started by and enter your EmailID that was configured for the tenant.

      Confirmation
    8. Modify the Inputs section.

      Inputs
    9. Choose Order Rejection Notification Form to adjust the bindings. Modify the General section.
      In the Subject field, do the following:

      • Enter Your order
      • Select Order Number from Process Inputs
      • Enter is rejected by the supplier
      Condition

      Since the process would be started through an API, remove the Users Process Stared by and enter your EmailID that was configured for the tenant.

      Rejection Form
    10. Modify Inputs section.

      Inputs
    11. Choose Auto Approval Notification Form to adjust the bindings. Modify the General section.
      In the Subject field, do the following:

      • Enter Your order
      • Select Order Number from Process Inputs
      • Enter has been successfully received
      Condition

      Since the process would be started through an API, remove the Users Process Started by and enter your EmailID that was configured for the tenant.

      Approval Notification
    12. Modify the Inputs section.

      Inputs
    13. Save your project.

  • Step 5
    1. Release the project (button is in the upper right).

      Release

      Select the new released version by clicking Show project version.

      Release
    2. After successful release of the project, click Deploy and deploy the project to the Public environment.

      Deploy

      The Public environment is deprecated and soon you will have to create “shared” or your own environments and set permissions and other configurations.

      On the Triggers dialog, click Deploy again.

      Deploy

      You have successfully released and deployed the process and it is ready to consume via APIs.


Back to top