All projects

Tan Quoc SteelBusiness Intelligence Analyst2025

Mam TQ: AI operations assistant inside the ERP

Ask the ERP in Vietnamese; every write waits for your confirm

Role: Designed the assistant: its business rules, tools and permission model

Result: An assistant inside the Tan Quoc ERP

Try it: from a shorthand request to a confirmed quote

Sample conversation, simplified for illustration: the SKUs, the 20,000 price and the floor prices are made up, with no ERP data, prices or customers. Staff use the real assistant in Vietnamese; this demo is shown in English.

  1. 1 A shorthand request in Vietnamese
  2. 2 Pick the unit the agent asks for
  3. 3 Confirm the proposal; the server re-checks it

Mam TQ · ERP assistant

Sample conversationAuto demo · tap to take over
  1. rail 12-14-16, price 20,000
  2. suggest_catalog_items read
  3. I found Ray P12, Ray P14 and Ray P16. Is 20,000 per kg or per bar?Ray P12Ray P14Ray P16

Simulated demo with sample data. The real assistant runs inside the Tan Quoc ERP and calls the OpenAI API on the server; this page makes no API calls.

Supply chain problem

Staff needed quick sales, stock and price answers without unchecked ERP writes.

  • Order-to-cash
  • Available-to-promise
  • Procurement
  • Price governance

Tech I used

OpenAI function calling with server-side tools, confirm-before-write, role permissions and prompt-injection guardrails

  • OpenAI API
  • Node serverless API

Result

Answers come from ERP tools, not from the model; every write waits for the user to confirm and is re-validated by the server.

How a request flows

  1. 01Step 1 of 5

    Ask in Vietnamese

    Staff type a question or a shorthand request in Vietnamese.

  2. 02Step 2 of 5, OpenAI API

    Agent picks a tool

    Read the overview, stock or prices, or prepare a proposal.

  3. 03Step 3 of 5, Node serverless API

    Server validates

    The server checks role permissions and re-validates the data.

  4. 04Step 4 of 5

    User confirms

    Nothing is written until the user presses Confirm.

  5. 05Step 5 of 5

    ERP updated

    The ERP record is saved; a below-floor price alerts the director.

Tech stack in this project

  • OpenAI APIResponses API with function calling (gpt-5.4-mini): the model must call a tool each turn instead of answering from memory
  • Node serverless APIServer-side tools that read the ERP data, check role permissions and re-validate every confirmed write
  • Function calling
  • Confirm-before-write
  • Role permissions
  • Prompt-injection guardrails
  • Floor-price alerts

Why it matters for supply chain

  • Quote and order proposals sit in order-to-cash
  • Stock and ATP answers back order promises
  • Floor-price alerts = price governance on deals
Read the full case study

Problem

Staff needed answers on sales, stock, receivables and prices from the ERP, and a way to act on them by chat, without an AI writing to the ERP unchecked or inventing numbers.

Approach

  1. I designed the assistant: its business rules, tools and permission model, as I did for the rest of the ERP.
  2. Staff chat with it in Vietnamese inside the ERP. It runs on the OpenAI Responses API with function calling (model gpt-5.4-mini).
  3. Read tools: a company overview (sales, revenue from valid delivery documents, receivables), product search (stock, available-to-promise and price lines), document options, and catalogue suggestions that turn shorthand or misspelt steel specs into real SKUs.
  4. Action tools only prepare proposals: sales quotes, won orders, purchase RFQs and orders, inventory receipts and counts, and price line, group, family and change requests.
  5. Every write needs the user to press Confirm, and the server re-validates it before the ERP is updated.
  6. Role permissions: the director unlocks with a daily PIN in a separate field, sales can add stock but cannot change sell prices, and admin is read-only.
  7. Guardrails: never invent numbers, call tools on every turn, never reveal secrets, and treat user and data text as untrusted (prompt injection). Selling below the floor price is allowed but alerts the director automatically.
  8. The chat on this page is a sample conversation with made-up prices, not ERP data.

Result

Result: An assistant inside the Tan Quoc ERP