APIs & Integrations

adriano-azos
Teilnehmer/-in

Stranger conditional in email, maybe I found a bug?

Hello everyone!

I build a module for single email (doc here) and I am trying to understand why the email is returning as FALSE and that the correct one should come as TRUE.

Code in module (type email):

 

 

 

{% if custom.payment_method|upper == "BOLETO" %}
... a div with elements here ...
{% endif %}

Test debugg:
-- debugg: {{ custom.payment_method }} <br>
-- debugg: {{ custom.payment_method == "boleto" }} <br>
-- debugg: {{ custom.payment_method|upper == "BOLETO" }} <br>

 

 

 

 

POST (Success):

 

 

 

{
    "emailId": "123123",
    "message": {
        "to": "adriano.silveira@azos.com.br"
    },
    "customProperties": [
        {
            "name": "payment_method",
            "value": "boleto"
        }
     ]
}

 

 

 

 

Result in email:

A DIV inside conditional not display

 

 

Test debugg:
-- debugg: boleto
-- debugg: false
-- debugg: false

 

 

 

What is wrong with the code and why custom.payment_method == "boleto" return as false?

0 Upvotes
3 Antworten
Jaycee_Lewis
Community-Manager/-in
Community-Manager/-in

Stranger conditional in email, maybe I found a bug?

Hi, @adriano-azos. Can you add any additional context? This can help the community understand if/how they can assist with your project.

 

Thank you! — Jaycee

 

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
adriano-azos
Teilnehmer/-in

Stranger conditional in email, maybe I found a bug?

I updated the post, and now it has more context?

0 Upvotes
Jaycee_Lewis
Community-Manager/-in
Community-Manager/-in

Stranger conditional in email, maybe I found a bug?

Hi, @adriano-azos. Can you add any additional context? This can help the community understand if/how they can assist with your project.

 

Thank you! — Jaycee

 

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes