ChatGPTInfor XA (on IBM i) Agent view

How to use ChatGPT with Infor XA

Short answer

ChatGPT cannot reach an Infor XA system on IBM i on its own. You either export data for it, or put a secured web API in front of Db2 for i that a custom GPT or ChatGPT connector calls. For regulated or sensitive manufacturing data, a private model that runs next to the IBM i is often the more defensible choice.

Plenty of XA users already paste data into ChatGPT: a spreadsheet of open orders, a block of text from a screen, an exported report. It works, it is fast, and it is also an uncontrolled copy of production data in a third-party tool. The question most teams are really asking is how to do this properly, with the right data, current numbers and some governance.

There are three levels. At the first, a person exports a file and uploads it. At the second, a custom GPT calls a small API you host, so answers are live. At the third, you decide the data should not go to a public cloud service at all and use a private model instead. Which level is right depends less on the technology than on what the data is: item masters and cost roll-ups are one thing, controlled-technical-data part numbers for a defense customer are another.

XA adds one wrinkle. It sits on an IBM i with no always-on public REST layer in many installations, so a live connection means you must build or buy the API first. That is the real work, and it is worth understanding before choosing a ChatGPT-based design.

What teams use it for

Explain an unfamiliar report or screen

A new planner pastes a screen description or a spooled report excerpt and asks what a column means or how a number is derived. No live data required, and no sensitive values need be included.

Analyse an exported order backlog

Export open customer order lines to CSV, upload them for a quick summary by customer, ship week and late risk. Good for one-off analysis, poor for anything recurring.

Draft supplier and customer emails

Give ChatGPT the PO number, promise date and quantity short, and have it draft the chase email. Staff review before sending.

Write SQL against Db2 for i

Developers describe the question and ChatGPT drafts Db2 for i SQL for a view or report. Supply the column list, not real rows, and test the query yourself.

Live questions through a custom GPT action

A custom GPT with an action calls your read-only API to answer how many of item X are on hand and what is on order, with live values rather than yesterday's export.

Infor XA (on IBM i) integration surface

  • Exports: XA reports and queries can produce files via the IBM i (CPYTOIMPF for delimited stream files, or SQL over JDBC), which users then upload. This is the simplest path and has no live connection.
  • A read-only REST layer is the key to live access. Options include IBM i Integrated Web Services exposing SQL or an RPG service, or a small service on a separate host using the jt400 JDBC driver against Db2 for i.
  • Custom GPT actions need an HTTPS endpoint with an OpenAPI description and OAuth or an API key. The IBM i itself is rarely exposed to the internet, so the endpoint typically lives in a DMZ and talks to the IBM i over the private network.
  • ChatGPT connectors and apps supporting the Model Context Protocol can talk to an MCP server you host, which wraps the same read-only API. Available features depend on your ChatGPT plan and admin settings, so verify before designing around them.
  • Db2 for i row and column permissions (RCAC) can limit what the API user sees, which matters more when a cloud model is on the other end.

How it works

  1. 1

    Classify the data first

    List what the use case needs: item descriptions, quantities, supplier names, costs, customer drawings. Decide which are fine to send to a cloud model and which are not. This one hour of work decides the whole architecture.

  2. 2

    Choose the plan and its data controls

    Business and enterprise ChatGPT plans offer admin controls and commit that business data is not used for training by default; consumer accounts differ. Read the current terms and have your admin disable training and set retention before staff use it with ERP data.

  3. 3

    Build a narrow read-only API

    Expose a handful of endpoints such as item availability, PO status and order status, each backed by a Db2 for i view. Add parameter validation, row limits and an API key or OAuth tied to a read-only IBM i profile.

  4. 4

    Describe it in OpenAPI and create the custom GPT

    Write precise operation descriptions so the GPT picks the right call. Add instructions to answer only from tool output, cite the order or item number, and say when data is missing.

  5. 5

    Publish it to a limited group

    Share the GPT inside your workspace only, to a pilot group, and review conversation logs where your plan allows it.

  6. 6

    Decide whether to keep going or move private

    If users ask for things that touch controlled data, move that portion to a model running inside your network and leave ChatGPT for the harmless tasks.

Example flows

Quick backlog analysis from an export

Trigger: Sales manager wants late-risk orders by customer

  1. Analyst runs a saved query for open order lines and exports CSV.
  2. Removes cost and margin columns before upload.
  3. Asks ChatGPT to group by customer and ship week and flag lines with allocation short.
  4. Reviews the summary against the source.

Result: A one-off summary in minutes. The data is a snapshot and no live system is touched.

Custom GPT answers a stock question

Trigger: Planner types: how many of item 10442 can I promise for next Friday?

  1. The GPT calls the item availability action with the item number.
  2. Your API queries the availability view in Db2 for i and returns on-hand, allocated and inbound by date.
  3. The GPT calculates available-to-promise from the returned rows and states the numbers it used.

Result: A live answer with the figures shown, so the planner can verify against the XA inquiry screen.

Keeping data on-prem

If a cloud model is not acceptable, keep the same user experience but replace the model. Run an open-weight model on a GPU server inside your network, front it with an OpenAI-compatible endpoint (vLLM and Ollama both provide one), and point an internal chat interface at it. The read-only API over Db2 for i stays the same, only now both ends live on your network and nothing is sent to a public service. This is the usual answer for defense, aerospace and customers under contractual data-handling clauses. You trade some raw model capability for control, so test on your real questions before committing.

Security checklist

  • Never connect the IBM i to the internet. Put the API in a DMZ and allow only the necessary outbound path to Db2 for i.
  • Keep the API read-only, row-limited and authenticated per user or per group, not a shared master key.
  • Strip cost, margin and customer-controlled technical data from anything sent to a cloud model unless your contracts allow it.
  • Review your ChatGPT plan's retention and training settings with the admin, and check any export-control obligations before use.
  • Log each action call with user, parameters and rows returned.

Ways to get it done

Manual export and upload

Effort: None to set up, but stale data and a governance gap if it spreads.

Occasional analysis on non-sensitive data by a few people.

Custom GPT with a read-only API you build

Effort: A small API plus GPT configuration; a few weeks including security review.

Live Q&A on non-controlled data for a defined user group.

Private model with the same interface, built with a partner such as Netray

Effort: Larger, as it adds GPU serving and evaluation, but data never leaves your network.

Regulated, export-controlled or contractually restricted data.

Pitfalls

  • !Staff pasting full order books into a personal ChatGPT account. Give them a sanctioned alternative, or the habit continues quietly.
  • !Trusting arithmetic from the model. Have the API compute available-to-promise and let the model present it.
  • !Exposing an unauthenticated endpoint for the GPT action during testing and forgetting to close it.
  • !Assuming the GPT understands your field names. Document columns in plain language in the API schema.

Frequently asked questions

Can ChatGPT connect directly to Infor XA?

Not directly. XA runs on IBM i, and ChatGPT needs an HTTPS API to call. You need a small service in front of Db2 for i, or an MCP server, that ChatGPT's custom GPT actions or connectors can reach. Without that, you are limited to uploading exported files.

Is it safe to upload XA data to ChatGPT?

It depends on the data and the plan. Business plans offer admin controls and no training on your data by default, but export-controlled or contractually restricted data may not be allowed at all. Classify your data first and get compliance sign-off.

Do I need to install anything on the IBM i?

Not necessarily. A separate service using the jt400 JDBC driver can read Db2 for i. If you prefer to expose existing RPG logic, IBM i Integrated Web Services can publish it as an endpoint. Either way the IBM i stays on your private network.

Why choose a private model instead?

Control. A private model on your own GPU removes third-party data transfer, simplifies export-control arguments and avoids per-seat cloud costs for heavy use. The trade-off is operating the model and accepting somewhat lower capability on hard reasoning tasks.

Can ChatGPT write back to XA?

Technically an action could, but you should not allow it. Keep the connection read-only and have any change go through a person and an existing XA program. Writes from a general chat model are a risk without a staging and approval step.

Want ChatGPT working on your Infor XA (on IBM i)?

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

Get a free assessment