Building an Invoice Approval Workflow with SAP Build Process Automation
Share

 

A step-by-step guide to collecting invoice data through a form and routing it through a conditional, human-in-the-loop approval flow. 

Introduction 

One of the most common enterprise scenarios is: a document comes in, someone needs to review it, and a decision needs to be made. SAP Build Process Automation (BPA) is purpose-built for exactly this — orchestrating human approvals on top of business data, with no custom UI development required. 

In this post, we’ll build a complete Invoice Approval workflow in BPA. An invoice form is submitted, a condition checks the total amount, and if it crosses a threshold, the invoice is routed to an approver’s My Inbox as a read-only approval form with Approve/Reject actions. Once decided, an email notification is sent automatically. 

Here’s what we’ll cover: 

  • Designing a trigger form for invoice submission 
  • Building the process flow with a conditional branch 
  • Creating a read-only approval form for the reviewer 
  • Mapping data from the trigger form into the approval task 
  • Sending automated email notifications 
  • Configuring a mail destination for outbound email 
  • Testing the complete flow end to end 

Step 1: Create the Trigger Form (InvoiceFormSubmit) 

Every BPA process needs a way to start. Here, we use a Form Trigger — a form that, when submitted, kicks off a new process instance carrying whatever data was entered. 

  1. In your BPA project, add a new Form trigger and name it InvoiceFormSubmit. 
  1. Build out the fields to match your invoice structure: Invoice Number, Invoice Date, Due Date, Supplier, Bill To, Currency, and Purchase Order. 
  1. Add a Products Details table (a repeating list) with Description, Quantity, Unit Price, and Amount columns, so multiple line items can be captured. 
  1. Add Subtotal, Tax Amount, and Total Amount fields, followed by a Contact Details section (Name and Email) so we know who submitted the invoice and who should be notified later. 

RanjeetKr_0-1788194063272.png

 

 

The InvoiceFormSubmit trigger form being built in the Forms editor — Invoice Details section. 

RanjeetKr_1-1788194063273.png

 

 

The remainder of the form — Products Details, totals, and Contact Details, with the Submit button that triggers the process. 

With the form saved, this becomes the entry point for the entire process — every field here becomes a process variable we can use downstream. 

Step 2: Build the Process Flow 

With the trigger in place, switch to the process editor and lay out the flow logic. 

  1. Drag in a Condition step right after the trigger. 
  1. Add a branch condition: Total Amount is greater than 4000. This becomes the “If” path; everything else falls to “Default.” 
  1. On the If path, add a User Task (the approval form) with two outcomes — Approve and Reject. 
  1. On the Default path (amount 4000 or below), add a Send Mail step for auto-approval, so low-value invoices skip manual review entirely. 
  1. After the approval task, branch again on the outcome: Approve goes to a Send Mail (approval) step, Reject goes to a Send Rejection Mail step. Both paths converge to the End event. 

RanjeetKr_2-1788194063274.png

 

 

The full deployed process: InvoiceFormSubmit trigger → Condition → ApprovalForm (with Approve/Reject branches) → email notifications → End. 

RanjeetKr_3-1788194063275.png

 

 

Configuring the branch condition — routing only invoices with Total Amount greater than 4000 to manual approval. 

Step 3: Configure the Approval Form 

The approval task is what actually shows up in the approver’s My Inbox. It needs a Task Details section (subject, priority) and a Recipients section (who gets the task). 

  1. Open the ApprovalForm task and set the Subject to something dynamic, like “Invoice Approval for {Invoice Number}”, so each task is identifiable at a glance. 
  1. Under Recipients, add the approver’s email address (or a group) — this determines whose inbox the task lands in. 
  1. Set the Due Date type to Reference Date and bind it to the invoice’s Due Date field. 

RanjeetKr_4-1788194063276.png

 

 

ApprovalForm task configuration — subject, recipients, and due date settings. 

Next, build the form UI itself. Rather than designing it from scratch, base it on the same layout as InvoiceFormSubmit, but make every field read-only — the approver should see the invoice clearly without being able to edit it. 

  1. Bind each field on the approval form to the corresponding output from InvoiceFormSubmit: Invoice Number, Invoice Date, Due Date, Supplier, Bill To, Currency, Purchase Order, and the Products Details list. 
  1. Bind Subtotal, Tax Amount, Total Amount, Name, and Email in the same way. 

RanjeetKr_5-1788194063277.png

 

 

Mapping InvoiceFormSubmit output fields into the ApprovalForm’s inputs. 

RanjeetKr_6-1788194063278.png

 

 

Continuing the input mapping — Products Details bound as a list, plus Purchase Order, Subtotal, and Tax Amount. 

This mapping is what lets the approver see the exact invoice that was submitted, without any manual re-entry. 

Step 4: Configure the Approval Email 

Once a decision is made, the requester (or a stakeholder) should be notified automatically. 

  1. Add a Send Mail step on the Approve branch. 
  1. Set the To field by binding it to the Email field captured on the original form. 
  1. Set a dynamic Subject, such as “Invoice approval for Invoice No. {Invoice Number}”. 
  1. In the Mail Body, greet the requester by name and include the key invoice details — Invoice Number, Supplier, Total Amount, and Currency — followed by a confirmation line. 

RanjeetKr_7-1788194063279.png

 

 

Building the approval email — binding process variables directly into the mail body. 

The same pattern applies to the Send Rejection Mail step on the Reject branch, just with different messaging. 

Step 5: Set Up the Mail Destination 

For BPA to actually send emails, it needs an outbound mail server configured as a Destination in your BTP subaccount — this is what BPA uses as the sender. 

Reference SAP Help Portal: Configure an SMTP Mail Destination-    
https://help.sap.com/docs/intelligent-robotic-process-automation/factory-user-guide/configure-smtp-mail-destination 

  1. In your BTP Cockpit, go to Connectivity > Destinations and create a new destination named sap_process_automation_mail (BPA looks for this name specifically). 
  1. Set Type to MAIL, Proxy Type to Internet, and Authentication to Basic Authentication with your mail account’s credentials. 

RanjeetKr_8-1788194063280.png

 

 

The mail destination’s main properties and authentication. 

  1. Add the required additional properties for an SMTP mail server: transport protocol, SMTP host and port, the from address, and the relevant TLS/SSL flags. 

RanjeetKr_9-1788194063282.png

 

 

Additional SMTP properties on the mail destination — host, port, TLS settings, and sender address. 

Once saved, this destination becomes the sender identity for every Send Mail step in the process. 

Step 6: Deploy and Test the Full Flow 

With everything wired up, it’s time to release and deploy the project, then run it end to end. 

  1. Release and deploy the project. Copy the Form Link for InvoiceFormSubmit — this is the URL used to submit a new invoice. 
  1. Open the link and fill in a sample invoice — line items, totals, and a contact email — then hit Submit. 

RanjeetKr_10-1788194063284.png

 

 

Submitting a sample invoice through the InvoiceFormSubmit form. 

  1. Since the Total Amount exceeds 4000, the process routes to manual approval. Log in to My Inbox — the task appears with the invoice details already populated. 

RanjeetKr_11-1788194063285.png

 

 

The approval task in My Inbox, showing the read-only invoice details and Approve / Reject buttons. 

  1. Click Approve. The process resumes down the Approve branch and fires the Send Mail step. 
  1. Check the recipient’s inbox — the approval email arrives with the invoice summary. 

RanjeetKr_12-1788194063287.png

 The approval email received in Gmail, confirming the invoice was approved. 

Wrapping Up 

🎉 That completes a full invoice approval workflow in SAP Build Process Automation — from form submission, through conditional routing and human approval, to automated email notification. 

What I found useful in this POC was how easily the individual BPA components fit together. The form collects the data, the condition applies the business rule, the approval form handles the human decision, and the email step communicates the result. Even though the example uses a simple invoice threshold, the same pattern can be extended to many other approval scenarios. 

In the next post, we’ll look at combining this same approval pattern with SAP Document Information Extraction, so invoice data doesn’t need to be entered manually at all — it gets extracted directly from an uploaded PDF. 

 

  Read More Technology Blog Posts by Members articles 

#abap

By ali

Leave a Reply