3 ms·
thanks, i took a quick look and found http://learn.customer.io/recipes/role-based-messaging-campaign.html http://learn.customer.io/recipes/role-based-messaging-
by clairity 9y ago
thanks, i took a quick look and found http://learn.customer.io/recipes/role-based-messaging-campaign.html http://learn.customer.io/recipes/role-based-messaging-campai... (it's nice that you have these recipes).
but that recipe illustrates the exact issue i run into (and maybe you have a better solution): i don't want to have to define branches for each segment ("role" in the recipe) in your campaign manager. i want to pass in a collection of recipients (each having the role attribute set) and hashes of attributes with each tied to a role, and have the template select the appropriate hash of attributes to display (e.g., [title, date, author, body, image] for articles) based on that attribute rather than creating whole new templates and branches for each segment.
this let's me programmatically add more "versions" of the newsletter without going through the clunky process of branching and duplicating templates (it's DRY'ing out the templating process).
so with articles for example, west coasters get article A and east coasters get article B, each having their own hash of [title, date, author, body, image] slotted into the right places based on the location attribute on the recipient (in this example).
liquid could be the answer, but does your API make it easy to pass in a hash of hashes to make it all work? many products seem to be missing this particular feature and as a result, don't work for my use case.