Disclaimer: The insights shared in this blog are based on my personal observations and learning on a Joule Studio experimental environment. The final version that will be released may provide a different set of capabilities.
Introduction
Finance teams spend valuable time preparing formal demand letters: finding the correct legal recipient, composing language that satisfies local legal requirements, and ensuring consistent formatting. Joule Studio (part of SAP Build) lets you automate these steps using modular Skills and orchestrating Agents — while preserving governance and auditability.
This article walks through a complete pattern: configure secure connectivity to S/4HANA, build the Get Customer Information Skill, then compose the Credit Collection Specialis that generates language-specific legal letters ready for review and sending.
Quick definitions
Joule Skill
A focused, reusable function with defined inputs and outputs. Example: retrieve a customer’s legal name and address from S/4HANA.
Joule Agent
An intelligent orchestrator that invokes Skills, makes decisions, handles user interactions, and produces business outcomes (for example: draft a legal letter, request approval, send the letter, and log the result).
Use case: Legal payment-solicitation letter
Goal: allow a collections specialist to enter a customer number, debt amount and language — and receive a legally formatted demand letter populated with S/4HANA legal data.
Inputs: customer_number, debt_amount, language
Outputs: Draft legal letter (text format).
We will build:
- Skill: CustomerLegalDataFetcher — fetches legal name & address from S/4HANA.
- Agent: PaymentSolicitationAgent — orchestrates retrieval and generates the letter text in the selected language.
Step 0 — Configure secure connectivity (BTP Destination & Action Project)
Before the Skill can call S/4HANA, set up a Destination in BTP and an Action Project in SAP Build to expose the needed API in a governed way.
Create a Destination in SAP BTP Cockpit
- Log in to SAP BTP cockpit → Subaccount → Connectivity → Destinations → New Destination.
- Name: S4HANA_BP. Type: HTTP. URL: your S/4HANA API base (e.g.
https://.../sap/opu/odata/sap/API_BUSINESS_PARTNER). - Proxy Type: Internet (or OnPremise if using Cloud Connector). Select Authentication (OAuth2ClientCredentials or BasicAuth) and provide credentials or client info.
- Optional properties:
sap-client, HTML5.DynamicDestination=true, WebIDEEnabled=true,sap.applicationdevelopment.actions.enabled=treu,sap.processautomation.enabled=true. Save and Check Connection.
Create an Action Project in SAP Build
- Open SAP Build, move to Actions window (selecting it on the left hand side menu) and click on the Create button.
- Go to API Specification and select SAP Business Accelerator Hub. Here you can find the Business Partner (A2X) API specification. Select it and click on Next button. Assign a name to the project: S4HANA_Customer_Actions Connections and provide a description. Click on Create button.
- Select the API calls to be added to the project. For the purpose of this implementation, you can select Retrieves customer general data and Retrieves business partner address data.
- After adding them to the project, the Action editing GUI appears, providing the ability to fine tune the inputs and the outputs of your actions.
- You can test the Actions selecting the name of the destination you created before. After finalizing the Actions, you need to Release and Publish the project.

Result: your Action is published and available to be called from a Joule Skill.
Step 1 — Build the Skill: Credit Collection Letter
A. Create the Skill project
- From the SAP Build Lobby, Create → Joule Skill → Name: Credit Collection Letter.
- Now, from the Joule Studio main page: Create → Joule Skill → Name: Get Customer Information
- Assign a meaningful description, such as: A skill to retrieve Customer information from a S/4HANA system, providing as input the Customer Number.
- Define the input parameter of the skill (CustomerNumber) and the output parameters (CustomerLegalName, streetName, houseNumber, cityName, postalCode and country).
B. Call the Action
- Add two Call Action step → choose S4HANA_Customer_Actions and the customer and address lookup actions.
- Map inputs/outputs between Skill and Action.
- In the End step, map the output of the Action calls to the skill's output parameters.

C. Test the Skill
Before testing the skill, you need to create an environment and to associate the destination to this environment:
- From the SAP Build Lobby, open the Control Tower from the menu on the left hand side.
- Open the Environments page. You can find it in the Tenant Configuration section.
- Click on the Activate Private Environment button.
- Go back to the Control Tower and open the Destinations page. You can find it in the Backend Configuration section.
- Find the destination you defined in the BTP Cockpit, open the Actions menu on the right side and select Associate Environments.
- Now you can associate the destination to the private environment you activated in step #3.
Once the environment has been created, with an associated destination, from the Skill editing page you can test the skill clicking on the Test button. Select your private environment and the destination. The Joule prompting page is displayed and you can send some prompts to test the Skill.

Step 2 — Build the Agent: Credit Collection Specialist
A. Create the Agent
- From the Joule Studio main page: Create → Joule Agent → Name: Credit Collection Specialist
- Add a description, such as: Writer of reminder letters for unpaid debts
- Now in the Agent Builder page, you need to fill the Expertise, the Instructions and the Additional Context text boxes. Tip #1: in the instructions, please specify that the Get Customer Information skill should be used for retrieving the customer's information. Tip #2: Provide an example of the letter you want it writes.
- Chose the LLM model to be used, selecting between the available ones.
- In the Tools section, add the Get Customer Information skill as a tool to be used.
B. Attach Tools
- In the Tools section, add the Get Customer Information skill as a tool to be used.

C. Test and Deploy the Agent
- Save the Agent and click on the Test button. Select your private environment and the destination.
- The Joule prompting page is displayed and you can send some prompts to test the Agent.
- Once the Agent is fully debugged, you can Release and Deploy the project to one of the environments available. If necessary, you can create a new environment from the Control Tower.
Security, governance & integration notes
Use service credentials or OAuth client credentials for the Destination. Limit Destination editing to admins, and ensure Cloud Connector is configured if S/4HANA is on-premise. Maintain a clear change-control process for legal templates — any change must trigger regression tests of the Agent.
Conclusion & call to action
By separating retrieval (Skill) from orchestration (Agent), you make the solution reusable, testable and governable. Users simply provide the customer number, amount and language — Joule handles the rest, identifying the Agent and the Skill to be used: fetch data and generate compliant letter text that can be cut and pasted into a Word document.
And that’s all for today! Now you can continue reading other posts on the SAP Community Blogs: https://community.sap.com/t5/all-sap-community-blogs/ct-p/all-blogs