# Managing Spam

{% hint style="info" %}
**Business Goal**: Allow your support agents to mark Contacts as spam using a shortcut button, and filter spam Contacts in your Inbound Conversations Workflow.
{% endhint %}

<figure><img src="/files/vanUCsxABau0Zx4gGs8H" alt=""><figcaption></figcaption></figure>

### Benefits of Managing Spam Contacts <a href="#benefits_of_managing_spam_contacts" id="benefits_of_managing_spam_contacts"></a>

* Save valuable time by removing the need for agents to interact with spam Contacts.
* Improve agents’ overall response rate for [reporting purposes](/ismessenger/modules/reports.md).

### Workflow Setup <a href="#workflow_setup" id="workflow_setup"></a>

In the **Workflows** module, click **+ Add Workflow** > Select **Mark Contact as Spam** > Click **Use Template**.

<figure><img src="/files/NjnIQmZSbxYIWy7lWK1e" alt=""><figcaption></figcaption></figure>

Workflow steps and their functions:

1. **Trigger:** This will start the Workflow when you [click on the Shortcut button](/ismessenger/support-use-cases/how-to-route-customers-to-the-right-team-automatically.md).
2. **Add Spam Tag:** This step marks the Contact with a *SPAM* Tag.
3. **Close Conversation:** This step closes the Conversation once the Tag has been added.

Optional customization:

* **Close Conversation:** Add [Closing Notes](/ismessenger/modules/workflow.md) i.e. Conversation Category and Summary for reporting purposes. This will help managers easily identify high number of spam conversations and conduct further investigation on these types of conversations.

{% hint style="info" %}
Once you have completed the setup, publish your Workflow to start marking Contacts as spam.
{% endhint %}

### Filter Returning Spam Contact <a href="#filter_returning_spam_contact" id="filter_returning_spam_contact"></a>

To filter out Contacts that have been tagged as *SPAM,* add a [branch step](/ismessenger/workspace-setting/managing-a-workspace.md) to your Inbound Conversations Workflow.

<figure><img src="/files/qYVrZcc6F8lpn0kzSqFH" alt=""><figcaption></figcaption></figure>

Set up and configure 2 branches for each expected outcome:

* **Not SPAM:** Select *Contact Tag, s*elect *none* *of* and add the *SPAM* tag.
* **SPAM:** Select *Contact Tag, s*elect *has any of* and add the *SPAM* tag.

Each branch checks whether the Contact has a *SPAM* tag or not. Depending on the result, the conversation can be closed or the Contact can be routed to continue the inbound workflow.

### How to use Spam Shortcut button in Messages Module <a href="#how_to_use_spam_shortcut_button_in_messages_module" id="how_to_use_spam_shortcut_button_in_messages_module"></a>

Once you have published your Workflows, you can start using them to filter spam Contacts. Here’s an example of how to use the spam Shortcut button in the Messages Module:

1. To mark a Contact as spam, click on the Shortcut button > select the **Mark as Spam** Shortcut.
2. A notification will be displayed in the Messaging Console letting you know that this conversation has been closed by the Mark Contact as Spam Workflow.
3. A ***SPAM*** tag is also added to the Contact at the bottom of the Contact Details Drawer

<figure><img src="/files/A4zt9EGRfr07FuB0EVlx" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
With the Branch step set up to filter spam Contacts, any time a spam Contact returns, the conversation will be closed automatically.
{% 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://docs.is-messenger.com/ismessenger/handling-inbound-conversations/managing-spam.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.
