# Do not Contact as Filter/Column in Segments/Reports

**URL:** <https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745>\
**Category:** Ideas and Feature Requests\
**Created:** [November 21, 2019, 10:27am UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745 "2019-11-21T10:27:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaniss](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yaniss/32/592_2.png) [@yaniss](https://forum.mautic.org/u/yaniss)\
**Post date:** [November 21, 2019, 10:27am UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/1 "2019-11-21T10:27:08Z")

</div>

At the moment, if you manually unsubscribe from Email a contact (API call or manually going into contact preferences or manually setting Do Not Contact in contacts view) there is no way to filter segments or reports based on this activity.

So like at the moment, I can not create a segment or a report that contains people that I manually/API unsubscribed. They are there in Mautic but I can not only display these contacts…

I think these groups of people would benefit from this idea: Anyone looking to do exports of contacts, have an overview of the amount of people in their DB that are DNC, …

Why I think they would benefit from this idea: I am assuming the only way to do this at the moment is to go in the backend and query the database somehow. Not even sure this is possible, I am not technical enough to do that.

Looking forward to know if I am the only one in this situation or if this has been a debated topic before…

---

<div class="post-metadata">

**Author:** ![tonershop](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tonershop/32/1530_2.png) [@tonershop](https://forum.mautic.org/u/tonershop)\
**Post date:** [January 28, 2020, 5:34pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/2 "2020-01-28T17:34:36Z")

</div>

Yes we would like this feature as well

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [January 28, 2020, 7:17pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/3 "2020-01-28T19:17:45Z")

</div>

Hey Yaniss.

This would be an amazing feature to have, unfortunately it is not there yet. But as you mentioned you can go to the database and export these contacts.

They way you would do it would be if you have terminal access (via ssh or some other emulator)

1. mysql -u root
2. connect mautic\_db\_name
3. select email from leads, lead\_donotcontact where lead\_donotcontact.lead\_id = leads.id;

you can do this from the command line and drop all the results into a file like this:

mysql -u root -e “select email from leads, lead\_donotcontact where lead\_donotcontact.lead\_id = leads.id” mautic\_db\_name \>\> donotcontact\_list.csv

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [December 21, 2021, 2:57pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/5 "2021-12-21T14:57:24Z")

</div>

This should be a basic feature by now. These command line solutions are not acceptable for marketing end users.

I’d use phpmyadmin to export database tables, only slightly less crappy than using command line - why has SSH suddenly become the way to do everything in the last five years? Damn millennials…

Edit: [Or has this now been implemented?](https://github.com/mautic/mautic/issues/4977) When you export a segment’s contacts, there is no ‘do not contact’ column in the csv/xlxs. How can I get that data?

If you export a segment via Reports, there is no ‘do not contact’ column there either, but you can a report from data source ‘do not contact’ and use other filters to get what you want, but there is no option to filter by segment or campaign at that point. I’d still prefer to just have it as a standard, essential column for any contact data…

---

<div class="post-metadata">

**Author:** ![mikew](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mikew/32/5156_2.png) [@mikew](https://forum.mautic.org/u/mikew)\
**Post date:** [December 21, 2021, 3:49pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/6 "2021-12-21T15:49:46Z")

</div>

If I am not mistaken this is now possible inside a segment:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/9/999dfbdaf9055fe03c1fa1c72b035ed730e4ff20.png)

@modifiedcontent - I wish I was a millennial 🙂 I was bought up in the world of Solaris Systems - should give you an idea of my age 🙂

---

<div class="post-metadata">

**Author:** ![modifiedcontent](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/modifiedcontent/32/511_2.png) [@modifiedcontent](https://forum.mautic.org/u/modifiedcontent)\
**Post date:** [December 21, 2021, 4:08pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/7 "2021-12-21T16:08:22Z")

</div>

Thanks @mikew, that is another option to get something, but you have to clone and create a new segment to apply that filter. Still not ideal.

---

<div class="post-metadata">

**Author:** ![mara](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mara/32/6027_2.png) [@mara](https://forum.mautic.org/u/mara)\
**Post date:** [April 3, 2023, 11:19am UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/8 "2023-04-03T11:19:44Z")

</div>

The segment filter “Unsubscribed - email” does not apply to “manual” Do Not Contacts. It filters only the other type. “Manual” is a bit confusing term in this context because it includes setting do not contact through campaign or import as well as setting it literally manually.

---

<div class="post-metadata">

**Author:** ![lcallander](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/lcallander/32/9305_2.png) [@lcallander](https://forum.mautic.org/u/lcallander)\
**Post date:** [January 6, 2026, 3:22pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/9 "2026-01-06T15:22:06Z")

</div>

yes, I would like this feature too! we send lots of SMS campaigns, and have rules based on their replies that would DNC them from future messages. We have found this does not always work, so we would like a report to run that we could eyeball based on the reply if the contact is indeed DNC. We have the reports that show the negative replies, we just need to match this up to the DNC columns. We’ve had complaints people DNC and they still get messages. We need to be proactive in reviewing this activity.

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [January 6, 2026, 3:42pm UTC](https://forum.mautic.org/t/do-not-contact-as-filter-column-in-segments-reports/11745/10 "2026-01-06T15:42:12Z")

</div>

> <https://github.com/mautic/mautic/pull/14915>
>
> | Q | A
> | --------------------------------…------ | ---
> | Bug fix? (use the a.b branch) | ❌ 
> | New feature/enhancement? (use the a.x branch) | ✔️
> | Deprecations? | ❌
> | BC breaks? (use the c.x branch) | ❌
> | Automated tests included? | ✔️ 
> | Related user documentation PR URL | mautic/user-documentation#... 
> | Related developer documentation PR URL | mautic/developer-documentation-new#... 
> | Issue(s) addressed | Fixes #... 
> 
> 
> 
> \## Description
> This PR adds DNC Preferences column and filter do Reports:
> \- Contacts
> \- Asset downloads
> \- Campaign Events
> \- Emails sent
> \- Form submissions
> \- Page hits
> 
> !\[image\](https://github.com/user-attachments/assets/09650557-1a53-48e6-bd76-91dada36cc96)
> !\[image\](https://github.com/user-attachments/assets/d570564b-5cd0-4339-821a-5447ec1c5dfa)
> 
> 
> 
> 
> 
> 
> 
> \---
> \### 📋 Steps to test this PR:
> TIP: you can set DNC flag using Contact Preference Center and unchecking the checkbox:
> !\[image\](https://github.com/user-attachments/assets/b6d64a80-b5e8-4ed8-b3b9-5fce779c6e71)
> 
> 
> 1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs \[here\](https://contribute.mautic.org/contributing-to-mautic/tester))
> 2. \*\*Contacts Report\*\*
> - \*\*Populate Data:\*\*
> - Go to the "Contacts" section and create multiple contacts.
> - Set DNC preferences (e.g., email) for some contacts in the Preferences menu
> - \*\*Configure Report:\*\*
> - Set columns to include "Contact ID" and "DNC Preferences."
> - Add a filter for "DNC Preferences."
> - \*\*Test Report:\*\*
> - Open the Contacts report.
> - Verify the "DNC Preferences" column is visible.
> 
> 3. \*\*Asset Downloads Report\*\*
> - \*\*Populate Data:\*\*
> - Upload a new asset in the "Assets" section.
> - Access the asset download link in a private browser tab to simulate downloads.
> - Locate the created anonymous contact in the "Contacts" section and set DNC preferences.
> - \*\*Configure Report:\*\*
> - Include "Contact ID", "Title", "DNC Preferences" as columns.
> - Add a filter for "DNC Preferences."
> - \*\*Test Report:\*\*
> - Open the Asset Downloads report.
> - Ensure the "DNC Preferences" column is present.
> 
> 4. \*\*Campaign Events Report\*\*
> - \*\*Populate Data:\*\*
> - Set up a new campaign with events like sending emails.
> - Add contacts with different DNC preferences to the campaign.
> - Run the campaign
> - \*\*Configure Report:\*\*
> - Set columns to "Contact ID", "Event Name", "DNC Preferences."
> - Add a "DNC Preferences" filter.
> - \*\*Test Report:\*\*
> - Access the Campaign Events report.
> - Confirm the "DNC Preferences" column is visible.
> 
> 5. \*\*Emails Sent Report\*\*
> - \*\*Populate Data:\*\*
> - Create a transactional email and send it to contacts with varied DNC preferences.
> - Use the unsubscribe link to create different DNC reasons.
> - \*\*Configure Report:\*\*
> - Include "Contact ID", "Name", "DNC Preferences" as columns.
> - Add a filter for "DNC Preferences."
> - \*\*Test Report:\*\*
> - Navigate to the Emails Sent report.
> - Check for the "DNC Preferences" column.
> 
> 6. \*\*Form Submissions Report\*\*
> - \*\*Populate Data:\*\*
> - Design a form in the "Forms" section and embed it on a page.
> - Submit the form using different contact profiles with DNC preferences.
> - \*\*Configure Report:\*\*
> - Set columns to "Contact ID" and "DNC Preferences."
> - Add a "DNC Preferences" filter.
> - \*\*Test Report:\*\*
> - Open the Form Submissions report.
> - Verify the "DNC Preferences" column is visible.
> 
> 7. \*\*Page Hits Report\*\*
> - \*\*Populate Data:\*\*
> - Create a Landing Page.
> - Visit the page using a private browser tab.
> - Find the created anonymous contacts and set DNC preferences.
> - \*\*Configure Report:\*\*
> - Include "Contact ID", "Hit URL", "DNC Preferences" as columns.
> - Add a filter for "DNC Preferences."
> - \*\*Test Report:\*\*
> - Access the Page Hits report.
> - Ensure the "DNC Preferences" column is displayed.

It’s already in Mautic 7 for reports that include contacts, asset downloads, campaign events, emails sent, form submissions and page hits. @patryk.gruszka were there any plans to expand this to other reports?
