Jump to content

Email Template - ESP Conditions


Recommended Posts

@Martyn Houghton @James Ainsworth the documentation might be a bit unclear. Given that ESP conditions are based on SQL conditions, there is no reason why all valid operators in SQL are not allowed in ESP conditions... I see no reason why AND/OR cannot be used in ESP conditions, they should work fine. The documentation does not explicitly say that only those two operators are allowed. 

The ESP conditions to check the language as you need should be the following:

For en and en-US:

'{{Customer Contact.H_language}' = 'en' OR '{{Customer Contact.H_language}' = 'en-US' 


For not fr, de or pl:

'{{Customer Contact.H_language}' != 'fr' AND '{{Customer Contact.H_language}' != 'de' AND '{{Customer Contact.H_language}' != 'pl'

A more simplified expression (more elegant I would say too) would be the following:

For en and en-US:

'{{Customer Contact.H_language}' IN ('en', 'en-US') 


For not fr, de or pl:

'{{Customer Contact.H_language}' NOT IN ('fr', 'de', 'pl')

 

  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...