EntregaFlow Contract Shipping with Correios for WooCommerce

Description

EntregaFlow quotes Correios SEDEX and PAC in the WooCommerce cart with the credentials of your own Correios contract (CWS API). A cart with several products is quoted as one package: the weights and declared values are added up and one box holds the total volume.

In Settings > EntregaFlow, the “Check with Correios” tool shows the exact figures sent for a parcel you type in (weight, size, declared value, postcodes, contract and DR) and the price Correios returned, so you can type the same figures into your contract’s simulator and find where a difference comes from.

The Correios product code of the chosen service (03220 for SEDEX, 03298 for PAC, or your contract’s own codes) is stored on the order under the meta key _entregaflow_product_code, for ERP and label tools.

Every screen and message is ready for translation; the Brazilian Portuguese translation is being added through translate.wordpress.org.

Something not right? If a quote does not appear, or differs from your contract’s price, open a support ticket at https://github.com/brisolo/support/issues with the “Check with Correios” table (never include your access code), and we will help you sort it out.

Not in this version: labels, tracking, declaration of content, pre-posting.

Features

  • SEDEX and PAC quotes with your own contract credentials. Product codes are settings: 03220 and 03298 by default, or your contract’s codes (for example 04162 and 04669).
  • Optional declared value (additional service 019 for SEDEX, 064 for PAC). The cart total is sent as the declared value; if Correios refuses it (for example above a service’s maximum), that service is quoted without declared value and the refusal is logged.
  • One consolidated package per cart, plus the packaging weight and extra centimetres you set.
  • “Check with Correios” breakdown, including the charged weight and the additional services returned by Correios.
  • Clear messages for shop managers (never for customers), an admin notice while a setup error (credentials, product codes, products without weight) stops quotes, and a log of every failed quote in WooCommerce > Status > Logs.
  • Compatible with WooCommerce order storage (HPOS) and the block cart and checkout.

Prices and responsibility

The prices shown are the ones the Correios API returns for the data sent at the moment of the quote. EntregaFlow does not guarantee that Correios charges the same amount at posting: weighing, packaging, additional services and your contract’s table are set by Correios. Check the quotes against your contract’s simulator before relying on them in your shop. The plugin is provided “as is”, without warranty, under the terms of the GPL.

Trademarks

EntregaFlow is not affiliated with or endorsed by Correios. “Correios”, “SEDEX” and “PAC” are trademarks of Empresa Brasileira de Correios e Telégrafos; the plugin uses them only to name the carrier and the services it quotes through the official API with your own contract. WooCommerce is a trademark of Automattic; EntregaFlow is independent.

External service: Correios API

The plugin connects to one external service, the Correios API at api.correios.com.br, with your own contract credentials. To authenticate, it sends your Meu Correios user, API access code and postage card number. For each quote, it sends the origin and destination postcodes, the weight and dimensions of the package, the declared value (only when you turn that on) and, if set, your contract number and DR. Nothing is sent anywhere else, and the plugin’s author receives no data at all. The credentials are stored in your site’s options table, unencrypted like other WooCommerce settings, and are removed when the plugin is deleted.

  • Correios API documentation and access rules (CWS): https://www.correios.com.br/atendimento/developers
  • Correios privacy policy (Política de Privacidade e Cookies): https://www.correios.com.br/falecomoscorreios/politica-de-privacidade-e-cookies
  • EntregaFlow privacy policy: https://github.com/brisolo/support/blob/main/privacy/entregaflow.md

Support

Support is answered on GitHub issues, in Portuguese or English, and the forum here is checked weekly: https://github.com/brisolo/support/issues

Help articles in Portuguese: https://github.com/brisolo/support/tree/main/docs/entregaflow

Installation

  1. Install EntregaFlow from Plugins > Add New Plugin (or upload the plugin folder to /wp-content/plugins/) and activate it.
  2. In Settings > EntregaFlow, enter your Meu Correios user, API access code (CWS), postage card number, contract number with its DR, and the origin postcode (CEP). Check the SEDEX and PAC product codes against your contract and tick the services to offer.
  3. Optional: turn on declared value, and add your packaging weight and extra centimetres per side.
  4. In WooCommerce > Settings > Shipping, add the EntregaFlow method to a shipping zone for Brazil.
  5. Make sure every product has a weight and dimensions; without them there is no quote.
  6. Use “Check with Correios” with one parcel and compare the price with your contract’s simulator.

FAQ

Do I need a Correios contract?

Yes. The plugin uses the CWS credentials of your own contract (Meu Correios user, access code, postage card, and the contract number with its DR). There is no shared key: without a contract there is no quote. The postage card needs the price API (service 38202) enabled.

The quote differs from my contract price. What should I do?

In Settings > EntregaFlow, use “Check with Correios”: enter one parcel and the plugin shows the weight, size, declared value, postcodes, contract and DR exactly as sent, with the price returned. Type the same figures into your contract’s simulator. If the simulator gives the same price, the difference comes from the product data (weight or dimensions) or from the packaging settings. If it gives another price for the same figures, open an issue with the table.

How is a cart with several products quoted?

As one package. Weights and declared values are added up; length and width are the largest among the products, and the height is the total volume divided by length × width; then your packaging weight and extra centimetres per side are added, and each side is rounded up and never below 16 × 11 × 2 cm, the smallest package the plugin quotes. The calculated box is the smallest that holds the products, so set the packaging to match your real box. The package summary is stored on the order’s shipping item (meta _entregaflow_breakdown) for integrations.

My contract uses other product codes.

Enter them in Settings > EntregaFlow (SEDEX and PAC product codes). The defaults are 03220 and 03298.

The admin shows that Correios refused the price request.

Your credentials were accepted, but the price API is not enabled for your postage card, or the product code is not in your contract. Ask Correios to link service 38202 (price API) to the card, and check the product codes in the settings.

Can another system read the chosen service (SEDEX or PAC)?

Yes. The product code of the chosen service is stored on the order under the meta key _entregaflow_product_code. If it is empty, the order did not use an EntregaFlow method.

Does it print labels or track parcels?

Not in this version.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“EntregaFlow Contract Shipping with Correios for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.1.0

  • First release.