UI for relative date filters

My idea is:
Include relative date filters in the UI.

I think these groups of people would benefit from this idea:
Mainly new users who haven’t read the documentation yet.

Why I think they would benefit from this idea:
Relative dates are very useful for email marketing. I think it should be obvious how to set them without looking into the docs.

Are you willing to work on this idea?:
I can’t code, but I would like to test the UI.

Where would you use this feature?
Make a step by step until we could reach where you would set up this

We have simply used JavaScript to create filters that complement the default filtering area in Mautic. We just paste the JS code into ublic_html/app/bundles/LeadBundle/Resources/views/Lead/_filter.html.twig

filter

I think, but I’m not sure, that this might be similar to what I’m trying to do in a conversation we had on Slack this week (if not I can break this out into another post!):

Has anyone else come across a need to have a filter on a segment which is something like 'downloaded xyz asset (which we currently have) in the past xyz time period (which we don’t yet have)?

Context being, we send an alert when folks download a specific resource to people who need to know - and people can download it more than once so we should be alerted each time it happens. So to do that with a campaign workflow (we can’t do it with a form based as it’s an asset which can be downloaded via link from anywhere) we need to use a segment. Segmenting based on the asset download means anyone who downloads it is in the segment, even if we remove them after the alert is sent they are added immediately the segment rebuilds again. I’ve cludged a workaround using ‘last active’ date being today, which isn’t 100% accurate but wondered if anyone else has come across this.

Ideally the segment filter would allow us to say, for example, downloaded xyz asset in the last 6 hours (or 1 day, or 12 months etc)

@a.towne also mentioned the following use cases:

A few related filters that would be very useful:

  • Was sent a specific email in a time frame
  • Read a specific email in a time frame
  • Visited a specific landing page in a time frame
  • Submitted a form (any)
  • Submitted a form in a time frame
  • Submitted a specific form
  • Submitted a specific form in a time frame
  • Was sent a specific SMS
  • Was sent a specific SMS in a time frame
  • Was sent a specific push notification
  • Was sent a specific push notification in a time frame
  • Custom object association (e.g. contact was linked to a particular custom object/item in a time frame, bought a specific product in a time frame, etc.)

We can already use the relative date functions but not in conjunction with something else when filtering in a segment (e.g. downloaded an asset in a specified time period relative to now).

Some input from @kuzmany:

Even if we created downloaded at a specific time filter, it will not work because queries for each filter are built in separate queries. It’s complicated to explain but If you use asset download + download date > certain date in the filter it will not work properly.
M5 added support for merged filters, and Custom Objects added support for it Fix segment build when multiple custom items are linked to a contact by ts-navghane · Pull Request #333 · acquia/mc-cs-plugin-custom-objects · GitHub
This allows build chained queries, what could achieve that, but it’s not implement yet and it’s tricky due BC:

Years ago I built it in another way Segments stats improvements by kuzmany · Pull Request #7285 · mautic/mautic · GitHub
It was merged into the public repo, but reverted because it had some issues.
It’s a bit painful because you are not able to create a segment filter at the moment like - give me all who read certain emails before some date. After integrated merging filters, it should work then
Probably bringing merged filters support by default in M6 with optional parameters to legacy version of filters would work.

@mika Acquia is currently working on building an improved UI for relative date filters. That work will not include the other filters for activities that Ruth pasted from the Slack thread.

@escopecz if there’s anything else we have available at this point for what we’re working on, please share!

That’s right, Andy! Here is our work in progress UI for it:


Will that solve this issue?

1 Like

That looks like what I had in mind. Great!
The other mentioned related filters also look interesting.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.