> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/chatlayer-documentation-pt-br/navegacao/tables/operate-on-your-records/delete-record.md).

# Excluir registro

Excluir um registro na sua tabela significa que você excluirá uma linha na sua tabela.

Isso significa que você vai sair deste:

| nome   | email\_address    | is\_susbcribed |
| ------ | ----------------- | -------------- |
| Agatha | <agatha@test.com> | TRUE           |

Para isso:<br>

| nome | email\_address | is\_susbcribed |
| ---- | -------------- | -------------- |
|      |                |                |

Para excluir um registro da sua tabela:

1. Certifique-se de já ter uma tabela preenchida. Para este exemplo, usaremos uma tabela de opt-in/opt-out que captura:
   * **nome**: Captura o nome do cliente.
   * **email\_address**: Armazena o endereço de e-mail do cliente.
   * **is\_subscribed**: Armazena o consentimento do cliente para ser inscrito em uma campanha.

<figure><img src="/files/ab6d9c04703596f0fedf7d04684fd31724a4ff46" alt=""><figcaption><p>Um exemplo de tabela de opt-in/opt-out.</p></figcaption></figure>

2. Certifique-se de capturar as variáveis relevantes na sua conversa. No nosso exemplo, capturamos `{userName}` nos blocos Coletar entrada. Esta é a variável que usaremos como filtro para direcionar determinada linha a ser excluída.
3. [Adicionar uma operação de Tabela](https://docs.chatlayer.ai/bot-answers/tables-beta/operate-on-your-records#add-a-table-operation-to-your-flow) no seu fluxo.
4. Selecione **Excluir registro.**
5. Selecione a tabela na qual você gostaria de trabalhar. Para este exemplo, chamamos nossa tabela de **Assinaturas.**
6. Clique em **+ Adicionar filtro** para definir um critério de seleção. Para este exemplo, filtramos observando a coluna 'name'. Se o nome for igual a `{userName}`, isso significa que a linha será excluída assim que o fluxo de opt-out for acionado.

<figure><img src="/files/832be201e21d8a8b6f7f852dea69919b2384546b" alt=""><figcaption><p>Excluir um registro da sua tabela.</p></figcaption></figure>

7. Clique em **Salvar**.
8. Adicione um **Mensagem** bloco como um Go To para informar ao cliente que ele foi removido com sucesso da assinatura.

<figure><img src="/files/3107e095950ff467bac303c5293e7d8704582f15" alt=""><figcaption><p>Exemplo de fluxo de opt-out.</p></figcaption></figure>

9. É crucial verificar a funcionalidade da sua operação Excluir registro para garantir que a linha correta seja excluída. Teste seu bot no emulador. Percorra o fluxo do seu bot no emulador para simular a experiência do usuário e acionar o **Excluir registro** acionada.

<figure><img src="/files/2030d7f419c0b04751c7238711ab7636f8049bd9" alt="" width="375"><figcaption><p>Teste o seu fluxo.</p></figcaption></figure>

10. Abra sua tabela e verifique se o bot excluiu a linha correta.

<figure><img src="/files/aa6bf59e66b285f87c317f1dfd18e312bb2d5f11" alt=""><figcaption><p>Verifique se o bot excluiu o fluxo correto.</p></figcaption></figure>

{% hint style="success" %}
Procurando um template de bot rápido e fácil para brincar com Tabelas? O [bot Gym](https://docs.chatlayer.ai/tutorials/bot-templates/gym) é um caso de uso representativo.
{% endhint %}


---

# 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://docs.chatlayer.ai/chatlayer-documentation-pt-br/navegacao/tables/operate-on-your-records/delete-record.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.
