Skip to main content
Solved

Failed messages

  • 18 August 2022
  • 1 reply
  • 408 views

Hi there! We have a bunch of failed messages lately and we keep seeing the reason as variable ‘customer.email’ is missing. When I checked our customer attributes, our users have their email addresses added either under email or Email address. How can we fix this to make sure our emails land in our customers’ inboxes?

Best answer by Jess

Hi astrabelle!

Messages will fail when attributes are missing, this is to prevent sending awkward codes on your email. This is why we highly recommend using a liquid fallback in case an attribute is not available. Read more about it here.

In your case, your customer's email addresses are either on your attribute email or Email address. You can also use the following liquid:

{% if customer.email != blank %}{{customer.email}} {% else %} {{ customer["Email address"] }} {% endif %}

If your customer email attribute is not blank, it will use the email. However, if it’s empty, then it will use the attribute Email address instead.

Because your email attribute is missing from your other customers’ profiles, I assume that your messages are failing because your To address is empty. You can also add this liquid fallback on your To address. Simply click the Customize button and paste the above liquid.

When possible, we suggest defining and enforcing a naming convention for your attributes. We also advise using all lowercase letters and using “_” instead of spaces. 😊

I hope this helps!

View original
Did this topic help you find an answer to your question?

1 reply

Jess
  • Novice
  • 1 reply
  • Answer
  • August 18, 2022

Hi astrabelle!

Messages will fail when attributes are missing, this is to prevent sending awkward codes on your email. This is why we highly recommend using a liquid fallback in case an attribute is not available. Read more about it here.

In your case, your customer's email addresses are either on your attribute email or Email address. You can also use the following liquid:

{% if customer.email != blank %}{{customer.email}} {% else %} {{ customer["Email address"] }} {% endif %}

If your customer email attribute is not blank, it will use the email. However, if it’s empty, then it will use the attribute Email address instead.

Because your email attribute is missing from your other customers’ profiles, I assume that your messages are failing because your To address is empty. You can also add this liquid fallback on your To address. Simply click the Customize button and paste the above liquid.

When possible, we suggest defining and enforcing a naming convention for your attributes. We also advise using all lowercase letters and using “_” instead of spaces. 😊

I hope this helps!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings