wagtail / wagtail-newsletter

Send email newsletters based on Wagtail content
https://wagtail-newsletter.readthedocs.io
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Spike: trial desired campaign audience exclusion rules via API #7

Closed thibaudcolas closed 1 month ago

thibaudcolas commented 2 months ago

We need to confirm we can reproduce what the Mailchimp campaign creation UI provides – with the API. Excluding specific sub-segments seems trickier than we initially expected.

Notes from research so far

Looking at POST /campaigns > recipients > segment_opts > conditions – reviewing the condition schemas – the op operators have "not" options which I’d assume work as exclude?

For example the StaticSegment condition type supports an op of static_not, Interests has interestnotcontains?


The UI's "Do not send to" option is not reflected in the API – neither the selected choice, nor the number of recipients. It very much feels like it operates at a different level. The StaticSegment condition doesn't map to audience segments – TBH I don't understand what it maps to. But it's possible to express simple exclusion rules in the recipients > segment_opts > conditions list, so let's see what FPF's exclusion rules are.

mgax commented 1 month ago

We need to figure out if we can emulate the exclusion of a certain tag that's defined in the audience.

mgax commented 1 month ago

Hopefully FPF can reconfigure the segments to incorporate any exclusion rules. If that turns out to be impractical, we can reopen this ticket and look for alternatives.