# How to Add a Private AI Layer to PeopleSoft On-Prem

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

## Short answer

Reach PeopleSoft through its own mechanisms: PS Query exposed through Query Access Services, Integration Broker service operations, and Component Interfaces for writes. For bulk reads use a replica with the security join tables applied. Add a local retrieval index over file attachments and an open-weight model on your own GPUs, and keep row security equal to what the user sees in the application.

## Kind

advanced

## System

on-prem-apps

## Erp

Oracle PeopleSoft (FSCM and HCM)

## Module

Private AI layer / Integration Broker and Query

## Query

how to add AI to PeopleSoft on-prem

## Alternate Queries

- PeopleSoft AI integration without cloud
- PeopleSoft LLM using Integration Broker or PS Query
- PeopleSoft chatbot on-premises row level security

## Applies To

PeopleSoft FSCM 9.2 (Purchasing, Payables, General Ledger, Inventory) and HCM 9.2 on PeopleTools 8.5x to 8.6x, on Oracle, SQL Server or DB2; Image releases change menu paths, not the mechanism

## Steps

### Build order for a PeopleSoft private AI layer

**Items:**

Choose the first domain. For manufacturers this is usually Purchasing and Payables (PS_PO_HDR, PS_VOUCHER) and General Ledger (PS_LEDGER), not HCM, which carries personal data and needs a separate privacy review.

Publish approved PS Queries as Query Access Services operations, or build Integration Broker service operations for the few lookups you need, and place the IB gateway on the internal network only.

Create a read-only reporting copy of the database (Data Guard, Always On readable secondary or equivalent) for bulk analytical reads, and a read-only database account limited to selected records and views.

Build a tool server with named, parameterised tools. For each call it resolves the end user's OPRID, roles and row-security classes and applies them.

Index file attachments (stored in the database or through the file attachment framework) and linked documents into a local vector store with business unit as the access label.

Serve the model locally with vLLM or Ollama. Log every call with the OPRID.

Add writes only through Component Interfaces or delivered service operations after human approval, never direct DML on PS_ tables.

## Sections

### How PeopleSoft exposes data

**Body:**

PeopleSoft stores data in application tables named PS_<RECORD> (for example PS_PO_HDR, PS_VOUCHER, PS_LEDGER, PS_JOB) with meta-data in PeopleTools tables such as PSRECDEFN and PSOPRDEFN. Many tables are effective dated (EFFDT, EFFSEQ), so a correct query picks the row effective as of a date, not simply the latest. Business unit (BUSINESS_UNIT) is the main partitioning key in FSCM, and setIDs control shared reference data.

Official integration mechanisms are Integration Broker (service operations over REST or SOAP), Query Access Services (QAS) which exposes a registered PS Query as a service operation, Component Interfaces (CIs) which run a component's business logic and security from code, and Application Engine for batch. Direct SQL reads on a replica are fine for reporting, but PeopleSoft's rules live in PeopleCode, so anything that writes should go through a CI or delivered service operation.

**Code:**

-- Effective-dated read on a replica (example: current job row)
SELECT J.EMPLID, J.EMPL_RCD, J.DEPTID, J.JOBCODE
FROM   PS_JOB J
WHERE  J.EMPLID = :emplid
  AND  J.EFFDT = (SELECT MAX(J2.EFFDT) FROM PS_JOB J2
                  WHERE J2.EMPLID = J.EMPLID AND J2.EMPL_RCD = J.EMPL_RCD
                    AND J2.EFFDT <= SYSDATE)
  AND  J.EFFSEQ = (SELECT MAX(J3.EFFSEQ) FROM PS_JOB J3
                   WHERE J3.EMPLID = J.EMPLID AND J3.EMPL_RCD = J.EMPL_RCD
                     AND J3.EFFDT = J.EFFDT)

-- Purchasing tool: open POs for a business unit (replica)
SELECT H.BUSINESS_UNIT, H.PO_ID, H.PO_DT, H.VENDOR_ID, H.PO_STATUS
FROM   PS_PO_HDR H
WHERE  H.BUSINESS_UNIT IN (:allowed_units)
  AND  H.PO_STATUS = 'D'
FETCH FIRST 50 ROWS ONLY

### Reference architecture

**Body:**

PeopleSoft's web, application and process scheduler tiers are untouched. The AI stack sits alongside: a tool server that calls the IB gateway for user-scoped lookups and the reporting copy for big reads, an embedding service, a vector store and the generation model on local GPUs. Attachments are extracted from where PeopleSoft stores them (database tables or an HTTP or FTP repository, depending on configuration) and re-indexed when new attachments arrive.

A scheduled Application Engine job or a database change feed can notify the index service of new documents. In an air-gapped site, the IB gateway, tool server and model are all inside the restricted network. Because the model is local, supplier pricing and unreleased financials do not leave the building.

### Mirroring PeopleSoft security

**Body:**

Users have an operator ID (OPRID) in PSOPRDEFN, roles in PSROLEUSER, permission lists on roles, and row-level access through security classes and the security join tables and views used by PS Query and delivered pages. For queries you build yourself, reproduce that row security by joining the same security views that the delivered page or PS Query security record would use, or by calling QAS so PeopleSoft applies it.

Treat HCM differently. Personal data (compensation, national ID, health) has legal obligations of its own, so start with FSCM and keep HCM out of scope until your data protection owner has approved purposes, retention and access. A model that never leaves your network helps, but it does not replace a lawful basis.

**Code:**

- -- Roles for an operator (admin query, not a user-facing tool)
SELECT ROLEUSER, ROLENAME
FROM   PSROLEUSER
WHERE  ROLEUSER = :oprid

### Sizing, rollout and honest limits

**Body:**

A PeopleSoft estate with 500 to 3,000 users will usually have a small active group on the assistant; one to two GPUs and a second node for availability are typical for a 30B to 70B-class model. Phase 1 gives read-only Q and A over purchasing, payables and ledger data in 8 to 12 weeks. Phase 2 drafts requisitions or voucher explanations. Phase 3 runs approved CI-based actions.

Limits: PeopleCode logic is not visible in SQL, so computed values (for example approvals state) are best fetched through the application; effective dating and setIDs make text-to-SQL error prone; PS Query and delivered analytics may already cover your reporting needs; and if the plan is a move to PeopleSoft cloud or another suite, think twice before investing in deep customisations.

## Pitfalls

- Ignoring effective dating, which returns superseded rows and wrong amounts.
- Querying PS_ tables with a service account and no business unit or row-security filter.
- Starting with HCM data before the privacy review is done.
- Updating PS_ tables directly, bypassing PeopleCode edits and workflow.
- Forgetting that setIDs share reference data across business units, so a lookup may legitimately return data from a unit the user cannot transact in.

## Ai Angle

ERPray can use PeopleSoft's own service operations and a read-only replica, apply operator and business-unit scope, and show the query behind each answer. Proposed changes are drafted for a person to approve and are executed through your delivered Component Interfaces.

## Faq

### Does PeopleSoft have a REST API for this?

**Answer:** Integration Broker can expose service operations over REST or SOAP, and Query Access Services can expose a PS Query as a service. Which one you use depends on your PeopleTools release and what you have already published.

### Why use Component Interfaces for writes?

**Answer:** A Component Interface executes the component's PeopleCode, edits and security, so a created voucher or change behaves like a user entry. Direct table inserts skip all of that and can corrupt data.

### Can we include HCM data?

**Answer:** Technically yes, but personal data adds legal duties. Start with supply chain and finance, then include HCM only with explicit purpose, access and retention decisions from your privacy owner.

### Is this useful if we are moving to Fusion?

**Answer:** Possibly for the transition period. Keep investments light, focus on read-only tools and document retrieval, and avoid deep PeopleCode-specific work that will be retired.

## Search terms

add AI to PeopleSoft, PeopleSoft AI integration on-premises, PeopleSoft Integration Broker REST AI, PeopleSoft Query Access Services, PeopleSoft LLM private, PeopleSoft FSCM chatbot, PeopleSoft Component Interface write-back, PeopleSoft row level security AI, air-gapped PeopleSoft AI

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