← Previous article | Next article →

NOTE: Conditions feature relies heavily on the use of Custom fields. If you’re not familiar with the concept, it’s a good idea to start by getting acquainted with them here.

What are conditions?

Conditions is a feature that allows you to differentiate the content of your messages based on the prospects you send them to. For example, a sequence that would have different elements for male and female prospects. You can find them on the right side of the text editor whenever you create or edit a template:

Conditions vs custom fields

Of course, you can achieve this with custom fields as well. Following the gender example, you can easily create a custom field that will contain "Mrs." for female prospects and “Mr.” for male prospects and use it in your communication.

As you use more words that require inflection by gender (e.g. "she" and "he" or "her" and "him", etc.) it starts to become quite cumbersome, as you’ll need to create a separate custom field for each of these words.

The easiest way out of this would be to rephrase your messages, by avoiding the gender specific vocabulary. However, in some languages, this might be impossible to do. That's were the conditions come in!

How do Conditions look like

The solution to the issue of gender specific vocabulary in your messages is to use the Conditions feature. It lets you provide alternative blocks of text directly within the sequence, using if/then/else statements. Conditions are made using a simple true/false logic that allows you to control all the alternating words with just one custom field.

A condition statement is made of condition tags surrounding the alternative blocks of text:
{% if is_female %}Ms.{% else %}Mr.{% endif %}

The whole thing reads as:
If the custom field has a value, then use the text provided ("Ms."). Otherwise (if there is no value), use the alternative text ("Mr.").

The first tag contains a name of the Custom field the Condition refers to (in this case it's a custom made field named is_female).

How to use Conditions

In order to use Conditions, you first need to create a custom field that you’ll use to control it. It’s best to name this custom field as "is_something". It will make it easier to understand when the statement will be evaluated true and when it will be false. Following our example, let’s call it "is_female" (if you’re not sure how to create a new custom field, please refer to the instructions in this article).

Don’t forget to either fill out the new custom field or leave it empty, depending on the prospect’s gender (fill if female).

Next, you’ll need to build the Condition into your sequence. You can type it manually or choose it from the right side of the text editor. Make sure to remove the unnecessary line breaks. You’ll also need a custom field to base the if statement upon. Replace the "your_field_name" placeholder with the name of the custom field.
Make sure to remove the braces ( "#{{" and "}}" ) surrounding the custom field’s name.
Finally, place the alternative pieces of text between the Condition tags.

And that’s it! Make sure to test the Conditions you built into your sequence before sending it out to your prospects.

Testing Conditions

To ensure that they are working properly, test the sequence by sending it as a campaign. Send each and every combination to yourself and your colleagues as prospects to be certain they all work. You’ll find a detailed guide to doing that in this article.

Following our example, we can test the Condition we’ve built in the prior section by importing two prospects into Growbots and sending a campaign to them. We’ll want to make one of the prospects male and one female, by assigning the is_female values accordingly.

Experimenting with Conditions

The example provided in this article showcases the basic use of Conditions, allowing you to easily alternate between two options.

You can make it even simpler, though, by using just the if/then part and omitting the else tag and the alternative block of text. This will create a Condition that will either include or exclude a block of text in your messages, depending on whether the custom field has a value or not. This way, you can refer to a custom field you’re not 100% sure will be available for each and every prospect.

{% if custom_field %} referencing text {% endif %}

Using day conditions

Would you like to schedule a call with your prospect in two days from now? Would you like them to have a nice day? The Have a nice day phrase doesn't seem to be personalized. From now on you can use conditions to add today's and the day's after tomorrow name to the message! Let's say your prospect receives a message on Wednesday. You can easily wish them happy Wednesday without wondering which day they receive an email on. You'll just need to choose #{{today}} condition. This custom field changes into today's name once the message is sent:


In your email you can also ask your prospects if they're available in two weekdays from now. Don't worry, there's no need to count the days for each email separately. You can easily use weekdays_from_now(2) custom field! This way in your Wedneday's message you'll ask your prospects if they're available on Friday and in your Thursday's message - on Monday. Sounds good, right?


← Previous article | Next article →

Did this answer your question?