# Sage X3 AI Integration On-Prem: A Private Architecture

> Source: https://netray.co/erp-help/private-ai-layer-sage-x3-on-prem-architecture
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

Sage X3 keeps data in SQL Server or Oracle, in a schema named after the X3 folder, and exposes supported access through the Syracuse server using SData REST and published SOAP web services. A private AI layer reads from a replica, answers with a local open-weight model, and writes back only through X3 web services after human approval, so data stays on your servers.

## Kind

advanced

## System

sage

## Erp

Sage X3 (on-prem)

## Module

AI integration / Private architecture

## Query

Sage X3 AI integration without cloud

## Alternate Queries

- how to add AI to Sage X3 on-premises
- Sage X3 private LLM
- Sage X3 SData REST AI assistant
- chat with Sage X3 data on premises

## Applies To

Sage X3 V11 and V12 on-premises with SQL Server or Oracle. Earlier versions can follow the same pattern with SOAP web services only. Verify endpoint and representation names in your folder.

## Steps

### Add a private AI layer to Sage X3 in seven steps

**Items:**

- Identify the X3 folders (production, test, validation) and the modules in scope: sales, purchasing, stock, manufacturing, finance.
- Create a read-only replica of the production folder schema using SQL Server Always On secondary or log shipping, or an Oracle read-only standby, and verify that table volumes and indexes behave under analytic load.
- Build a restricted schema of views over tables such as ITMMASTER, SORDER, STOCK, MFGHEAD and PORDER, exposing only the columns the assistant needs.
- Publish a small set of SData representations or web services for record-level reads, and register a technical user with the least rights that call them.
- Index documents and attachments (item sheets, quality certificates, supplier contracts) and carry the source permissions into index metadata.
- Deploy the model on local GPUs with vLLM or Ollama and a gateway that logs prompts, tool calls, queries and answers.
- Start with read-only questions, then drafts, then approved actions via X3 web services under the approver's identity.

## Sections

### Data access paths in Sage X3

**Body:**

Sage X3 tables live in a database schema named after the X3 folder, and column names carry a numeric suffix such as _0 (for example SOHNUM_0 for the sales order number). Typical tables: ITMMASTER for items, SORDER with SORDERQ and SORDERP for sales orders, STOCK and STOJOU for inventory and movements, MFGHEAD with MFGITM, MFGMAT and MFGOPE for work orders, PORDER for purchase orders, BPCUSTOMER and BPSUPPLIER for business partners. Confirm names in the data dictionary of your folder.

The supported programmatic route is the Syracuse server. It serves SData 2.0 REST endpoints, where a representation such as SORDER wraps the X3 object, and it fronts SOAP web services published from X3 objects and subprograms. Both run under an X3 user, so X3 authorisation applies. Use REST or SOAP for record-level answers that must match the screen, and replica views for bulk questions.

Use the data dictionary and field titles in the prompt context so the model understands that SALFCY means sales site and BPCORD means order-from customer. Plain column names without descriptions are the most common reason an assistant produces plausible but wrong joins.

**Code:**

-- Replica query (schema = X3 folder name, adjust)
SELECT TOP 50 SOHNUM_0, BPCORD_0, SALFCY_0, ORDDAT_0
FROM SEED.SORDER
WHERE SALFCY_0 = 'FR011' AND ORDDAT_0 >= '2026-01-01'
ORDER BY ORDDAT_0 DESC;

GET /sdata/x3/erp/SEED/SORDER?representation=SORDER.$query&count=20&where=(BPCORD eq 'C001')
Authorization: Basic <technical user>
Accept: application/json

### Reference architecture, including air-gapped

**Body:**

Place a read-only replica behind the tool server and keep the production folder untouched by analytic queries. Use CDC or change tracking on the replica source, or a nightly extract, to update the retrieval index. The tool server exposes parameterised queries and a few SData reads as named tools with schemas; the model chooses a tool and fills parameters, and the gateway validates them.

Model serving runs vLLM or Ollama on local GPUs. The gateway holds the audit log: user, question, tool calls, SQL or REST request, row counts and the final answer. Keep the logs in your existing SIEM.

For air-gapped plants, carry weights and container images in on approved media, point the gateway at an internal identity provider, and remove all outbound routes. Syracuse and the X3 runtime already live inside the network, so no part of the design needs the internet.

### Permissions and write-back

**Body:**

X3 authorisation combines user profiles, access codes, function profiles and site or company restrictions. A technical user with wide rights would let the assistant see everything, so avoid it for user-facing answers. Instead, resolve the asking person to their X3 user, and either call SData and web services with an identity that carries their rights, or apply their site and legislation limits as mandatory filters on replica views.

Write-back must use X3 web services, import templates or SData create and update calls, never direct SQL. The assistant drafts the payload (a purchase order line, a stock status change), shows it, and sends it after approval. The approver's X3 identity should be on the transaction so standard traceability holds.

### Sizing and phased rollout

**Body:**

For 50 to 500 named users, plan one or two data center GPUs for a 14B to 32B class model, and more for 70B class or heavy document workloads. Index size scales with documents: tens of thousands of pages fit in tens of gigabytes. These are starting ranges.

Phase 1: read-only Q and A on orders, stock, work orders and receipts with visible queries. Phase 2: drafts, such as customer emails, shortage notes and work order summaries. Phase 3: approved write actions through web services for a narrow set of transactions, with approvers and rollback rules.

### Honest limits

**Body:**

If users only need standard enquiries, X3 reports, Syracuse dashboards and your BI tool may be enough. A language model helps most for cross-module questions and for documents. Heavily customised X3 folders with custom tables need extra data dictionary work.

SData and web service availability depends on version, patch level and how Syracuse was configured, and some modules expose fewer representations than others. Large installations with many folders need clear scoping, and answers involving totals should always come from SQL rather than the model.

## Pitfalls

- Querying the production folder directly with broad rights, which hurts users at month end.
- Ignoring the _0 column suffix and X3 data dictionary, leaving the model to guess meanings.
- Using one wide technical user so site and legislation limits are lost.
- Writing to X3 tables directly instead of through web services or imports.
- Forgetting that attachments and linked documents live outside the database and need their own index.
- Skipping version checks on which SData representations exist in your folder.

## Ai Angle

ERPray connects to ERPs in read-only mode with query transparency and role awareness, and can run on-prem. For Sage X3 estates, Netray builds the replica views, tool server and approval workflow with your X3 partner, using the same Syracuse interfaces your integrations already rely on.

## Faq

### Does Sage X3 expose an API I can use for AI?

**Answer:** Yes. The Syracuse server provides SData REST representations and SOAP web services that run under an X3 user. For bulk questions, a read-only database replica is faster and kinder to production. Check what your version and folder publish.

### Can the model write SQL against X3?

**Answer:** It should not run free-form SQL on production. Give it fixed, parameterised tools over a replica schema with row limits, and validate parameters in the gateway.

### How are X3 permissions respected?

**Answer:** Resolve the asker to an X3 user and use their rights via SData or web services, or apply their site and legislation filters to replica views. Avoid one broad technical user for user-facing answers.

### Is this possible with Oracle as the X3 database?

**Answer:** Yes. Use an Oracle read-only standby or replication for the replica and the same view and tool pattern. Licensing for features such as Active Data Guard should be checked with your Oracle contact.

## Search terms

Sage X3 AI integration, Sage X3 on-premises AI, Sage X3 private LLM, Sage X3 SData AI, Sage X3 web services AI assistant, chat with Sage X3 data, Sage X3 air-gapped AI, Sage X3 Syracuse REST AI

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
