Subscriptions control what events a task responds to. They have two pieces:

  1. The event topic
  2. Optionally, a time delay

Event topics are plentiful. Time delays can be in minutes, hours, days, weeks, months, or years.

Standard subscriptions

By default, subscriptions are specified as a simple list, separated by newlines. This is the easiest way to establish when a task is supposed to run.

Examples

  • shopify/customers/create 
  • mechanic/scheduler/tuesday+9.hours 

Liquid subscriptions

By clicking the "Enable Liquid" link in the subscription editor, you can start editing your subscriptions using Liquid code.

Combined with the options object, this creates a powerful mechanism for subscribing tasks based on merchant configuration. This means subscriptions can be conditionally added and dynamically generated.

When composing your Liquid subscriptions, make sure that one event subscription is given per line.

Examples

shopify/orders/create

{% if options.send_email_when_order_cancelled__boolean %}
  shopify/orders/cancelled
{% endif %}
shopify/orders/paid+{{ options.days_to_wait_before_followup__number_required }}.days
Did this answer your question?