How can I display an order note only when it's present in a flow?

amanda-91
Shopify Partner
83 0 47

I'm striking out in trying to figure out how to display an order cart note in a flow "fulfillment ready" > "send email" action. The != blank condition works in regular email notifications templates. How can this be done in flow? 

 

I've tried all of the following and they are all returning true (printing "Note:  " when there is no cart note on the order):

 

{%- if fulfillmentOrder.order.note != null -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note != nil -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note != blank -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note != "nil" -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note != 'null' -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note != empty -%}Note:  {%- endif -%}
{%- unless fulfillmentOrder.order.note == empty -%}Note:  {%- endunless -%}
{%- unless fulfillmentOrder.order.note == blank -%}Note:  {%- endunless -%}
{%- unless fulfillmentOrder.order.note == nil -%}Note:  {%- endunless -%}
{%- unless fulfillmentOrder.order.note == false -%}Note:  {%- endunless -%}
{%- unless fulfillmentOrder.order.note == 0 -%}Note:  {%- endunless -%}
{%- if fulfillmentOrder.order.note == true -%}Note:  {%- endif -%}
{%- if fulfillmentOrder.order.note == false -%}No order note.{%- endif -%}
{% for fulfillments_item in fulfillmentOrder.fulfillments %}{%if fulfillments_item.order.note != blank %}Note:  {{fulfillments_item.order.note}}{% endif %}{% endfor %}
{% for fulfillmentOrders_item in fulfillmentOrder.order.fulfillmentOrders %}{%if fulfillmentOrders_item.order.note != blank %}Note:  {{fulfillmentOrders_item.order.note}}{% endif %}{% endfor %}

 

Reply 1 (1)

paul_n
Shopify Staff
1056 136 250
{%- if fulfillmentOrder.order.note != blank -%}Note:  {%- endif -%}

 This should work, although obviously you need to add the {{ fulfililmentOrder.order.note }} to output the note there

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.