{% assign order = hash %}
{% assign order["id"] = 1234568790 %}
{% assign order["name"] = "#1234" %}
{% elsif event.topic == "user/orders/unpaid_reminder" %}
{% assign order = shop.orders[event.data.order_id] %}
{% unless order.financial_status == "paid" %}
"to": {{ order.email | json }},
"reply_to": {{ shop.customer_email | json }},
"subject": "Order {{ order.name }} still needs to be paid",
"body": "Please get in touch, stat!",
"from_display_name": {{ shop.name | json }}
{% assign one_day_in_seconds = 60 | times: 60 | times: 24 %}
"topic": "user/orders/unpaid_reminder",
"task_id": {{ task.id | json }},
"run_at": {{ "now" | date: "%s" | plus: one_day_in_seconds | json }},
"order_id": {{ order.id | json }}