# Changing contact segment when re-importing?

**URL:** https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912
**Category:** Product Support
**Created:** [November 10, 2023, 2:08pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912 "2023-11-10T14:08:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![gendronsteph](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gendronsteph/32/14055_2.png) [@gendronsteph](https://forum.mautic.org/u/gendronsteph)
#### Post date: [November 10, 2023, 2:08pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/1 "2023-11-10T14:08:24Z")

</div>

**Your software**  
My Mautic version is: 4.4.9  
My PHP version is: 8.0.30  
My Database type and version is: 10.6.14-MariaDB

If I give you a context:  
We’re a web hosting company and we have a fairly big list of active and inactive contacts.

An active contact is one who have a service within us, an inactive one is one who left for another copany.

Few times a year we send messages to our inactive contact with a huge deal to get them back and it works well.

My question is:  
Is their a way to re-import our contacts, when we re-import let’s say, the active list, if a contact is actually in the inactiv segment, mautic will move that contact to the active one?

there’s a segment select box in the csv import tool, but it don’t seems to modify anything if the contact already exist in a segment.

We want to avoid deleting our segment before importing it again since some of them unsubscribe and we want to maintain their choice.

Thank you

forgive my poor english, I’m french

---

<div class="post-metadata">

### Author: ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)
#### Post date: [November 10, 2023, 2:49pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/2 "2023-11-10T14:49:25Z")

</div>

Hi - with the importer you an only import into one segment, not remove from one.  
But you could setup a little campaign, which removes all contacts from inactive and puts them in active. The campaign starts with a dynamic segment, which builds from people with the tag e.g. “inactive2active”.

After finishing the campaign it removes the tag from the contact. Allow to repeatedly run through this campaign.

So you assign a tag with your imports to achieve what you want.

---

<div class="post-metadata">

### Author: ![gendronsteph](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gendronsteph/32/14055_2.png) [@gendronsteph](https://forum.mautic.org/u/gendronsteph)
#### Post date: [November 10, 2023, 3:06pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/3 "2023-11-10T15:06:19Z")

</div>

Thank you for your reply, but I don’t wont to convert ALL the inactive contacts to active ones…

Only a certain number of contact are goint from inactive to active… those who purchase a service…

I think my only solution for my need would be to create a script that will modify the database as I want it…

---

<div class="post-metadata">

### Author: ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)
#### Post date: [November 10, 2023, 6:18pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/4 "2023-11-10T18:18:53Z")

</div>

You could also define a custom field with a boolean value and set it individually when importing. Same concept 😉

---

<div class="post-metadata">

### Author: ![gendronsteph](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gendronsteph/32/14055_2.png) [@gendronsteph](https://forum.mautic.org/u/gendronsteph)
#### Post date: [November 10, 2023, 6:55pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/5 "2023-11-10T18:55:47Z")

</div>

that might be a good idea, how would I select these contact in my segmented email? It seems that I can only select a segment and not a segment containing a specific field with a value?

I can also put all my contacts in one global segment and recreate my active / inactive segment based on the custom field, but is there a way to search and select all contacts with 1 or 0 in that custom field?

sorry I’m new to mautic, it’s a wonderful plateform but there’s many new things to learn 😉

---

<div class="post-metadata">

### Author: ![gendronsteph](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gendronsteph/32/14055_2.png) [@gendronsteph](https://forum.mautic.org/u/gendronsteph)
#### Post date: [November 10, 2023, 7:07pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/6 "2023-11-10T19:07:55Z")

</div>

nevermind, i’ve discovered the filters… I can create a list based on the custom field with that and the fiels update when I push a new import!

thank you I can work with that!

---

<div class="post-metadata">

### Author: ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)
#### Post date: [November 10, 2023, 7:34pm UTC](https://forum.mautic.org/t/changing-contact-segment-when-re-importing/29912/7 "2023-11-10T19:34:34Z")

</div>

Happy that it worked.
