New in Endora Commerce: a built-in CRM with sales opportunities See it →
Endora Commerce

OpenAI (GPT) integration

The admin assistant in Endora Commerce can run on GPT models: on your own OpenAI API key, with a model ID you type in yourself. Below: what exactly is sent to OpenAI, what you need on their side, and where the limits of this integration are.

What the platform uses GPT for

The model does not talk to buyers and does not generate storefront content. It handles one thing: the natural-language prompt mode in the admin command palette (⌘K / Ctrl+K). An operator types in Polish or English, for example “set the stock of Bolts 0193 in the Default warehouse to 120”, and GPT turns that sentence into calls to tools the platform itself exposes.

The list of those tools is closed and defined in code. Today it covers searching products, categories, warehouses and orders, plus these changes: stock level, assigning products to a category and removing them from it, product status and visibility, and order status (single or in bulk). The model cannot run SQL or call an arbitrary endpoint.

What goes to OpenAI and what stays with you

The request leaves from the platform backend, not from the operator’s browser, so the API key never leaves the server. What is sent to OpenAI:

  • the text of the instruction the operator typed,
  • descriptions of the tools that operator has permission to use (the model never sees the rest),
  • results of the read-only searches needed to resolve names, meaning short lists of matching products, categories, warehouses or orders.

The change itself is not executed by the model. The platform assembles a plan from the model’s calls, computes the names, record counts and current values on its own side, shows a plan card and waits for confirmation. Text generated by the model is not displayed to the operator, and tool results are treated strictly as data, so a product named like an instruction will not change how the assistant behaves. At execution each operation re-checks permissions, and the audit log gets an entry with the original prompt, the provider and the model.

On OpenAI’s side their API terms apply: data sent through the API is not used to train models unless you opt in, and abuse monitoring logs are retained for up to 30 days by default. The details are in OpenAI’s data controls documentation.

What to prepare on the OpenAI side

  1. An OpenAI API platform account with billing enabled. A ChatGPT subscription does not include API access: it is a separate product with separate billing.
  2. A project and an API key created in that project. A dedicated project for Endora Commerce makes it easier to keep costs and limits apart from other uses in the company.
  3. The ID of a model that supports function calling through Chat Completions. The platform has no built-in model list: you type the ID in by hand and change it when OpenAI releases a newer one.

Configuration in the admin

You save the key and the model once, on the Credentials screen, as an LLM configuration with the OpenAI (GPT) provider. The fields are API Key, Model and an optional Base URL. The key is encrypted (AES-256-GCM), cannot be read back from the admin or the API once saved, and is redacted in the audit log. The backend needs the SETTINGS_SECRET_ENCRYPTION_KEY variable set, otherwise saving the secret fails.

Then, in Settings, in the assistant’s group, you point the LLM credentials field at that configuration and enable the assistant. The change applies from the next prompt, with no restart. Operators need the prompt_actions:use permission, and each planned operation additionally requires the same permission as its manual equivalent.

Limits worth knowing about

  • Fixed API address. The assistant calls api.openai.com/v1/chat/completions. For projects with data residency outside the US, OpenAI requires a separate domain prefix, and that residency needs their prior approval. If this is a requirement for you, discuss it with us before the rollout.
  • OpenAI limits. Request and token limits depend on the account’s usage tier and on the model, and apply at the organization and project level (rate limits documentation). One prompt means several requests to the model, not one.
  • Platform limits. Interpreting a prompt is bounded in time and in the number of rounds. A plan expires after 10 minutes without confirmation. One prompt can affect up to 500 records by default (you can change the value in settings), and bulk operations above 50 records run in the background.

The second place where OpenAI is useful is hybrid search in Meilisearch. The search embedder setting also points at an LLM configuration, except that the Model field holds an embedding model and the Base URL leads to an OpenAI-compatible endpoint. In practice that means two configurations, because the assistant and the embedder need different models.

When to pick GPT and when another provider

GPT is the natural choice when the company already has an OpenAI organization, agreed data processing terms and an API budget. If you have the same arrangements with Google or Anthropic, go with Gemini or Claude: the assistant works the same way on them, and switching provider means pointing the setting at a different configuration. What the assistant can do does not depend on the model, only on the tools registered by the platform’s modules.

Let’s find out what we can connect at your end

Book a free consultation. We will walk through your ERP, warehouse and sales processes, and show you what the integration path looks like step by step.

Michał Zabielski, founder and CEO of Endora

Michał Zabielski

Founder and CEO, Endora

We reply within one business day.