# Data Management Campaign best practice?

**URL:** <https://forum.mautic.org/t/data-management-campaign-best-practice/26976>\
**Category:** General Discussion\
**Created:** [February 8, 2023, 10:52am UTC](https://forum.mautic.org/t/data-management-campaign-best-practice/26976 "2023-02-08T10:52:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![astrylis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/astrylis/32/6421_2.png) [@astrylis](https://forum.mautic.org/u/astrylis)\
**Post date:** [February 8, 2023, 10:52am UTC](https://forum.mautic.org/t/data-management-campaign-best-practice/26976/1 "2023-02-08T10:52:02Z")

</div>

Hey Mauticians!

I was wondering we have a number of campaigns that does some data management. The way I have been testing locally on my machine is as follows. I have a check if the lead has an expected field. If they do I check if they have a primary job field related to their job title (it’s like a grouping as such). If they do not I assign them that primary job and then remove them from the campaign. if they already have the field assigned i remove them from the campaign.

I know that when our campaign update runs they will be added back to the campaign as we have set that leads can restart the campaign. I am wondering if this will cause too much extra processing especially as the segment has 20K plus leads at the moment, and it can grow.

I am wondering is this the sort of thing others are doing as part of their data management 🙂

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 9, 2023, 7:10am UTC](https://forum.mautic.org/t/data-management-campaign-best-practice/26976/2 "2023-02-09T07:10:25Z")

</div>

HI,  
can you maybe create segments based on your 2 criterias?  
Otherwise it can be really problematic if you run the campaign over and over again.  
Joey

---

<div class="post-metadata">

**Author:** ![astrylis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/astrylis/32/6421_2.png) [@astrylis](https://forum.mautic.org/u/astrylis)\
**Post date:** [February 9, 2023, 10:07am UTC](https://forum.mautic.org/t/data-management-campaign-best-practice/26976/3 "2023-02-09T10:07:20Z")

</div>

Thanks Joeyk

I had a chat with the head of marketing today about what they wanted to achieve and propesed a solution for them which he is very happy with. Essentially the same as i described above but without all those remove from campaign action. We only have one if they do not meet any of the criteria.

---

<div class="post-metadata">

**Author:** ![asad786](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/asad786/32/8990_2.png) [@asad786](https://forum.mautic.org/u/asad786)\
**Post date:** [February 21, 2023, 9:38am UTC](https://forum.mautic.org/t/data-management-campaign-best-practice/26976/4 "2023-02-21T09:38:53Z")

</div>

Please check condition in campaign that if that field is empty then remove contact from the campaign.

---

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [May 1, 2023, 8:52am UTC](https://forum.mautic.org/t/data-management-campaign-best-practice/26976/5 "2023-05-01T08:52:39Z")

</div>

I recently had the issue Joey is speaking about.

I added a “Remove from this Campaign” action inside the campaign, which was based on a segment.  
As the contacts were still in the segment, they were added back to the campaign (by the cron, which runs each minute).

My campaign-conditions were heading the contact right to the same action “Remove from this Campaign”.

In 20 hours my mautic database grew \> 6Gb (from 430Mb to 7Gb).  
There were campaign\_lead\_event\_log and lead\_event\_log that were full with actions of that campaign.

I had to solve it trough MySQL-commands with the use of ChatGBT.

The tutorial of Joey was for me as a guide: [The great Mautic weight control – Joey Keller](https://joeykeller.com/the-great-mautic-weight-control/)
