# Tags

## Criar Tags

1- Para criar as Tags, vá em Cosmodesk>Configurações>Tags:

![](/files/TlqwhxJ0ljHESfoShY8v)

2- Clique em Nova Tag, Em Tag defina o nome que você quer atribuir a sua Tag, em Filas de Atendimento defina as filas que devem conseguir visualizar e utilizar essa Tag e salve:

![](/files/49iH2LKdCPlZpdPB4CyT)

{% hint style="success" %}
Pronto, sua Tag está criada e pronta para ser utilizada
{% endhint %}

{% hint style="info" %}
OBSERVAÇÃO:

Caso queira que todas as filas e atendentes possam utilizar a mesma tag, em Filas de Atendimento é só selecionar a opção Todas as filas.
{% endhint %}

&#x20;

## Adicionar  as Tags nos atendimentos do Live Chat

{% hint style="info" %}
Agora você pode  utilizar a Tag criada em seus atendimentos
{% endhint %}

1- Para isso em Live Chat, selecione o atendimento que deseja adicionar a Tag, em Tags selecione uma ou mais Tags para adicionar ao atendimento:

![](/files/cNbhASo26Kh4FDYdz8bg)

## Filtrar  os atendimentos por Tags no Live Chat

1- Para filtrar os atendimentos por Tags, em filtro marque a opção Mostrar Tags na Lista de Atendimentos :

![](/files/La7itaKzTThQ6D3F3waZ)

2- Ainda no filtro, em Tags selecione as tags que deseja filtrar e salve:

![](/files/FzxNtg64MbNFFW4Vkk9j)

3- Pronto, será filtrado apenas os atendimentos que possuírem as Tags que você selecionou:

![](/files/tf5NLpvxsULl7i7prmN9)

## Inserir tags através do fluxo

{% hint style="info" %}
Você pode inserir Tags através da etapa de Javascript em seu fluxo atribuindo um array de string utilizando a variável "tags" dentro do contexto.
{% endhint %}

&#x20;1- Para adicionar a Tag, crie uma etapa de javascript, insira o contexto context.tags que deve receber dentro de um array de string o valor da tag a ser adicionada:

![](https://lh4.googleusercontent.com/HGSpwqMB6Uf7aTQXDUNFT3fJERntM4KmcWFtzaIPghpy7-3lccZE8ZgOhncUgAVO0z9d22YKRafcDSyBKvEVgWRH4TSXqw3Xhtt9qzuSqmRXFONF3z2BMaP2VxJ673UoXWqXNXKO)

{% hint style="warning" %}
OBSERVAÇÃO:

* Para adicionar mais de uma Tag, separe-as dentro do Array utilizando vírgula, por exemplo: **context.tags = \[ "Tag1", "Tag\_2" ]**
* Se houver espaço entre o nome das Tags, é necessário separar com "\_" (underline). Exemplo: context.tags = \[ "Tag\_1" ]
* Para que o nome da tag apareça corretamente no Livechat, é necessário que todas Tags inseridas no fluxo tenham sido previamente criadas em Cosmodesk -> Configurações -> Tags.
  {% endhint %}

{% hint style="info" %}
Desse modo, toda vez que o usuário passar pela etapa de javascript que contém as Tags, elas serão automaticamente atribuídas a ele.
{% endhint %}

## Filtrar Tags através do fluxo

**1-**&#x50;ara filtrar conversas que contenham uma determinada tag no fluxo, basta criar um filtro e inserir a seguinte condição:

{% hint style="info" %}
Campo: "Contexto";

&#x20;Nome: "tags";&#x20;

Condição: "Contém"&#x20;

Valor: nome da tag inserida.
{% endhint %}

![](https://lh4.googleusercontent.com/gnlIVkBC34hOuAnUibAqjeoO4dsNdAu2hExAlZofiS7ISNG5A3Y30h6SsUfqWMtukphLHGKhhUO9WdX1ki-AbtzCP1v6ca4nGp8QZ5vMFOVmSt6v2WJQ5lXlo-PQdV5j0qJIJ_-J)

## Tags do Atendimento

Diferente das tags do contato, as tags do atendimento ficam vinculadas apenas ao atendimento em que ela foi inserida.

Uma vez que o atendimento é encerrado a tags não terá vínculo com o próximo, a menos que seja inserida novamente.

1- Para inserir tags no atendimento, vá em Cosmo Desk>Live Chat:

![](/files/MwJuoqZC34likHKLEaMd)

2- Clique no atendimento que quer inserir a tag, e busque por Tags do Atendimento:

![](/files/Bqbw1EFhZ3ymxk3iz2M4)

3- Em Tags do Atendimento, selecione a tag que deseja inserir:

![](/files/0UI2Hv5kkdoMtpYcegrc)

4- Pronto, a tag já está inserida no seu atendimento, e ficará até ele ser encerrado.

## Relatórios

{% hint style="info" %}
É possível baixar um relatório das tags inseridas nos atendimentos. Para isso, basta acessar a ferramenta de análise do CosmoDesk e realizar o download do arquivo:
{% endhint %}

1- Acesse CosmoDesk > Analíticos > Download > Atendimentos realizados por atendentes:

![](https://lh6.googleusercontent.com/7-sybD2OqtSg0stjVhvM7GxO0CQ5EnwqHeeT2WVhF5ads4mByVp8AzoDxZUkT2iUCRINbnAvFxAh7FOwCvOzRXmTYR9JqV0vQI_aDXhCOt7dU_lHPDH3CHKLOMM5J_6zS4yg4aYC)

{% hint style="info" %}
\#OBSERVAÇÃ&#x4F;**:** Ao fazer o download dos atendimentos, as **tags do contato** virão na coluna de nome **tags** e as tags do atendimento virão na coluna de nome **conv\_tags.**
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://help.cosmobots.io/help/cosmo-desk/configuracoes/tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
