Conditional Blocks {if} Logic in the Email Editor

Overview

The {if} conditional logic feature in Pathway allows you to dynamically display or hide blocks of content in your emails based on specific conditions. This powerful tool ensures your recipients see only relevant information tailored to their specific circumstances.

Available Conditions

Here are some examples of conditions you can use:

  • 2nd policy exists
  • 5th vehicle exists
  • Policy premium exists (is more than 0)
  • CSR is assigned to policy
  • Specific coverage exists

Currently, the feature supports “exists” or “not empty” conditions. More conditions will be added in future updates.

Usage Examples

Hiding Content Blocks

Example 1: Hide content if no liability coverage exists or if it's zero

 
{if: {|vehicle_coverages:'44r'|liability_limit|} } Family protection premium: {|vehicle_coverages:'44r'|premium|} {endif}

Example 2: Hide content if no 2nd policy exists

 
{if: {|policies:2|type|} } Policy number: {|policies:2|policynum|} Policy type: {|policies:2|type|} Policy effective: {|policies:2|effective|} {endif}

You can also condense it to a single line:

 
{if: {|policies:2|type|} } Policy number: {|policies:2|policynum|} {endif}

Using Multiple Conditions

You can combine multiple conditions, which are treated as “OR”, meaning if any condition is met, the block will be shown.

Example:

 
{if: {|vehicle_coverages:'WINT'|liability_limit|} {|property_coverages:'SEWER'|liability_limit|} } Policy number: {|policies:2|policynum|} {endif}

Important Notes

  • The {if} portion will work with all merge tag functions that include the pipe character {| ... |}.
  • It will work in manual emails, autoresponders, and SMS, but not in subject lines or from fields.
  • Nested {if} blocks are not supported currently.
  • Ensure to close each {if} block properly to avoid content breaking.
  • Using hardcoded values in the condition portion will always pass, while whitespace will always fail, useful for testing.
  • The condition part within the {if} only works with merge functions and not with plain merge tags like {email}.

Advanced Comparisons

You can also perform string and numeric comparisons with the {if} logic.

Examples:

Show content if the limit is above 1M on 44R coverage:

 
{if: {|vehicle_coverages:'44r'|liability_limit|} > 1000000} Family protection premium: {|vehicle_coverages:'44r'|premium|} {endif}

Show content for specific policy type:

 
{if: {|policies:|type|} = AUTO } Did you know your Auto coverage includes this? {endif}

Hide content for older vehicles:

 
{if: {|vehicles:1|year|} > 2020 } Your new car comes with some benefits! {endif}

Using {ifnot} Logic

The {ifnot} logic works similarly to {if}, but it reverses the condition.

Example: Show content for non-Auto policies:

 
{ifnot: {|policies:|type|} = AUTO } Don't you wish this was an AUTO policy? {endif}

Debugging and Common Issues

By using the {if} conditional logic in Pathway, you can create highly personalized and dynamic email content, enhancing the relevance and engagement of your communications.

Generated with Avocode.contact usPathPathPathPathPathGroupPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathShapePathPathPathPathPathPathPathPathPathPathGroupPathPathPathPathPathPathPathPathGroupPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathPathRectangleRectangle

Can't find what you're looking for?

Contact us