---
parser: v2
author_name: Stephan Schluchter
author_profile: https://github.com/SchluchterStephan
auto_validation: true
time: 15
tags: [ tutorial>intermediate, software-product>sap-business-technology-platform, software-product>document-information-extraction, topic>artificial-intelligence, tutorial>free-tier]
primary_tag: software-product>sap-build-process-automation
slug: spa-dox-forms
canonical_url: https://developers.sap.com/tutorials/spa-dox-forms
---

# Create Forms for Invoice Approval Process
<!-- description --> Create the needed approval and notifications forms for the Invoice Approval Process

## Prerequisites
 - Created the [trigger](spa-dox-create-process), the [automation](spa-dox-create-automation) and also the [decision](spa-dox-create-decision) to come to this point in the process

## You will learn
   - How to leverage the result of the Decision in an approval form
   - How to create an approval form
   - How to create forms to notify process participants

## Intro
There are different requirements and business situations when a form is needed in a business process. You have already created a form to start the process. Most often you probably need a form to maintain some input data or to approve or reject a request or even to send out some notifications. The two latter ones are your focus now.

---

### Create new approval form


1. Choose **+** at the connection flow after the decision **Determine Approver** to open the context menu.

    ![New Approval Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/01a.png)

2. Then select **Approval**.
   
    ![New Approval Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/01b.png)

3. Click on **Blank Approval**

    ![New Approval Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/01c.png)

4. Maintain the **Name** **`Invoice Approval Form`** and also the **Description** **`Form to approve the invoice`**. Choose **Create**. The **Identifier** is created automatically.

    ![Maintain approval form name](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/02.png)

5. Choose the three dots on the created form's artifact and select **Open Editor** to do the same. Just ignore the red frames, you will fill them later.

    ![Open Editor](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/03.png)

6. Now you are in the Form's Editor, where you can define the layout and input fields. First add via drag and drop a new **Headline 1** into the canvas.   Provide this headline **`Invoice Approval`**.

    ![Add Headline](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/04.png)

7. Drag and drop a **Paragraph** into the canvas. Insert **`Invoice Details`** in the paragraph.

    ![Add paragraph](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/05.png)

8. Include a **Text** field in your form, change the name to **`Company Name`** and select **Read Only**, as you will display here some information from the process content.

    ![Maintain text field](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/07.png)

9. Add some further input fields to your form. Please ensure you have selected the correct type and also maintain all of them as **Read Only**.

    |  Field Type    | Name
    |  :------------- | :-------------
    |  Text          | **`Invoice Number`**
    |  Number           | **`Gross Amount`**
    |  Text   | **`Employee Name`**

10. You are done with the layout and input fields of the approval form. **Save** your work.

    ![Further input fields](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/08.png)

11. Go back to your process, you will recognize some errors, e.g. inputs are missing. No need to worry, you will provide the required details in the next steps.

    ![Errors](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/09.png)

12. Select the **Invoice Approval Form** and in the **General** tab of the form properties, move to **Subject** and choose **Select Item**.

    ![Select Item](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/10.png)

13. Enter the text **`Please approve the invoice`** and add the process content **Document Number**. You will find this underneath **Invoice Details**. This combines plain text with process-related information and serves as an unique identifier for the end user.

    ![Add process content](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/11.png)

14. In the Decision you have defined the approver of the invoice. The output of the decision has been an email address. Now add from the process content within **`Approver_Output`** the **eMail** in the **Recipients** as **Users**. This means only the selected approver will get this approval in the inbox.

    ![Approval user](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/12.png)

15. Switch to the **Inputs** tab and within **Company Name**, choose **Select Item**. The process content will open again.

    ![Approval Form inputs](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/14.png)

16. Now add the attributes from the process content to the related input fields.

    > You can only assign fields with the same type, e.g. text in the process content to text input field.
     If you cannot assign, e.g. Invoice Number from the process content to the Invoice Number in the input field, the type of the input field might be wrong. If so, please correct your form.

    |  Process Content    | Input Field
    |  :------------- | :-------------
    |  Employee Name          | Employee Name
    |  Sender Name           | Company Name
    |  Gross Amount    | Gross Amount
    |  Document Number          | Invoice Number

17. As this mapping of process content and forms is quite important to ensure a proper flow of the relevant data in your process, please check them again. It should look like this.

    ![Check Approval Form inputs](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/16.png)

18. **Save** your work.


### Create approval notification form


1. Choose the **+** of the control flow for **Approve** coming from the **Invoice Approval Form** you just created. 

    ![New Approval Notification Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/17a.png)
   
2. In the context menu, select **Form**.
   
    ![New Approval Notification Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/17b.png)

3. Click on **Blank Form**.

    ![New Approval Notification Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/17c.png)

4. Maintain the **Name** **`Invoice Approval Notification Form`** and also the **Description** **`Form to notify about the approved invoice`** and choose **Create**. As always, the **Identifier** has been created automatically.

    ![Maintain Notification Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/18.png)

5. In the newly created **Invoice Approval Notification Form**, choose the three dots and select **Open Editor**.

    ![Open Editor](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/19.png)

6. In the form, add a Headline 1 **`Invoice Approval`**, a Paragraph **`Your invoice has been approved.`** and also a Text  **`Invoice Number`** and select here **Read Only**. **Save** your work.

    ![Invoice Approval Notification Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/20.png)

7. Go back to the process, select **Invoice Approval Notification Form** to maintain the information in **General** tab.

    ![Approval Notification General](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/21.png)

8. Maintain **Subject**, choose **Select Item** and type **`Approved Invoice:`** and add the process content **Document Number**.

9.  Select for the **Users** in this case **Process Started By** from the process content.

    ![Approval Notification General Entries](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/22.png)

10. Select **Inputs** tab and assign the **Invoice Number** from the process content here.

    ![Approval Notification Input](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/23.png)

11. **Save** your work.


### Create rejection notification form

With this you completed designing and configuring the approval notification form. You can copy the same form to create another form to send a rejection notification to the requester.

> If copy is not available then create the form in the same way and modify the texts wherever relevant as shown below.

To add the new rejection form, you will use the **Duplicate** feature.

**Duplicate** feature is used to copy artifacts within the Business Process whereas **Copy** feature is used to copy artifacts across the business processes.

1. Click on the **Overview**.

    ![Click Overview](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/Click-Overview.png)

2. In the **Overview** screen, do the following:
    - Find **Invoice Approval Notification Form** under the **Artifacts** section and click on **...**.
    - Choose **Duplicate**.

    ![Duplicate Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/DuplicateForm.png)

3. The duplicate artifact pop-up will appear. Change the name to **`Invoice Reject Notification Form`** and click **Duplicate**.

    ![Invoice Rejection Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/NameInvoiceRejectNotification.png)

4. The **`Invoice Reject Notification Form`** is automatically opened in the form builder.

    The screen shown will be the same as **`Invoice Approval Notification Form`**.

    ![Invoice Rejection Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/DuplicatedForm.png)

5. Change the invoice rejection form in the form builder to reflect the data for rejection case.

6. Change the **Description** to **`Form to notify about the rejected invoice`** and the following fields to:

    | Form Fields | Field Settings with Label
    |  :------------- | :-------------
    | Headline 1 | Invoice Rejection
    | Paragraph  | Your invoice has been rejected


7. Keep the text field **`Invoice Number`** and **Save** your work.

    ![Invoice Reject Notification Form](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/27.png)

8. Go back to the process builder and add the invoice rejection notification form to the process. Choose the **+** of the control flow for **Reject** coming from the **Invoice Approval Form**.

    ![Add Invoice Rejection Notification](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/AddInvoiceRejectionNotificationA.png)

9. Choose **Form**.
    
    ![Add Invoice Rejection Notification](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/AddInvoiceRejectionNotificationB.png)

10. Select **Invoice Reject Notification Form**

    ![Add Invoice Rejection Notification](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/AddInvoiceRejectionNotificationC.png)

11. Select **Invoice Reject Notification Form** to maintain the information in **General** tab.

    ![Reject Notification General](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/28.png)

12. Maintain **Subject**, choose **Select Item** and type **`Rejected Invoice:`** and add the process content **Document Number**.

13. Select for the **Users** in this case **Process Started By** from the process content.

    ![Reject Notification General Entries](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/29.png)

14. Select **Inputs** tab and assign the **Invoice Number** from the process content here.

    ![Reject Notification Input](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/30.png)

15. Your process is ready to be released, deployed and executed. **Save** your work.

    ![Final process](https://raw.githubusercontent.com/sap-tutorials/sap-build-process-automation/main/tutorials/spa-dox-forms/32.png)


---
