Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Best practice to create groups/segments based on user choice
  • Vote Up0Vote Down ctietzectietze
    Posts: 2Sendy user


    Sendy puts all the power at the user's fingertips, but that also means we have to figure out ways to implement features ourselves.

    How do y'all handle segmentation of lists based on user choice?

    Take some site like for example: you can receive daily email with a blog post or a weekly digest.

    Here's the options I see:

    • Subscribe to multiple lists (see API example), one for each selection. Bonus: selecting nothing would amount to not subscribing at all, which may or may not be what you want :)
    • Subscribe to 1 list and store checkbox selection as a single combined Custom Field. Selecting two options for the frequency would be concatenated, e.g. "Daily,Weekly", and you can create segments based on rules like 'Frequency contains "Daily"'.
    • Subscribe to 1 list and store each checkbox selection as its own Custom Field. There are no boolean fields in the database, so you'd set the text to "true" or anything that is non-empty to denote a selection. (There's no "is not empty" predicate in Sendy's rule editor, so sticking to one value would be best.)

    Are there others? Which do you use, and why?

    I think the concatenation of checkbox values into a single Custom Field is a good idea, because

    • I think this is a bit less annoying than creating 1 field for each checkbox, because you can change the available options in the form without having to touch the DB again, e.g. when you work together with other people. One could say this scales better.
    • And this is still a bit simpler than the API calls. A bit more newcomer friendly.
    • Unlike the API approach, customizing the selection from a profile update form is simple, too. With the API approach, you'd need to (un)subscribe from/to lists to reflect the selection. You'd also duplicate the personal information with each list.

    It requires some pre-processing to concatenate the values, though. Like a form action handler proxy that gets the raw form data, and then forwards the values in concatenated form to Sendy, since Sendy doesn't support the convention to combine all values of inputs ending with [], e.g. Frequency[]. When you select multiple values, Sendy stores the last one from the parameter list. Until a feature to handle multi-selection form fields differently is added, custom scripts to pre-process the form values are required.

  • 1 Comment
  • Vote Up0Vote Down ctietzectietze
    Posts: 2Sendy user

    Sendy support staff Ben answered via email after I asked this same question: their recommendation is to use multiple custom fields. So for the AoM example, you'd have [daily,fallback=] and [weekly,fallback=] and then segmentize based on the non-emptiness of these fields.

This discussion has been closed.
All Discussions