Configuring SAP Joule on BDC: Skill Definition, Knowledge Context and Question Scope — AutoFrance SA, Part 4
Configuring SAP Joule on BDC: Skill Definition, Knowledge Context and Question Scope — AutoFrance SA, Part 4

Configuring SAP Joule on BDC: Skill Definition, Knowledge Context and Question Scope

Part 4 of 7 — Joule on SAP Business Data Cloud: An End-to-End Project at AutoFrance SA


The semantic layer is complete. The common assumption at this point is that Joule automatically knows about it. It does not. You configure the connection explicitly through three components: a skill definition, a knowledge context, and a question scope. Getting all three right is the difference between a Joule that answers correctly and one that hedges every response.


How Joule on BDC Works

Joule uses RAG — Retrieval Augmented Generation. When a user asks a question:

  1. Joule queries the BDC semantic metadata catalogue for datasets, measures, and descriptions semantically similar to the question
  2. It builds a query context from the retrieved metadata — this is where your column descriptions from Part 3 matter
  3. It generates a SQL query against the relevant analytical dataset
  4. It executes the query and formats the result as natural language

Step 2 is why annotation quality matters. “FCF_ESTIMATE_EUR — Amount” gives Joule almost nothing. “Estimated free cash flow: AR collected minus AP paid. Management estimate for working capital monitoring.” gives Joule enough to match questions about “cash,” “working capital,” “how much cash did we generate,” and “FCF.”

The knowledge context supplements what the annotations cannot carry: what plants exist, what plant codes map to which cities, what “working capital pressure” means specifically for AutoFrance SA.


Accessing Joule Configuration

In BDC Cockpit:

AI Services → SAP Joule → Configuration → Skill Management

If the AI Services tile is not visible, the Joule for Business Data Cloud entitlement needs activating. At AutoFrance SA we also needed a specific role assignment — BDC_JOULE_CONFIG — separate from the standard BDC_ADMIN role.


Step 1: Skill Definition

Click Create Skill and fill in:

Skill Name: AutoFrance Finance Working Capital

Skill ID: autofrance-wc-finance

Description (visible to users):
“Ask questions about AutoFrance SA’s free cash flow, accounts payable, accounts receivable, and inventory position across the four manufacturing plants. Data covers the last 24 months from S/4HANA, SAP Ariba, and Databricks. Use plant names NORD, SUD, EST, or IDF to filter by location.”

Business Domain: Finance

Language: French, English

Default Response Language: Match user language

Write the user-facing description as if explaining to someone who has never seen a database. The plant controllers know what “working capital” means — they do not know what LIFNR means. Tell them which plant identifiers to use because without that they will ask about “Valenciennes” and Joule will not find it.


Step 2: Knowledge Context

Paste this directly into the Knowledge Context field. 4,200 characters, within the BDC limit.

COMPANY: AutoFrance SA
French automotive parts manufacturer, Paris headquarters.
Annual revenue approximately EUR 8.2 billion. Four manufacturing plants.

PLANTS AND LOCATIONS:
- NORD: Valenciennes, northern France. Powertrain assembly.
- SUD: Bordeaux, southwest France. Chassis and suspension.
- EST: Strasbourg, eastern France. Electrical systems.
- IDF: Poissy, Île-de-France. Body panels and exterior finishing.

DATA SOURCES:
Financial data: SAP S/4HANA, company code FR01, fiscal year = calendar year.
Procurement: SAP Ariba, supplier contracts and purchase orders.
Inventory and demand forecasts: Databricks, updated monthly.
All data unified in SAP Datasphere space AUTOFRANCE_FINANCE.

FISCAL PERIODS:
Periods are in YYYYMM format. Current fiscal year ends December 31.
Q1 = 202401-202403, Q2 = 202404-202406, Q3 = 202407-202409, Q4 = 202410-202412.
"This quarter" = the three most recent completed monthly periods.
"This year" = 202401 through the most recent available period.

SUPPLIER CONTEXT:
340 active suppliers. Unified across S/4HANA (LIF-XXXXX codes) and Ariba
(V-XXXXX codes) via a canonical mapping. Always refer to suppliers by
SUPPLIER_NAME, not system codes.

KEY METRIC DEFINITIONS:
- FCF: Cash from AR collections minus AP payments. Working capital management
  metric, not an IFRS cash flow statement.
- DPO: Average days AutoFrance takes to pay suppliers. Higher DPO is better
  for AutoFrance's cash position.
- DSO: Average days customers take to pay AutoFrance. Lower DSO means
  faster cash collection.
- Working capital pressure: DPO decreasing, DSO increasing, or inventory
  investment rising unexpectedly.

IMPORTANT CONSTRAINTS:
- Data covers rolling 24 months only. No data before that window.
- Inventory values are at moving average price, not standard cost.
- FCF figures are management estimates, not audited.
- "Cash flow" without qualification = FCF working capital estimate.
- CRITICAL: Do not extrapolate or forecast future periods. If asked about
  a future period, say forecast data is not available.
- Budget and plan data is NOT in this system. Do not generate budget figures.
- All amounts are in euros (EUR). Foreign currency invoices are converted
  at posting date rate.
- When a user says "my" without specifying a plant, show all plants they
  have access to.

LANGUAGE NOTE:
Users may ask in French.
"flux de trésorerie" = FCF
"délai de paiement fournisseur" = DPO
"délai de recouvrement" = DSO
"fonds de roulement" = working capital
Plant names NORD, SUD, EST, IDF are the same in both languages.

Step 3: Question Scope — Connecting the Datasets

In the Skill configuration, navigate to Data Sources tab.

Data Source 1:

  • Source: SAP Datasphere, Space: AUTOFRANCE_FINANCE
  • Dataset: AN_FCF_PLANT
  • Measures: All enabled
  • Priority: 1

Data Source 2:

  • Dataset: AN_WC_DETAIL
  • Priority: 2 (use for individual supplier AP balance questions)

Data Source 3:

  • Dataset: AN_SUPPLIER
  • Priority: 3

Data Source 4:

  • Dataset: AN_SUPPLIER_AP_DETAIL
  • Priority: 2 for any question containing “supplier” or “vendor”

Priority controls which dataset Joule queries first when a question could come from more than one dataset. A question about “AP balance at plant NORD” could come from AN_FCF_PLANT (plant-level total) or AN_WC_DETAIL (supplier-level breakdown). Priority 1 sends Joule to AN_FCF_PLANT first. If the user asks “which supplier has the highest AP at NORD,” the word “supplier” triggers AN_WC_DETAIL or AN_SUPPLIER_AP_DETAIL.


Step 4: Row-Level Access Controls

In the Datasphere space:

Space Settings → Data Access Controls → Create Data Access Control

Name: PLANT_FILTER
Column: PLANT_CODE on all analytical datasets

User assignments:

  • Plant controller NORD → PLANT_CODE = ‘NORD’ only
  • Plant controller SUD → PLANT_CODE = ‘SUD’ only
  • Plant controller EST → PLANT_CODE = ‘EST’ only
  • Plant controller IDF → PLANT_CODE = ‘IDF’ only
  • CFO and finance team → all four plants
  • Treasury → all four plants, but routed to AN_FCF_PLANT_TREASURY (a restricted view without inventory columns)

When the NORD plant controller asks “show me FCF for all plants,” Joule returns only NORD data and responds: “I can show you the FCF for the Valenciennes plant (NORD). You do not have access to data for other plants.” That is the expected behaviour — the DAC is working.


Step 5: Configuration Validation

Before enabling for real users, run these 5 questions with a full-access test account:

  1. “What was the FCF at plant NORD last month?” → single number, correct plant
  2. “Show me AP outstanding across all plants.” → four rows
  3. “Which supplier has the highest outstanding balance?” → supplier name from detail dataset
  4. “What is DPO at plant SUD this quarter?” → quarterly average DPO
  5. “Quel est le flux de trésorerie du site IDF?” → French question, correct answer

All five should return numbers. If a question returns nothing, check dataset priority. If a French question fails, check the language setting in the skill definition.


Step 6: Activate and Assign

Toggle Status from Draft to Active.

In the User Assignment tab: select user group AUTOFRANCE_FINANCE_USERS.

Users see the skill in their Joule interface within 15 minutes (skill propagation refresh cycle).

We did not enable the skill for the full BDC tenant — only the finance user group. This prevents IT, data engineering, and other teams from asking finance questions the skill is not designed to handle.


Two Configuration Decisions Worth Explaining

Pre-approved question list vs free-form: The plant controllers initially wanted a curated list of clickable questions. We pushed back. Curated lists go stale, require maintenance, and defeat the purpose of a natural language interface. We invested in accurate annotations and a thorough knowledge context instead. The 91% accuracy result in Part 5 validated that decision.

Only semantic layer exposed to Joule: We restricted Joule to AN_ datasets only. Never CV_ calculation views. Never RT_ remote tables. The calculation views contain intermediate modelling steps that are technically correct but financially misleading in isolation. The raw BSEG tables require ABAP expertise to interpret. The semantic layer exists to translate accounting data into business metrics. Joule should only ever see the translation.


Related Reading on DataCloudInsights

The complete Building an AI-Powered Finance Assistant with SAP Joule on BDC series:


Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *