Question

Can I use liquid with segments?

  • 28 December 2023
  • 1 reply
  • 52 views

I want to dynamically show part of a newsletter depending on if a user is a member of a certain segment.

I can’t find a way to access segment membership information using Liquid. Is it possible?

For example:


if customer in segment “not-paid” then… do this.. else if customer in segment “paid” then…


The segments are more complex than a single true/false, but showing this as an example.


1 reply

Userlevel 4

Hey gearfish,

you could set an attribute based on the segment membership and use this attribute in you “if” statement in the dynamic content.

In order to achieve this you would have to set a campaign the “updates a person” once they enter or leave the segment.

 

Hope that helps,

Felix

Reply