AI chatbotSAP S/4HANA Agent view

How to add an AI chatbot to SAP S/4HANA

Short answer

Add a chatbot by putting a retrieval and tool layer between a language model and S/4HANA's released OData services, then embedding the chat in a Fiori launchpad, a portal or a messaging channel. Ground answers in live data and approved documents, show sources, and keep it read-only for customers.

A chatbot on S/4HANA serves two audiences. Internal users want quick answers: where is this order, what is the standard cost, who approved this PO. External users, such as customers and suppliers, want status and documents without calling someone. Both audiences ask the same questions repeatedly, and the answers sit in a handful of SAP objects.

The chatbot should not be a generic model with a company logo. It needs two grounding sources: live data through tools (orders, deliveries, stock) and a document index (quality manuals, work instructions, supplier requirements, return policies). Without grounding it will invent order dates, which is worse than having no chatbot.

Placement matters as well. In S/4HANA the natural homes are the Fiori launchpad for employees and a customer portal or website for outsiders. Many shop-floor users prefer to ask from a tablet or a messaging app.

What teams use it for

Customer order status portal

Customers sign in, ask about an order or delivery, and the bot reads sales order, delivery and billing status, then shows shipping documents it is allowed to expose.

Internal 'where is my PO' assistant

Employees ask about their requisitions and POs by number or description and see approval stage, expected delivery and the person holding the approval.

Policy and procedure answers

A document index of work instructions, travel and procurement policies lets employees ask how a process works, with citations to the source document.

Supplier self-service

Suppliers ask which POs are open and what dates are expected, and can post confirmations that land as requests for the buyer to approve.

Fiori how-to helper

New users ask how to complete tasks such as creating a goods receipt, and the bot points to the right app and the steps for your configuration.

SAP S/4HANA integration surface

  • Released OData services for orders, deliveries, billing documents, business partners and products. Check your release's API catalog for the exact services and versions.
  • SAP Fiori launchpad and the UI5 framework for embedding a chat panel, or a plugin approach in the shell. Details vary by edition and release.
  • Document sources: attachment service (GOS and the newer attachment APIs, hedge by release), SAP Document Management, or file shares and SharePoint where manuals actually live.
  • Identity: SAP Identity Authentication Service or your IdP via SAML or OIDC, so the chatbot can pass the user's identity to SAP and apply their authorizations.
  • Optional SAP BTP services, such as SAP Build or the Generative AI Hub, if you prefer a managed route. A self-hosted model works without them.

How it works

  1. 1

    Choose the audience and scope

    Internal employees and external customers have different risk profiles. Start with one, a handful of intents, and an explicit list of what the bot will not answer.

  2. 2

    Build the tool layer

    Create tools for order status, delivery tracking and PO status over released OData. Return small, labeled results. For customers, filter by the signed-in business partner.

  3. 3

    Index documents

    Chunk and embed approved documents with metadata (document type, plant, effective date, owner). Re-index on change and drop superseded versions.

  4. 4

    Add the model and prompts

    Use an open-weight model on your own hardware or a cloud model per policy. The prompt should demand sources, forbid guessing and route unknown questions to a human.

  5. 5

    Embed the chat

    Add it to the Fiori launchpad for staff, the customer portal for outsiders, or a messaging channel. Pass the authenticated identity through to the tool layer.

  6. 6

    Review conversations

    Sample logs weekly, track unanswered questions and escalations, and use them to add tools or fix documents.

Example flows

Customer asks about a delayed order

Trigger: A customer types 'where is order 4500012345' in the portal chat.

  1. The bot confirms the order belongs to the signed-in business partner.
  2. It reads sales order, delivery and carrier status through tools.
  3. It states current status and the latest confirmed ship date, citing the data source.
  4. If the date slipped, it offers to notify the account manager.

Result: A fast, accurate answer, with a human involved only for exceptions.

Employee asks about a procurement rule

Trigger: A buyer asks whether a sole-source purchase needs extra approval.

  1. The bot searches the procurement policy index filtered to the buyer's company code.
  2. It retrieves the relevant clause and effective date.
  3. It answers with a short summary and a link to the policy.

Result: The buyer gets the rule with its source and avoids a ticket to the procurement team.

Keeping data on-prem

A fully on-prem chatbot is straightforward: an open-weight model on local GPUs, a vector index for documents on local storage, a tool service calling the Gateway, and the chat UI served from your launchpad or portal. For customer-facing use, put the chat service in a DMZ with the model and index behind it, and have the DMZ service call SAP through a narrow, read-only interface. This pattern suits defense and aerospace suppliers who must not send order or drawing data to a hosted model, and it also avoids per-token costs for high-volume status questions.

Security checklist

  • Pass the authenticated user identity to the tool layer and filter every result by that user's scope. Never trust the prompt to enforce it.
  • For customers, restrict tools to their own business partner's documents and use short-lived sessions.
  • Keep the bot read-only at the start. Any action, such as a return request, should create a request for staff review.
  • Index only approved, current documents, and honor access labels on them.
  • Log questions, answers, sources and escalations, and set a retention period that fits your privacy policy.

Ways to get it done

SAP's own assistant and BTP services

Effort: Configuration plus licensing review.

Good for shipped scenarios and customers already invested in BTP.

Build on an open-source stack

Effort: One to three months to reach a reliable internal pilot.

Good when your team can run retrieval and a model, and wants full control.

Work with a partner such as Netray

Effort: Weeks for an internal pilot, longer for customer-facing use.

Good when you want an on-prem chatbot grounded in S/4HANA data without building the stack.

Pitfalls

  • !Launching without grounding, so the bot guesses dates and prices.
  • !Letting customers query by order number alone without checking ownership.
  • !Indexing every shared drive. Old, conflicting documents produce confident wrong answers.
  • !No escalation path. Users need a way to reach a person from the chat.
  • !Measuring only usage. Track resolution rate and wrong-answer reports instead.

Frequently asked questions

Can the chatbot run inside the Fiori launchpad?

Generally yes, by adding a UI5 component or a shell plugin that opens a chat panel. The exact method depends on your release and whether you run on-prem or cloud. Check your Fiori and UI5 versions before choosing an approach.

How do we stop it from making up order dates?

Require it to answer from tool results, cite the source and say when data is missing. Test with questions where the data is absent. Do not let it answer status questions from memory or from documents alone.

Can customers use it safely?

Yes, with sign-in, per-customer filtering in the tool layer, read-only tools and logging. Keep the scope narrow, such as status and documents, and give an easy path to a human for anything else.

Do we need a vector database?

For document questions you need some retrieval index, which can be a vector store or a search engine with hybrid search. For pure data lookups through OData, you do not need one. Many bots use both.

Can it run without internet access?

Yes. With a local model, a local index and the tool layer inside your network, nothing needs to leave. This is common for plants with strict data policies. Plan GPU capacity for peak concurrency.

Want AI chatbot working on your SAP S/4HANA?

A free 30 minute assessment: we map the integration path for your version and setup, and where it should run.

Get a free assessment