Liquid console
Test Mechanic Liquid code in a live scratchpad — experiment with filters, inspect event data, and debug task logic without creating a task.
Last updated
Was this helpful?
Test Mechanic Liquid code in a live scratchpad — experiment with filters, inspect event data, and debug task logic without creating a task.
The Liquid console is a scratchpad for testing Mechanic Liquid code. It's available in the footer of every page of the Mechanic app — look for it at the bottom of the screen.
Type any Liquid code and the console runs it after you edit, showing the output after a short delay. This is useful for experimenting with filters, testing snippets from a task, or inspecting data available for a specific event. Use Reset to clear your scratchpad, Documentation to open the Liquid docs, or Ask Mechanic when you want help using the console.
Most Mechanic users don't need the Liquid console day-to-day. It's mainly useful when writing or debugging task code, or when support asks you to inspect event data.

The console can make Shopify Admin API requests (up to 10 per submission), which task previews cannot. However, it has tighter memory limits than actual task runs. If you reach a limit, try testing your code in a task subscribing to mechanic/user/trigger instead.
When viewing a specific event in the Mechanic app, the console has access to that event's data — the same variables your tasks had when they processed it. This makes it a useful debugging tool.
For example, on a shopify/orders/create event page, you could use {% log order.line_items[0] %} to inspect the contents of an order's first line item.

Looking at a child event? Try using {% log event.parent %} in the console to inspect data available from the parent. Or, to examine data from an ancestor event further back, try {% log event.parent.parent %}.
Last updated
Was this helpful?
Was this helpful?