Smart lists behaviour

Hi,



I’ve got a scenario where I imported a bunch of leads so we can use Mautic for sending out our newsletter. To get them all in a list together I added a boolean newsletter field in the imported CSV file and set it to 1 (true). Now I want to add some leads to the list from a form, I can just set the newsletter field to true when updating the lead however if it was just adding the lead to the list would this still work.



Summary: What happens when a lead is manually added to a smart list?



Thanks,

Zac

Hi,

I’ve got a scenario where I imported a bunch of leads so we can use Mautic for sending out our newsletter. To get them all in a list together I added a boolean newsletter field in the imported CSV file and set it to 1 (true). Now I want to add some leads to the list from a form, I can just set the newsletter field to true when updating the lead however if it was just adding the lead to the list would this still work.

Summary: What happens when a lead is manually added to a smart list?

Thanks,
Zac

Hi Zac

I just did this test;

Around 1700 imported records auto-added to a list via a filter (Filter was for date-added != empty). Submitting the form added the lead to the list perfectly.

Now - I think what you’re suggesting is you may have a filter on a list which new leads wouldn’t ‘match’, is that right? Basically if I understand you correctly your filter on the list is checking for a custom field of import column.

New leads submitted from a form wouldn’t have that import-column value so if the list were ever regenerated (which can happen in mautic via some cron commands), then the new lead wouldn’t match the list filter and be removed from the list.

In theory, yes that could be a problem. I would suggest two alternate paths:

  1. Do you really want to use the same list? In Mautic you can do a lot with lists, like running a campaign or email to multiple lists.

From a “semantic” perspective, if you have a list that says “everything on this list was imported”, but you then manually add to it from a form… well that list isn’t really what it says it is. Since mautic lets you do a lot with lists, I’d recommend you just track those form submitted leads in a new list, and then run your campaigns or emails against both lists.

  1. Artificially add the filtered-by value to the new leads. You can use the form submit ‘create / update lead’ action with a hidden form field to set the value of the filter value on the list to the same value as the one you imported. The create / update action lets you map form fields to your lead fields, so you can just map a hidden form value to the lead field. That would ensure the lead filters the the same way.

Hi Chad,

Thanks for that. It was more of a trap that I got myself in and thought that I should see what others think.

I can’t think of what would be the best way to avoid others having the issue?? Maybe a change could be made so that form (and others) actions can’t add to smart lists? It would avoid people getting in the trap where it appears the lead is added to the list but magically disappears.

What are your thoughts?

Cheers,
Zac

Hi Zac

Are you talking about having other users mess up the list on accident with a form action or something? If that’s the case all I can think of is (for now) using ACL to prevent people from editing your forms.

I’ve created a feature request on GitHub here https://github.com/mautic/mautic/issues/326 . It makes more sense if smart-lists where greyed out on actions as above

Zac