FAQ

Prev Next

Why is a variable empty even though the user has data?

The variable name may not exactly match the system name. Custom attributes always use the c_ prefix and must match the system name exactly (not the display name). Check the Attributes and Events in the InOne panel.

What is the difference between nil, blank, and an empty string?

  • nil: The variable is not set at all.

  • "": The variable exists but has no content.

  • blank: Matches both nil and "" in comparisons.

Both nil and "" trigger the default filter. A string containing only whitespace (" ") is not blank.

Why does 0 not trigger default?

default only activates for nil, false, and "". The number 0 is a valid value, so it is returned as-is. If you want to treat 0 as empty, use an explicit if check:

{% if c_total_orders == 0 or c_total_orders == blank %}
  No orders yet.
{% else %}
  {{ c_total_orders }} orders placed.
{% endif %}

Why does 10 | divided_by: 4 return 2 instead of 2.5?

When both values are whole numbers, Liquid performs integer division and discards the decimal. Use 10.0 | divided_by: 4 or 10 | divided_by: 4.0 to get a decimal result. For further details, refer to Filters.

I used capitalize but the name came out wrong. What happened?

capitalize uppercases the first character and does not change the rest. "ALICE SMITH" becomes "Alice smith". For proper title casing, capitalize each word separately:

{% assign fn = name | capitalize %}
{% assign ln = surname | capitalize %}
{{ fn }} {{ ln }}
→  Alice Smith

Why is the date empty even though the attribute has a value?

time_format fails silently when it cannot parse the input. Check that the date value is in a recognized format (ISO 8601, Unix timestamp, etc.). Formats using dots (15.01.2024) are not recognized.

Can we use parentheses to group conditions?

No. Parentheses in if conditions are not supported. Use nested if blocks to achieve logical grouping.

What is the difference between assign and capture?

  • assign stores a single value or a filtered expression: {% assign x = name | upcase %}

  • capture stores a rendered block of content that can include tags and multiple lines: {% capture x %}...{% endcapture %}

Use capture when the value you want to store requires logic or multi-line rendering.

Why did the user receive the message after abort_message was fired?

abort_message only prevents delivery when the tag is actually reached during rendering. If it is inside a condition that was not met, the message is sent normally. Double-check your condition logic with a test user.

Can we compare a number stored as a string attribute?

Values that arrive as numbers are compared as numbers. This includes grouped and nested event parameters and Call an API responses. Write > 3 or == 3; == "3" does not match them. Use a quoted comparison such as == "5" only for attributes whose data type in the panel is String. You can check an attribute's data type on the Attributes and Events page in the InOne panel.

Why does a decimal number show as 99 or 1.23456789e+06?

When a number is printed without a filter, trailing zeros after the decimal point are dropped (99.00 shows as 99), and large numbers can appear in scientific notation (1234567.89 shows as 1.23456789e+06). To control how a number looks, use number_format or money_format:

{{ price | number_format: "comma, dot" }}     →  1,234,567.89

{{ price | money_format: "€", "dot, comma" }}  →  €1.234.567,89

See Filters for all options.

Operators, Comparison operators (add after "Comparisons are type-sensitive…")

Values in nested event parameters and Call an API responses that arrive as numbers are compared as numbers too. Write them without quotes, e.g., {% if call_an_api_response_6.order_count > 2 %}.

Can we use Liquid with the Transactional Email API?

In Transactional Email API V2, you can. In V1, you can use only the dynamic_fields placeholders, not Liquid tags.