Customer master data in Brazil: CNPJ, state ID, duplicates
Customer master data in Brazil: which fields to keep, where to validate CNPJ and state tax ID, and the ERP rule that stops duplicate customers.
Customer master data in Brazil for a business customer comes down to a short onboarding form with every field checked: the CNPJ of the location that buys, its registration status, legal name and address exactly as the federal revenue service has them, the state tax ID, whether the company is in the simplified tax regime, purchasing and billing contacts, and the approved payment terms. Almost all of it can be looked up in official sources instead of requested from the customer. Duplicates are avoided with one simple rule: one customer code per full CNPJ, linked to the company's other locations through the first 8 characters of the CNPJ.
Anyone who runs customer master data in Brazil knows the scene. A sales rep closes an order on Friday afternoon and sends a phone photo of the customer's registration card. The master data team searches by name, finds nothing and creates a new code. On Monday, credit finds out the same company already had another code with a different limit, and the tax team sees that the state tax ID typed in belongs to another state. The order waits.
This article covers the onboarding form itself: which fields to keep, where to validate each one and how to set the duplicate rule in the ERP. Cleaning up an existing customer base is covered in customer master data cleansing, and the address as tax data under Brazil's tax reform is covered in customer master data and Brazil's tax reform. The rules below apply to companies registered in Brazil.
Is it the same CNPJ? How to read head office and branch in the number
The CNPJ is Brazil's national register of legal entities, run by the Receita Federal (the federal revenue service), and also the number that identifies each company in it. The government service Consultar CNPJ (look up a CNPJ) brings together a company's registration data, including its list of partners and directors, and gives access to the official proof of registration and status and to the lookup of companies in the Simples Nacional regime. It is free and open to anyone.
According to Serpro, the federal data processing company, a CNPJ has 14 characters: the first eight identify the company (the root), the next four are the location number, which can be the head office or a branch, and the last two are check digits calculated with the modulo 11 method. In other words, every branch has its own CNPJ, sharing the head office's root.
The Receita Federal states that the alphanumeric CNPJ has been issued since July 2026, to new registrations only, and that existing numbers do not change. In its questions and answers document (in Portuguese), it adds that the new format also covers new branches of companies that already exist, and that companies must adjust their internal systems to identify a legal entity in both formats. For customer master data, that means the CNPJ field in the ERP must accept letters.
Which fields does a business customer onboarding form need?
The table below is the minimum form for a Brazilian business customer. The "ERP rule" column is a process recommendation, not a legal requirement; adapt it to your company's policy.
| Field | What it is for | Where to validate | ERP rule |
|---|---|---|---|
| CNPJ (14 characters) | Identify the buying location | Receita Federal | Accept letters, check digits, one code per CNPJ |
| Registration status | Know whether the company can be released | Proof of registration and status | Only active passes on its own; the rest goes to review |
| Legal name and address | Invoice and deliver | Proof of registration and status | Copy from the source, no typing |
| State tax ID (IE) | Check the location's state registration | SINTEGRA, per state | Number and status in the state of the address |
| Simples Nacional | Record the customer's tax regime | Consulta Optantes | Store result and date |
| Partners and directors | Know who you are dealing with | Consultar CNPJ | Record the partners and directors looked up, with date |
| Purchasing and billing contacts | Receive orders and collect | Customer | Billing email required |
| Payment terms and limit | Sell on credit | Internal policy | Set by the approver, not by sales |
A note on terms: the IE (inscrição estadual) is the company's registration with the state tax authority, and SINTEGRA is the public portal that links to each Brazilian state's registry. Simples Nacional is Brazil's simplified tax regime for smaller businesses, and Consulta Optantes is the official lookup that shows whether a CNPJ is in it.
What to ask the customer and what to look up yourself
CNPJ, status, legal name, address, partners, state tax ID and Simples Nacional status are public data. Asking the customer for a screenshot of them slows the queue and gives you weaker proof than a lookup done by your own team. The customer only needs to provide what only they know: contacts, a delivery address when it differs, billing details and whatever documents your credit policy requires.
Who fills in, who validates, who approves
- Sales or the customer fills in: CNPJ, contacts and requested terms.
- Master data validates: looks up the official sources, copies the data from them and checks for duplicates.
- Tax reviews: state tax ID and regime, when the automatic rule cannot close the case.
- Credit approves: payment terms and limit, under the company's policy.
When the same role fills in and approves, the control is gone. If the delay between these steps is the real issue today, see how to cut customer onboarding approval time.
How do you validate a CNPJ and a state tax ID before releasing a customer?
1. Format and check digits
Before any lookup, the system checks that the CNPJ has 14 characters and that both check digits match. According to the Receita Federal, the alphanumeric format still uses modulo 11, with each character converted to its ASCII code minus 48 (the letter A becomes 17). Its own example is CNPJ 12.ABC.345/01DE-35. When you normalize the field, strip only dots, the slash and the hyphen, never letters.
2. Registration status
Issue the official proof of registration and status on the Receita Federal site. Serpro's CNPJ lookup API documentation lists six statuses: null, active, suspended, unfit, active but not regular, and closed. One possible rule: active moves on; active but not regular, suspended and unfit go to review; null and closed block.
3. Legal name and address
Copy them from the proof of registration. Addresses typed by hand cause many of the mismatches between order, invoice and delivery.
4. State tax ID
Look it up through SINTEGRA, which links to each state's registry. Check the ID in the state where the location being registered is, not the head office's state. If the customer says it has no state tax ID, record the statement and the lookup result.
5. Simples Nacional
Use Consulta Optantes on the Simples Nacional portal and store whether the customer is in the Simples Nacional regime and in SIMEI, the variant for individual microentrepreneurs.
6. Evidence
For every lookup, store the result, the source, the date and who checked it. The public sources available are listed on the 4MDG lookup sources page.
How do you stop the same CNPJ from being registered twice?
The CNPJ is the natural key of a Brazilian business customer, but the ERP only blocks duplicates if someone configured that rule. Without it, the same CNPJ ends up under different codes, each with its own terms and limit.
- Key: the full CNPJ, all 14 characters. Block the creation of a second code for the same CNPJ.
- Search before creating: search by the root (first 8 characters), not by name. The screen then shows every location of that company already in the system.
- Head office and branches: one code per location that buys or receives invoices, because each one has its own CNPJ, address and state tax ID.
- Group: link codes with the same root under one parent. If the credit policy looks at the whole company, that is where the limit is consolidated.
- Existing duplicates: do not delete them. Block the code being retired, move the history to the one that stays and record the link. Doing this at volume is data cleansing, with its own method.
The record left at the end, one per location and linked to its company, is what is called a golden record: the single trusted version of that customer.
Hypothetical example
Hypothetical example, only to show the rule. A distributor has its head office in São Paulo and a branch in Minas Gerais. Both buy from you. The master data looks like this:
- Two customer codes, one per CNPJ. Both CNPJs share the same root and have different location numbers.
- Each code holds its own location's address and state tax ID: the head office's checked in the São Paulo registry, the branch's in the Minas Gerais registry, both through SINTEGRA.
- Registration status and Simples Nacional status stored with date and proof, for each code.
- Both linked to the same parent through the root. Credit sets one limit for the group, under its policy.
- Months later, the distributor opens a new branch. Since the CNPJ field already accepts letters, nothing breaks if the number comes in the alphanumeric format; the branch gets its own code and is linked to the same group.
Where to start
- Check whether the ERP's CNPJ field accepts letters and whether check digit validation follows the new Receita Federal rule.
- Turn on the duplicate CNPJ block at customer creation and replace name search with root search.
- Build the form from the fields in the table and mark, for each one, the official source and who validates it.
- Separate roles: whoever fills in does not approve credit.
- Count how many CNPJs have more than one code today. That number tells you whether the next step is data cleansing.
- To see where your company stands on master data management, take the free MDM readiness test.
Frequently asked questions
What documents should you request from a Brazilian business customer?
Very few. CNPJ, registration status, legal name, address, partners, state tax ID and Simples Nacional status are public lookups your team runs at the official source. From the customer, ask for contacts, billing details and whatever your credit policy requires.
How do you validate a CNPJ and a state tax ID in customer master data?
First the check digits, using modulo 11. Then the proof of registration and status from the Receita Federal, which is also where legal name and address come from. The state tax ID is checked through SINTEGRA, in the state of the location. Store the result, source and date of every lookup.
What should you do with duplicate customers under the same CNPJ?
Pick the code that stays, block the other one for new orders, move anything still open and record the link between them. Do not delete the old code, because invoices and receivables are tied to it. Then turn on the duplicate CNPJ block so it does not happen again.
Is there a customer onboarding form template?
The table in this article works as one: field, purpose, where to validate and ERP rule. More useful than the spreadsheet is the rule behind it, because a form with free text for CNPJ and address keeps producing duplicates and mismatches.
Does the alphanumeric CNPJ change customers already in my system?
No. According to the Receita Federal, existing CNPJs remain valid and unchanged. What changes is the field and its validation: new registrations, including new branches of older companies, can contain letters, and the ERP has to accept and validate that format.
How 4MDG can help
4MDG's customer onboarding runs on an MDM (master data management) platform. According to the solution page, customers fill in a self-registration portal, the platform validates at the origin across more than 600 public sources, including Receita Federal, Simples Nacional, Sintegra and Suframa, deduplicates records, and delivers approved customers clean into the ERP and the CRM. For an existing base, customer and vendor data cleansing validates CNPJ and merges duplicates. If you want to know how many customers are duplicated or have an irregular CNPJ today, start with consulting and diagnostic or reach the team through the contact page.
Note: Brazilian tax and registration rules change; always check the official source before applying them. This content describes master data practice and is not credit or legal advice.
Sources
- gov.br, Receita Federal. Consultar CNPJ. https://www.gov.br/pt-br/servicos/consultar-cadastro-nacional-de-pessoas-juridicas. Accessed on 11/24/2026.
- Receita Federal. Emissão de Comprovante de Inscrição e de Situação Cadastral (proof of registration and status). https://solucoes.receita.fazenda.gov.br/servicos/cnpjreva/cnpjreva_solicitacao.asp. Accessed on 11/24/2026.
- Serpro. API Consulta CNPJ, registration status types. https://apicenter.estaleiro.serpro.gov.br/documentacao/consulta-cnpj/pt/tipos_situacao_cadastral/. Accessed on 11/24/2026.
- Serpro. Alphanumeric CNPJ (news). https://www.serpro.gov.br/menu/noticias/noticias-2024/cnpj-alfanumerico. Accessed on 11/24/2026.
- Receita Federal. CNPJ Alfanumérico. https://www.gov.br/receitafederal/pt-br/acesso-a-informacao/acoes-e-programas/programas-e-atividades/cnpj-alfanumerico. Accessed on 11/24/2026.
- Receita Federal. Alphanumeric CNPJ, questions and answers (PDF). https://www.gov.br/receitafederal/pt-br/centrais-de-conteudo/publicacoes/perguntas-e-respostas/cnpj/cnpj-alfanumerico.pdf. Accessed on 11/24/2026.
- SINTEGRA. State registries. http://www.sintegra.gov.br/. Accessed on 11/24/2026.
- Receita Federal. Consulta Optantes, Simples Nacional portal. https://www8.receita.fazenda.gov.br/simplesnacional/aplicacoes.aspx?id=21. Accessed on 11/24/2026.
- 4MDG. Customer onboarding. https://4mdg.com.br/en/onboarding-clientes. Accessed on 11/24/2026.
- 4MDG. Customer and vendor data cleansing. https://4mdg.com.br/en/saneamento-de-cadastro-de-clientes-e-fornecedores. Accessed on 11/24/2026.