Skip to main content
Solved

How can I show or hide a block based on if the contact is a client or not ?

  • October 4, 2024
  • 2 replies
  • 34 views

Hugo N.
Contributor I
Forum|alt.badge.img

Hi,

I am trying to have a block being displayed only for contacts that have never purchased from my brand in order to push them a 10% discount on their first order.

How can I solve this ?

I tried person|lookup:'Placed Order Count' == 0 but it doesnt seem to work.

Thanks for the help !

Best answer by bluesnapper

Hi @Hugo N. 

I don't believe it's possible to do this with display logic without some preparation (see below, though I'm happy to be proved wrong!)

If this is for a campaign, I'd create a segment of purchasers and non-purchasers and tailor your campaign to each audience.

If this is for a flow, you could add a conditional split: 'placed order zero times' over all time with YES branch for your discount offer emails.

Alternatively, to use display logic for a block, I suggest this:

  • Create a placed order event flow with a profile filter of 'placed order equals 1 over all time’ so only new customers enter it.
  • Add a first step that updates a custom property. Let's call this 'customer' and configure so it sets to boolean true (i.e on their first order).
  • This flow will flag new customers after the flow is live i.e customer = true
  • For historical customers, create a segment: 'purchased at least once over all time' and export as a csv. Add to the csv a customer column and set all profiles to the value: true
  • Import your csv into a temporary single opt-in list. During the import ensure you do not update profiles' subscription status.
  • Once the import is complete, you can delete the temporary list (profiles won’t be deleted, just the list). All historical customers will now have customer = true
  • To only display a block to non-purchasers, use this display logic: not person|lookup:'customer' - if the 'customer' property does not exist for a profile, is empty, or is the boolean value false it won't display (which will be the case for non-customers).
  • Test the above process with your test profiles first!

Hope that helps!

Andy

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

bluesnapper
Partner
Forum|alt.badge.img+45
  • Champion & Partner
  • 729 replies
  • Answer
  • October 4, 2024

Hi @Hugo N. 

I don't believe it's possible to do this with display logic without some preparation (see below, though I'm happy to be proved wrong!)

If this is for a campaign, I'd create a segment of purchasers and non-purchasers and tailor your campaign to each audience.

If this is for a flow, you could add a conditional split: 'placed order zero times' over all time with YES branch for your discount offer emails.

Alternatively, to use display logic for a block, I suggest this:

  • Create a placed order event flow with a profile filter of 'placed order equals 1 over all time’ so only new customers enter it.
  • Add a first step that updates a custom property. Let's call this 'customer' and configure so it sets to boolean true (i.e on their first order).
  • This flow will flag new customers after the flow is live i.e customer = true
  • For historical customers, create a segment: 'purchased at least once over all time' and export as a csv. Add to the csv a customer column and set all profiles to the value: true
  • Import your csv into a temporary single opt-in list. During the import ensure you do not update profiles' subscription status.
  • Once the import is complete, you can delete the temporary list (profiles won’t be deleted, just the list). All historical customers will now have customer = true
  • To only display a block to non-purchasers, use this display logic: not person|lookup:'customer' - if the 'customer' property does not exist for a profile, is empty, or is the boolean value false it won't display (which will be the case for non-customers).
  • Test the above process with your test profiles first!

Hope that helps!

Andy


Hugo N.
Contributor I
Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • October 7, 2024

Thanks Andy for the answer ! Looks like a great workaround even if I am really surprised that Klaviyo teams didn’t develop such a basic feature.

Have a great day !