# 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="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FoWu8GMVP8KwjDM9xQNDJ%2F1.gif?alt=media&#x26;token=6bcdc70f-5e17-4223-a00f-8a0595f66f39" 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](https://docs.is-messenger.com/ismessenger/modules/reports).

### 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="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FCVicDNkthExfe37BmLBE%2Funtitled-1.png?alt=media&#x26;token=a9b9fa1d-6bf6-4f90-b319-d3839abfd715" alt=""><figcaption></figcaption></figure>

Workflow steps and their functions:

1. **Trigger:** This will start the Workflow when you [click on the Shortcut button](https://docs.is-messenger.com/ismessenger/support-use-cases/how-to-route-customers-to-the-right-team-automatically).
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](https://docs.is-messenger.com/ismessenger/modules/workflow) 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](https://docs.is-messenger.com/ismessenger/workspace-setting) to your Inbound Conversations Workflow.

<figure><img src="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2Ftk7shhw4Pl8Mdcp4Ymcv%2Funtitled-2.png?alt=media&#x26;token=720dd484-7508-4a79-adf3-d1440d2b6265" 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="https://3688769499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mbui1HRO4dGghy5ITOz%2Fuploads%2FbJjlzB3CllhoALKdFeUJ%2F1.gif?alt=media&#x26;token=905304e1-7e89-4969-8ab9-7a8608b1021d" 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 %}
