Skip to main content

Liquid Syntax Guide for Pipl

Pipl.ai Support Team avatar
Written by Pipl.ai Support Team
Updated over a month ago

Liquid syntax allows you to create dynamic, personalized email content in Pipl by using variables, filters, and conditional logic to deliver the right message to each recipient.

If you need to create logic for your specific use case, you can easily ask ChatGPT or Claude to generate them, as Liquid syntax is a standard templating language.

Introduction to Liquid Variables

When working with Pipl, understanding the difference between referencing variables in regular text versus within Liquid syntax is crucial.

  • In regular text: Use double curly braces like {{first_name}}

  • Within Liquid syntax: Use the variable name directly like first_name

For example, if your lead has a field called {{job_responsibility}}, you would reference it as job_responsibility inside Liquid syntax blocks.

Basic Conditional Logic

If, Else If, and Else Statements

{% if first_name != blank %} Nice to meet you, {{first_name}}! {% elsif company_name != blank %} Hello there, someone from {{company_name}}! {% else %} Welcome! {% endif %}

Date-Based Examples

Greetings Based on Day of Week

{% assign today_number = 'now' | date: '%u' | plus: 0 %} {% if today_number < 4 %} Hope you're having a good start to the week. {% else %} Hope you're having a good week. {% endif %}

This will display:

  • "Hope you're having a good start to the week" from Monday to Wednesday

  • "Hope you're having a good week" from Thursday to Sunday

Meeting Scheduling Based on Day of Week

{% assign today_number = 'now' | date: '%u' | plus: 0 %} {% if today_number < 4 %} Are you available anytime this week? {% else %} Are you available anytime next week? {% endif %}

This will display:

  • "Are you available anytime this week?" from Monday to Wednesday

  • "Are you available anytime next week?" from Thursday to Sunday

More Advanced Examples

Personalization Based on Industry

{% if industry == "technology" %} I noticed you work in tech and thought our developer tools might interest you. {% elsif industry == "healthcare" %} Our HIPAA-compliant solutions have helped many healthcare providers like {{company_name}}. {% elsif industry == "finance" %} Many financial institutions have improved their ROI by {{percentage}}% using our platform. {% else %} Our platform can be tailored to meet the specific needs of your industry. {% endif %}

Time-Based Greetings

{% assign hour = 'now' | date: '%H' | plus: 0 %} {% if hour < 12 %} Good morning, {{first_name}}! {% elsif hour < 17 %} Good afternoon, {{first_name}}! {% else %} Good evening, {{first_name}}! {% endif %}

Using Logical Operators

{% if job_title contains "Manager" or job_title contains "Director" %} As a leader in your organization, you might be interested in our management solutions. {% elsif job_title contains "Developer" and industry == "technology" %} Our developer tools have helped tech professionals like you improve productivity by 40%. {% endif %}

Nested Conditionals

{% if company_size > 100 %} {% if industry == "retail" %} Our enterprise retail solution has helped companies like yours increase sales by 25%. {% elsif industry == "manufacturing" %} Our manufacturing platform has helped large companies reduce costs by 15%. {% else %} Our enterprise solutions are designed for organizations of your size. {% endif %} {% else %} Our small business package might be perfect for {{company_name}}. {% endif %}

Remember that when using variables in your Liquid syntax, always use the variable name directly without the curly braces. The curly braces are only needed when placing variables directly in your text outside of Liquid syntax blocks.


Final Note

It's imperative to use the 'Preview Email' & 'Test Email' functions before finalizing or sending your actual campaign email.

This step ensures that your email's formatting is accurate and that you've adhered to the guidelines and constraints of spintax formatting.

Missteps in formatting can lead to errors or unintended email content, undermining the communication's professionalism and clarity.

Did this answer your question?