The "event" action

Event actions are powerful. They allow you to invoke other tasks as a response to an incoming event. And, because a single task can subscribe to multiple event topics, it means you can create multi-phase tasks that are executed over time.

Emitting an event creates a parent-child relationship between the originating event, and the event that was generated. Learn more about this.

For developers


  • "topic" – required, must start with user/ and look like user/foo/bar 
  • "data" – required, can be any JSON value
  • "run_at" – optional, can be a UNIX timestamp integer, or any string that can be interpreted as a datetime
  • "task_ids" – optional, can be an array of task ID strings, allowing you to specify a whitelist of tasks that should be allowed to respond to this event; can alternatively be given as "task_id", with a single string value

To learn more about "run_at" and scheduling events, see: Can I schedule tasks for the future?

If a given "run_at" value is in the past, the new event will be run immediately.


This task emails a customer daily until their order is paid.




{% if event.topic == "user/orders/unpaid_reminder" %}
  {% assign order = shop.orders[] %}
{% endif %}

{% unless order.financial_status == "paid" %}
  {% action "email" %}
      "to": {{ | json }},
      "reply_to": {{ shop.customer_email | json }},
      "subject": "Order #{{ order.order_number }} still needs to be paid",
      "body": "Please get in touch, stat!",
      "from_display_name": {{ | json }}
  {% endaction %}

  {% action "event" %}
      "topic": "user/orders/unpaid_reminder",
      "task_id": {{ | json }},
      "data": {
        "order_id": {{ | json }}
  {% endaction %}
{% endunless %}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.