Make use of Generative AI to accelerate development in SAP Build Process Automation

Estimated read time 16 min read

SAP Build Process Automation is SAP’s centralized development environment for intelligent automation and process extensibility. It has already been implemented by hundreds of customers to increase overall process efficiency and free employees from mundane and repetitive tasks.

A key driver of its success is the ease of use of the development environment and the low entry barrier for different stakeholders who want to participate in process development projects. This is largely due to an intuitive graphical layout designer, a simplified commercial model that allows you to start small and fast, and pre-built automation content available on the SAP Business Accelerator Hub.

Now, process automation becomes even simpler with the native integration of generative AI within the SAP Build Process Automation environment.

You can use generative AI in SAP Build Process Automation to generate business processes, decisions, forms, and script tasks. The goal of this blog post is to guide you on your journey to explore this feature and share some best practices.

 

System setup

To use the generative AI features, you must first enable generative AI at the tenant level and accept the terms and conditions, by navigating to the Tenant Configuration within the Control Tower:

 

 

Once enabled, the Generate function will become available after approximately 5 minutes, both in the Overview screen of the project and within the process editor:

 

 

Use-Case

In the next section, we’ll explore the key capabilities of SAP Build Process Automation that leverage Generative AI. To provide meaningful context, we’ll walk through a real-world scenario: imagine you’re a senior automation developer aiming to create new process artifacts – such as Business Rules, Conditions, Process Flows, and Approval Steps. Your goal is to use natural language prompts to generate these components efficiently. We’ll demonstrate how Generative AI can accelerate this process and show you how to craft effective prompts to get the results you want. Below are some practical examples for following artifacts:

 

Generate a Data TypeGenerate a ProcessGenerate a FormGenerate a DecisionGenerate a ScriptSummarize the Process

 

Generate a Data Type

We begin our automation journey by defining a Data Type. This is a crucial step, as it later enables us to handle input and output values in Conditions and Business Rules. To get started, navigate to the process overview page of your project and click on Generate:

 

 

Next, select Data Type and enter your prompt. Below are two example prompts you can use and refine as needed:

“Generate a data type to handle Purchasing Organizations. This data type should contain a single field named purchasingOrganizations, represented as a string.”

“Generate a data type to handle Approvers. This data type should include two fields: approversEmail and approversName, both represented as strings.”

These prompts can be adjusted iteratively to match your specific needs. As a result you now have two different Data Types which you can use as input and output values for your process steps:

 

 

Generate a Process

The next step is to generate a process flow that brings together multiple artifacts – such as Data Types, Decisions, Conditions, Forms, and more. As in the previous step, navigate to the overview page of your project and select Process. Here, you can enter a prompt to define your process logic. Below is an example you can use as a starting point:

“Generate a new process. Begin with a business rule to determine the approver. Then, add a condition to handle cost thresholds: if the cost exceeds 2,000 euros, trigger an approval step; if the cost is below 2,000 euros, trigger an action project to post the purchase requisition to SAP S/4HANA.”

Feel free to iterate on this prompt or expand it to fit your specific process requirements.
As a result, you now have a generated process that already includes several key artifacts. From here, you can begin refining the process further or add additional components—such as user tasks, forms, notifications, or integrations – as needed to align it with your business logic and automation goals:

 

 

Generate a Form

We’ve noticed that the current process is missing a trigger—a key component to initiate the workflow. Fortunately, we can use Generative AI to create this for us. In this context, Generative AI can help generate various types of forms, including trigger forms, notification forms, and approval forms.

There’s no need to return to the overview page—you can stay within the Process Builder. Simply click on the Generate button and enter your prompt. Here’s an example:

“Add a trigger form to start the process. In this form, the user should enter product information, quantity, and price.”

This form will serve as the entry point for the process, capturing the necessary input to drive subsequent steps.

 

 

Sometimes, the generated form may appear in an unexpected location within the process flow. Don’t worry—this is easy to fix. Simply delete the form from its current position in the flow.

To correctly assign it as the trigger:

Click on Add Trigger

Select Forms

Choose the newly created form from the list

This will properly link the form as the starting point of your process, as you can see here:

 

 

As a post processing step I change the input text for the line-items with a table list to enter multiple values.

 

Generate a Decision

Next, we’ll incorporate a Decision into the automation flow. Decisions can be used for anything, but in our scenario, we’ll use a decision table to determine the appropriate approver based on the purchasing group.

To add a Decision:

Click the plus (+) button at the point in the flow where you want to insert the artifact.

Select Decision.

Configure the decision by defining proper input and output values.

You can select from the Data Types we previously created to ensure your decision logic is well-integrated and functional:

 

 

To define the logic for your Decision, go to the Rules tab and click on Generate to enter your prompt. This is where you can use Generative AI to quickly create a decision table. Here’s an example prompt you can use:

“Create a decision table rule named ‘Approver Determination’ to assign approvers based on the purchasing organization. If the purchasing organization is 1710, the purchase requisition must be approved by Admin Manager 1 (manager1@sap.com). If the purchasing organization is 1720, it must be approved by Admin Manager 2 (manager2@sap.com).”

This rule will automatically evaluate input from the process and route it to the correct approver accordingly. Here you can see the final result:

 

 

Generate a Script

SAP Build Process Automation also supports the use of custom scripts within a process flow. These scripts are particularly useful for tasks such as data validation, calculations, or entity mapping. In this example, we’ll use a custom script to calculate the total price from an input table.

To do this:

Click the plus (+) button at the point in the process where you want the script to run.

Select Script from the available options.

Click Generate and enter the following prompt:

“Add a custom script to sum all prices from the table list and calculate a total price.”

This will generate a script step that performs the calculation and makes the result available for downstream steps in the process.

 

Once it is finished I can either accept or reject the proposed script. I can also amend the script which is necessary in some cases:

 

 

Summarize the process

In addition to the artifacts generated by the new GenAI feature, I’ve further refined the process—mapping the input and output values, and making additional adjustments to align with my specific requirements. As a result, we now have a completed and deployable process automation, ready to be made available to business users:

 

 

To ensure proper documentation for stakeholders like process owners, you can easily generate a summary of your entire process flow. Simply click the Generate button within the Process Builder, then select Explain this process. This will provide a clear, detailed overview of your process, making it easier for others to understand and review:

 

 

This will generate a detailed written documentation that you can easily share or upload to internal platforms such as your Wiki, or tools like Signavio or LeanIX. This ensures that the process is well-documented and accessible to all relevant stakeholders.

 

 

 

Some Tips and Tricks

When crafting a prompt, it’s important to be as precise as possible. Always use the verbs “Generate” or “Add”, and reference the specific SAP Build Process Automation artifact names. Your prompt description should be between 5 and 1,000 characters in length.

If you’re not satisfied with the result, you can either delete the artifact and generate a new one, or use the graphical layout designer to modify the artifact as needed. Additionally, beyond process steps, you can define process variables such as inputs, outputs, and custom variables to further refine your process.

If you run the generation to update an existing process, the following restrictions apply:

The process variables (input, output, custom) are not updated or removed.Object-type inputs that refer to a data type are not supported.

Also make sure that you get familiar with all the known limitations on this feature, which are documented in our Help-Portal.

 

Happy hacking!

 

 

 

​ SAP Build Process Automation is SAP’s centralized development environment for intelligent automation and process extensibility. It has already been implemented by hundreds of customers to increase overall process efficiency and free employees from mundane and repetitive tasks.A key driver of its success is the ease of use of the development environment and the low entry barrier for different stakeholders who want to participate in process development projects. This is largely due to an intuitive graphical layout designer, a simplified commercial model that allows you to start small and fast, and pre-built automation content available on the SAP Business Accelerator Hub.Now, process automation becomes even simpler with the native integration of generative AI within the SAP Build Process Automation environment.You can use generative AI in SAP Build Process Automation to generate business processes, decisions, forms, and script tasks. The goal of this blog post is to guide you on your journey to explore this feature and share some best practices. System setupTo use the generative AI features, you must first enable generative AI at the tenant level and accept the terms and conditions, by navigating to the Tenant Configuration within the Control Tower:  Once enabled, the Generate function will become available after approximately 5 minutes, both in the Overview screen of the project and within the process editor:  Use-CaseIn the next section, we’ll explore the key capabilities of SAP Build Process Automation that leverage Generative AI. To provide meaningful context, we’ll walk through a real-world scenario: imagine you’re a senior automation developer aiming to create new process artifacts – such as Business Rules, Conditions, Process Flows, and Approval Steps. Your goal is to use natural language prompts to generate these components efficiently. We’ll demonstrate how Generative AI can accelerate this process and show you how to craft effective prompts to get the results you want. Below are some practical examples for following artifacts: Generate a Data TypeGenerate a ProcessGenerate a FormGenerate a DecisionGenerate a ScriptSummarize the Process Generate a Data TypeWe begin our automation journey by defining a Data Type. This is a crucial step, as it later enables us to handle input and output values in Conditions and Business Rules. To get started, navigate to the process overview page of your project and click on Generate:  Next, select Data Type and enter your prompt. Below are two example prompts you can use and refine as needed:”Generate a data type to handle Purchasing Organizations. This data type should contain a single field named purchasingOrganizations, represented as a string.””Generate a data type to handle Approvers. This data type should include two fields: approversEmail and approversName, both represented as strings.”These prompts can be adjusted iteratively to match your specific needs. As a result you now have two different Data Types which you can use as input and output values for your process steps:  Generate a ProcessThe next step is to generate a process flow that brings together multiple artifacts – such as Data Types, Decisions, Conditions, Forms, and more. As in the previous step, navigate to the overview page of your project and select Process. Here, you can enter a prompt to define your process logic. Below is an example you can use as a starting point:”Generate a new process. Begin with a business rule to determine the approver. Then, add a condition to handle cost thresholds: if the cost exceeds 2,000 euros, trigger an approval step; if the cost is below 2,000 euros, trigger an action project to post the purchase requisition to SAP S/4HANA.”Feel free to iterate on this prompt or expand it to fit your specific process requirements.As a result, you now have a generated process that already includes several key artifacts. From here, you can begin refining the process further or add additional components—such as user tasks, forms, notifications, or integrations – as needed to align it with your business logic and automation goals:  Generate a FormWe’ve noticed that the current process is missing a trigger—a key component to initiate the workflow. Fortunately, we can use Generative AI to create this for us. In this context, Generative AI can help generate various types of forms, including trigger forms, notification forms, and approval forms.There’s no need to return to the overview page—you can stay within the Process Builder. Simply click on the Generate button and enter your prompt. Here’s an example:”Add a trigger form to start the process. In this form, the user should enter product information, quantity, and price.”This form will serve as the entry point for the process, capturing the necessary input to drive subsequent steps.  Sometimes, the generated form may appear in an unexpected location within the process flow. Don’t worry—this is easy to fix. Simply delete the form from its current position in the flow.To correctly assign it as the trigger:Click on Add TriggerSelect FormsChoose the newly created form from the listThis will properly link the form as the starting point of your process, as you can see here:  As a post processing step I change the input text for the line-items with a table list to enter multiple values. Generate a DecisionNext, we’ll incorporate a Decision into the automation flow. Decisions can be used for anything, but in our scenario, we’ll use a decision table to determine the appropriate approver based on the purchasing group.To add a Decision:Click the plus (+) button at the point in the flow where you want to insert the artifact.Select Decision.Configure the decision by defining proper input and output values.You can select from the Data Types we previously created to ensure your decision logic is well-integrated and functional:  To define the logic for your Decision, go to the Rules tab and click on Generate to enter your prompt. This is where you can use Generative AI to quickly create a decision table. Here’s an example prompt you can use:”Create a decision table rule named ‘Approver Determination’ to assign approvers based on the purchasing organization. If the purchasing organization is 1710, the purchase requisition must be approved by Admin Manager 1 (manager1@sap.com). If the purchasing organization is 1720, it must be approved by Admin Manager 2 (manager2@sap.com).”This rule will automatically evaluate input from the process and route it to the correct approver accordingly. Here you can see the final result:  Generate a ScriptSAP Build Process Automation also supports the use of custom scripts within a process flow. These scripts are particularly useful for tasks such as data validation, calculations, or entity mapping. In this example, we’ll use a custom script to calculate the total price from an input table.To do this:Click the plus (+) button at the point in the process where you want the script to run.Select Script from the available options.Click Generate and enter the following prompt:”Add a custom script to sum all prices from the table list and calculate a total price.”This will generate a script step that performs the calculation and makes the result available for downstream steps in the process. Once it is finished I can either accept or reject the proposed script. I can also amend the script which is necessary in some cases:  Summarize the processIn addition to the artifacts generated by the new GenAI feature, I’ve further refined the process—mapping the input and output values, and making additional adjustments to align with my specific requirements. As a result, we now have a completed and deployable process automation, ready to be made available to business users:  To ensure proper documentation for stakeholders like process owners, you can easily generate a summary of your entire process flow. Simply click the Generate button within the Process Builder, then select Explain this process. This will provide a clear, detailed overview of your process, making it easier for others to understand and review:  This will generate a detailed written documentation that you can easily share or upload to internal platforms such as your Wiki, or tools like Signavio or LeanIX. This ensures that the process is well-documented and accessible to all relevant stakeholders.   Some Tips and TricksWhen crafting a prompt, it’s important to be as precise as possible. Always use the verbs “Generate” or “Add”, and reference the specific SAP Build Process Automation artifact names. Your prompt description should be between 5 and 1,000 characters in length.If you’re not satisfied with the result, you can either delete the artifact and generate a new one, or use the graphical layout designer to modify the artifact as needed. Additionally, beyond process steps, you can define process variables such as inputs, outputs, and custom variables to further refine your process.If you run the generation to update an existing process, the following restrictions apply:The process variables (input, output, custom) are not updated or removed.Object-type inputs that refer to a data type are not supported.Also make sure that you get familiar with all the known limitations on this feature, which are documented in our Help-Portal. Happy hacking!     Read More Application Development and Automation Blog Posts articles 

#SAP

You May Also Like

More From Author