How are you guys removing inactive emails from your lists

goins

Beginner
Mar 18, 2022
5
2
3
How are you guys removing inactive emails from your lists? the segment for non openers doesnt let you set a x amount of days so it wont really work, im looking to remove emails that havent opened in lets says 10 days from being added. or if they havent opened any email in 10 days remove or move to a "inactive" list.
 

wasif

Administrator
Staff member
Apr 9, 2019
469
85
28
Meanwhile, it can be achieved if you can write a custom script to do this. The below query should remove the contacts from all lists who haven't opened any email for the last 30 days.

SQL:
DELETE FROM `subscribers`
WHERE
id NOT IN (SELECT contact_id FROM `email_opened` WHERE created_at > now() - interval 30 DAY )
AND
is_sent = 1;

And query below will remove the contacts from list id 15, who haven't opened any email for the last 30 days.

SQL:
DELETE FROM `subscribers`
WHERE
id NOT IN (SELECT contact_id FROM `email_opened` WHERE created_at > now() - interval 30 DAY )
AND
is_sent = 1
AND
list_id = 15;
 

wasif

Administrator
Staff member
Apr 9, 2019
469
85
28
If you want to run this every 24h, you can open a support ticket and give them this query to set for every 24h.
 

wasif

Administrator
Staff member
Apr 9, 2019
469
85
28
Are you referring to editing a trigger or segment? Trigger can be edited, but segment not.