Event exports

We now support exporting JSON representations of events, including any associated task runs and action runs.

This is particularly useful for very large events, which may not be possible to display within the Mechanic app.

When such an event is too large to display, the event inspector will display an export prompt:

For all other events, exports are available at the end of the event's details:

Read more

Shopify Plus: Support for custom API passwords

In high-volume scenarios for Shopify Plus accounts, Mechanic's performance can be improved by creating a private Shopify app, having the same permissions that you've granted to Mechanic. Because this private app represents your explicit control and intent, Shopify can – at your request – grant it a higher API usage limit. By providing Mechanic with this private app's API password, you can extend this higher limit to Mechanic.

This setting is now available, for Shopify Plus accounts only.

Read more

Filter recent activity in place

Users may now modify the "Hide events that did nothing" and "Hide task runs that did nothing" options for any list of recent activity. This makes it much easier to quickly determine if events are coming through, or if a task is actually running but has simply decided not to generate any actions.

Find these options by clicking "Add filters", at top of any activity list.

The default values for these filters can be changed in the Mechanic account settings.

Read more

Retries are now available, for task and action runs

In general, Mechanic does not allow overwriting a meaningful result, once it has come into being. We're adding some flexibility to this, in the form of retries.

A retry is only ever available for…

  • … a task run which has failed, perhaps due to an API error
  • … a task run which has not generated any actions
  • … an action run which has failed

The retry button will only appear if a retry is possible.

Read more

New tags: "error", "log"

Mechanic has already supported surfacing task-level errors using {"error": ...} objects, preventing any actions from running and informing the user why. We have also held the convention of using {"log": ...} objects to record data that one might find useful while debugging.

Today, we formalize both usages and make available short-hand Liquid tags for making it easy to render both types of JSON objects. The "error" tag and the "log" tag have identical usage, accepting a single argument, an array of arguments, or a hash of arguments.

Examples

{% error "Something went wrong!" %}
{% error calculated_message %}
{% error "Something went wrong!", more_details %}
{% error message: "Something went wrong!", details: more_details %}
{% error %}{{ count | append: "things went wrong!" | json }}{% enderror %}

{% log "Something went wrong!" %}
{% log calculated_message %}
{% log "Something went wrong!", more_details %}
{% log message: "Something went wrong!", details: more_details %}
{% log %}{{ count | append: "things went wrong!" | json }}{% enderror %}

Read more

Liquid performance profiling now available

To help understand why a task script might be taking a long time to run, we now make Liquid's profiling feature available. Enabling this task option results in timing data being recorded for the Liquid rendering of a task run. For each Liquid statement, the line number and render time is recorded, lending insight into where time is being spent across the task script.

Read more

Mechanic now supports publishing to sales channels

Tasks may now publish and unpublish items to any sales channel in Shopify. No special task configuration is needed; simply write GraphQL queries and mutations that address publications.

Example tasks

Mechanic scheduler events now include the current time in {{ event.data }}

All mechanic/scheduler/* events generated now include the current date and time, in the store's local timezone. This value is available in {{ event.data }}, and looks like "2019-10-06T11:30:00-05:00".

The precision of our scheduler has also improved: its events much closer to 0th minute and second (rather than 1-3 minutes after, as was previously the case).

Version 2019-10 of the Shopify API is now in use

Tasks configured with a Shopify API version of "(use latest stable version)" will now call the 2019-10 Shopify API. (Note: this is the default setting for all tasks.)

All "shopify" events now use data serialized by the 2019-10 API.

Notably, the bulk operations API is no longer in beta. This means that tasks may use bulk operations to query Shopify without needing to use the "unstable" API.

Read more from Shopify

Shopify webhooks now use the 2019-07 admin API format

In anticipation of the promotion of 2019-10 to the latest stable version, we're (very belatedly) updating the Shopify API version used to serialize webhook data for Mechanic from 2019-04, to 2019-07. We chose to perform this update now, deeming it better than skipping a version entirely when we move to 2019-10 on October 1.

From Shopify's release notes for 2019-07, the only change that affects resource serialization is the addition of the "admin_graphql_api_id" attribute for many resources.