ChatGPTTOTVS Protheus Agent view

How to use ChatGPT with TOTVS Protheus

Short answer

You can use ChatGPT with Protheus in two ways: paste or upload exported data for one-off analysis, or give a custom GPT or app live access to a Protheus REST service. The second needs a reachable, authenticated API and a data policy your legal team accepts.

Many Protheus users already use ChatGPT informally: they export a report to Excel, paste it into a chat, and ask for a summary. It works, but it leaves a trail of company data in personal accounts, and the answer is only as fresh as the export.

The next step is a controlled connection. ChatGPT can call external APIs through actions in a custom GPT or through connectors, but the API has to be reachable over HTTPS, described in an OpenAPI schema, and secured. A typical Protheus application server sits behind a firewall, so exposing it needs deliberate design.

This page walks through what is possible, what the data exposure looks like, and when a private model is the more sensible choice for Brazilian LGPD or contractual confidentiality.

What teams use it for

Explain a purchasing report

Upload an exported SC7 open-orders report and ask which suppliers are late most often and what to raise in the next supplier review.

Draft supplier and customer messages

Give ChatGPT the order number and status text and have it draft a polite delay notice in Portuguese, English or Spanish.

Custom GPT for order status

A custom GPT with an action calling a read-only Protheus service so the sales desk can ask for the status of a pedido de venda by number.

Formula and report help

Ask ChatGPT to explain an AdvPL or TLPP snippet, or to suggest a SQL view over SD1 and SF1, using sanitized code and no live data.

Month-end commentary

Paste an aggregated trial balance extract and request a first draft of variance commentary for the controller to edit.

TOTVS Protheus integration surface

  • Report and grid exports from Protheus (CSV, spreadsheet, Smart View output where licensed) as the simplest, no-integration path.
  • REST services on the application server, standard or custom WsRestFul/TLPP, which a custom GPT action could call if reachable.
  • SQL views over the Protheus database, published through a thin API gateway rather than exposed directly.
  • Authentication options on REST services such as basic auth or token-based schemes, which vary by release and configuration.
  • An API gateway or reverse proxy in a DMZ, since application servers are normally not published to the internet.

How it works

  1. 1

    Decide between export and live access

    Exports need no engineering but go stale and spread files. Live access is current but requires an API, auth and a review of what ChatGPT can see.

  2. 2

    Classify the data

    Separate public product data from supplier prices, customer lists with CPF or CNPJ, and payroll. Only the first group should be considered for a consumer-grade workflow.

  3. 3

    Build a narrow read-only API

    Publish two or three endpoints, for example order status and stock position, on a gateway that checks a token and applies filial filters. Describe them in OpenAPI.

  4. 4

    Configure the custom GPT action

    Point the action at the gateway, scope the instructions so the GPT only answers from the returned JSON, and test with wrong order numbers and other-branch data.

  5. 5

    Use an enterprise workspace and review data controls

    Check the plan's terms on training use, retention and regional processing before connecting any real business data.

  6. 6

    Reassess when scope grows

    If users want write actions or sensitive tables, move to a private model or an MCP-based setup you control.

Example flows

Sales desk order status

Trigger: A rep asks the custom GPT about order 004512.

  1. GPT calls the gateway action with the order number.
  2. Gateway authenticates and queries the SC5 header and SC6 items with branch filters.
  3. JSON returns status, shipped quantity and invoice number.
  4. GPT answers in plain language and cites the fields.

Result: The rep gets a current answer without opening Protheus, and no data is stored beyond the chat policy.

Weekly supplier delay summary

Trigger: A buyer exports the late PO report on Friday.

  1. Buyer removes personal contacts from the file.
  2. Uploads it to an enterprise workspace.
  3. Asks for grouping by supplier and a draft escalation list.
  4. Buyer reviews and sends messages through normal channels.

Result: Fast analysis with no integration work, accepting that the data is a snapshot.

Keeping data on-prem

If policy forbids sending Protheus data to an outside provider, keep ChatGPT out of the loop for that data and run an open-weight model on your own servers instead. The same tool layer and OpenAPI description can be reused: a local chat interface calls the gateway inside your network, and the model runs through vLLM or Ollama on local GPUs. You lose the convenience of the hosted product but gain control over retention, residency and logging, which many Brazilian industrial companies and defense suppliers require.

Security checklist

  • Never publish the Protheus application server directly to the internet; use a gateway with TLS, rate limits and IP controls.
  • Issue a read-only token tied to an allowed branch list, and rotate it on a schedule.
  • Remove CPF, CNPJ, bank data and pricing from exports unless the workspace terms and your DPO allow them.
  • Record who connected which GPT and which endpoints it can call, as part of your LGPD processing inventory.

Ways to get it done

Manual exports into an enterprise ChatGPT workspace

Effort: Hours.

Good for analysis and drafting on non-sensitive data with no engineering.

Custom GPT with a gateway to a read-only Protheus API

Effort: One to three weeks including security review.

Good for status lookups by many staff, if the data policy allows hosted processing.

Private model with the same tools, delivered by a partner like Netray

Effort: Several weeks for a pilot.

Best for regulated or contract-restricted data and for adding write actions with approval.

Pitfalls

  • !Pasting raw SC7 or SE1 exports that include supplier pricing or customer CNPJ into personal accounts.
  • !Exposing a Protheus REST port to the internet to make an action work.
  • !Letting the GPT answer from memory when the API returns nothing, which produces confident wrong order statuses.
  • !Forgetting branch filters so a user in one filial sees another company's orders.
  • !Assuming the action can call a server on a private IP; the hosted service needs a public, authenticated endpoint.

Frequently asked questions

Can ChatGPT connect directly to my Protheus database?

Not directly and you would not want it to. A hosted service cannot reach a private database, and exposing one is a serious risk. Put a gateway with a narrow read-only API in between, or use a local model inside your network.

Is it safe to paste Protheus reports into ChatGPT?

It depends on the data and the plan. Aggregated, non-personal figures in an enterprise workspace are lower risk. Supplier prices, CPF and bank data need approval from your DPO and a review of the provider's retention and training terms.

Can ChatGPT write to Protheus?

Technically an action can call a write endpoint, but it is rarely wise. A safer pattern has the model propose, a person approve, and a TLPP routine post through the standard ExecAuto so validations run.

Does TOTVS offer its own assistant?

TOTVS has been adding AI assistants and an AI platform to its products, but availability and scope vary by product and release. Check your contract. A general assistant may still not know your customizations.

When is a private model better than ChatGPT?

When data cannot leave your network, when you need full logging and residency control, or when you want the model to work against internal documents and tables at volume without per-seat cost. Quality of open models is good enough for most lookup and drafting tasks.

Want ChatGPT working on your TOTVS Protheus?

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

Get a free assessment