
- Home
- Integrations
- Protheus and e-commerce
Protheus connected to e-commerce, with NF-e.
TOTVS Protheus integrated with VTEX, Shopify Plus, Salesforce Commerce and Magento: catalog, inventory, pricing, B2C and B2B orders and tax invoices, with Brazilian tax compliance and end-to-end observability.
Protheus brings decades of tax, financial and logistics maturity in Brazil. Well integrated, it becomes the reliable engine of your digital operation, with no need to replace it.
Platforms we connect to Protheus
The same catalog, inventory, pricing, order and NF-e flows, adapted to the APIs on each side, for marketplaces, D2C and B2B on the same ERP.
Why CCX for this work
Custom integrations with lean scope, lightweight middleware, predictable cost and clear ownership.
Focus on the integration layer
APIs, middleware, field mapping and orchestration. ADVPL stays with the client's Protheus team or TOTVS partner, with a clear scope between the parties.
Living data dictionary
Every project starts with a mapping workshop for the SA1, SB1, SC5 and SD1 tables and tax fields such as CFOP, NCM and CEST, to avoid surprises in acceptance testing.
Incremental path
Direct APIs when volume is modest; middleware with queues when marketplaces and branches come in, without forcing you to license a corporate integration hub.
Side by side with your team
Squads that work alongside the client's Protheus team, without touching the ERP and without requiring a system change.
Three layers, with Protheus shielded from peaks
Protheus APIs on one side, the platform's APIs on the other and, in the middle, middleware with queues, idempotent retries and a DLQ that absorbs peaks and transient failures.
- TOTVS ProtheusCloud or on-premise
- REST APIsFWREST, ADVPL and TLPP
- NF-e at SEFAZAuthorized XML and DANFE
- MiddlewareAWS or GCP, queues and DLQ
- Cloud queuesAWS SQS or Google Pub/Sub
- APIs and webhooksOn the commerce side
- VTEXVTEX IO and Classic
- Shopify PlusOrders and fulfillment
- SalesforceCommerce Cloud B2B and B2C
- End customerStatus, NF-e and DANFE
Reference architecture for volume and resilience. In low-volume operations, Protheus REST APIs talk directly to the platform, without middleware.
Direct APIs, middleware or ETL: when to use each
All three paths take Protheus data to e-commerce. What changes is volume, the number of channels and the need for real time.
| Path | Makes sense when | Watch out for |
|---|---|---|
| Direct REST APIs (FWREST and webhooks) | The operation has low volume, up to about 500 orders a day, and one commerce platform. | With no intermediate layer, Protheus takes traffic peaks directly. |
| Dedicated middleware (AWS or GCP) | Volume grows, marketplaces and multiple branches come in, or there is more than one platform. | Requires queues, idempotent retries, a DLQ and observability designed from the first release. |
| ETL and batch | Large catalogs or analytical data headed to a data lake or warehouse, without stressing the ERP. | Runs in daily or hourly windows; real-time orders and inventory stay on the APIs or the middleware. |
Six flows we put into production
Where Protheus and e-commerce integration usually breaks, and how we design each flow.
Catalog and SKUs
Products, variations, measurements, weights, hierarchy and attributes flow from Protheus to e-commerce, with versioning and batch rollback.
Pricing and price tables
Price tables, lists, B2B negotiation, promotions and discounts calculated in Protheus and published by channel and segment.
Inventory and availability
Inventory by branch and distribution center, with real-time reservation, WMS integration and order splitting across multiple origins.
B2C and B2B orders
The e-commerce order enters Protheus, orchestrates credit, inventory reservation and shipping, and returns status through final delivery.
NF-e and finance
NF-e issuance via SEFAZ, DANFE attached to the order, accounting entry and sync with Protheus accounts receivable.
Customer records
Individual and business customers with CPF or CNPJ, addresses, contacts, linked price list and payment terms, with two-way sync when needed.
From order to delivery, with Brazilian tax rigor
In Brazil, an order goes through more steps than in other markets. We orchestrate all of them with a correlation ID: a failure becomes a task in the operations queue, not an order silently stuck.
- Credit, inventory reservation and tax calculation done in Protheus.
- NF-e issued, canceled, corrected and queried at SEFAZ within the order cycle.
- ICMS, ICMS-ST and DIFAL by origin and destination state, with Simples Nacional taken into account.
- MDF-e and CT-e in the flow when the operation runs its own logistics.
- Invoice issued, order billed, package shipped and delivery completed update the order in the store.
- Correlation ID to trace each step in Protheus, the middleware and the e-commerce platform.
Frequently asked questions
Does Protheus have ready-made REST APIs for integration?
Yes. Since version 12, Protheus exposes native REST APIs through FWREST and ADVPL. The SIGAFAT, SIGAFIS, SIGACOM and other modules have standard endpoints for catalog, orders, inventory, pricing and finance, and also allow custom endpoints in ADVPL or TLPP.
Can Protheus be integrated with VTEX?
Yes, it is one of the most common scenarios in the Brazilian mid-market. CCX integrates Protheus with VTEX covering catalog, inventory, pricing, B2C and B2B orders, NF-e issuance and status updates, combining Protheus REST APIs with VTEX APIs and webhooks.
Do I need middleware to integrate Protheus?
It depends on volume and complexity. In smaller operations, direct API-to-API integration works. At higher volumes or with multiple platforms, such as Protheus, VTEX and marketplaces, we recommend middleware with queues and observability, on AWS, GCP or on-premise.
How does the NF-e flow work?
The order enters the e-commerce platform and is sent to Protheus, which reserves inventory, calculates taxes and issues the NF-e via SEFAZ. The XML and DANFE return to the e-commerce platform, are attached to the order and sent to the customer by email or WhatsApp. Tax statuses (authorized, canceled, rejected) stay in sync.
How long does a Protheus and e-commerce integration project take?
For the core scope, with catalog, inventory, pricing, orders and NF-e, projects typically take 2 to 4 months. Expanded scopes, with B2B, multiple branches, connected marketplaces and complex tax rules, can take up to 6 months.
Does CCX customize Protheus?
We are not specialists in pure ADVPL or TLPP, but we work alongside the client's Protheus team or TOTVS partner. Our focus is the integration layer: APIs, middleware, field mapping, order orchestration and resilience. That keeps each party's scope clear.
Does Protheus Cloud or on-premise make a difference for integration?
Very little. Protheus Cloud exposes the same REST APIs via TOTVS Fluig and TLPP Web. On-premise, you need to handle network access, with VPN, tunneling or secure exposure. The integration patterns for orders, inventory and pricing are identical.
Which e-commerce platforms do you connect to Protheus?
VTEX (IO and Classic), Shopify Plus, Salesforce Commerce Cloud, Magento 2, Wake and in-house platforms with APIs. For marketplaces, we connect through a central hub, such as Olist or Anymarket, or directly with Mercado Livre, Amazon and Magalu.
Integrate Protheus with your e-commerce.
Thirty minutes with a CCX engineer, at no cost, to map APIs, flows, tax rules and next steps between Protheus and your platform.

