> For the complete documentation index, see [llms.txt](https://botconversa.gitbook.io/bem-vindo-ao-botconversa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://botconversa.gitbook.io/bem-vindo-ao-botconversa/tutoriais/validador-de-cpf-cnpj.md).

# Validador de CPF/CNPJ

## <mark style="color:blue;">Fazendo a Lógica nos Fluxos</mark>

Use como base de lógica o fluxo da imagem abaixo, o fluxo pronto está mais abaixo

<figure><img src="/files/kGf2FLiovBbP3pncW5PZ" alt=""><figcaption><p><strong>VALIDADOR DE CPF/CNPJ</strong></p></figcaption></figure>

## <mark style="color:blue;">Explicando a Lógica</mark>

O fluxo irá responder de acordo com a quantidade de números que seu contato digitar, entenda melhor com a explicação abaixo

* Igual a 12 dígitos > **CPF no padrão correto!**<br>
* Igual a 14 dígitos > **CNPJ no padrão correto!**<br>
* Menor que 11 dígitos > **Está faltando números no seu&#x20;*****CPF***<br>
* Igual a 13 dígitos > **Está faltando números no seu&#x20;*****CNPJ*****&#x20;ou sobrando números no seu&#x20;*****CPF*****&#x20;verifique o que pode estar errado**<br>
* Maior que 14 dígitos > **Tem números a mais no seu&#x20;*****CNPJ***<br>
* Se a pessoa digitar qualquer coisa diferente de números > **Digite seu CPF ou CNPJ sem pontos, traços ou espaços**

## <mark style="color:green;">FLUXO PRONTO</mark>

**VALIDADOR DE CPF/CNPJ**\
<https://app.botconversa.com.br/share-flow?share_code=efba90dd-9b18-48a9-acd9-7df09ada90f0>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://botconversa.gitbook.io/bem-vindo-ao-botconversa/tutoriais/validador-de-cpf-cnpj.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
