GithubHelp home page GithubHelp logo

mechanic-docs's Introduction

description
I'm glad you're here. :) –Isaac

⛩ Introduction

Mechanic is a Shopify development and automation platform.

{% hint style="info" %} Find Mechanic on the Shopify App Store: apps.shopify.com/mechanic {% endhint %}

Can Mechanic help me?

Mechanic is a Shopify development and automation platform, which comes with a rich library of pre-written automation tasks – and our users write their own custom tasks every day. Let's find out if Mechanic might work for you.

  1. Are you working on something Shopify-related?
    • Mechanic is only available for Shopify.
  2. Is what you're looking for already available from Mechanic's task library?
    • We have hundreds of common scenarios already handled with pre-written, open-source, modifiable, off-the-shelf tasks.
  3. As far as your problem concerns Shopify data, is what you want to do supported by the Shopify Admin API?
    • Mechanic's toolkit goes beyond Shopify's APIs, but a Mechanic task can only interact with Shopify data in ways that Shopify supports.
  4. Are you open to going custom?
    • Whether you need a developer or already have that covered, the path to creating a custom Mechanic task is well-established.

That list wasn't exactly a formal flowchart, but we hope it's helpful as you're evaluating Mechanic for your purposes. At its best, Mechanic is a platform and toolkit that you go to, and return to, when you hit the limits of the Shopify admin. And it's a community that collectively has learned how to solve many, many kinds of problems. (Join our community Slack workspace!)

{% hint style="info" %} Got a question you need answered now? Join our Slack workspace. 💬 {% endhint %}

How does Mechanic work?

Tasks, events, and actions

A developer writes tasks – Mechanic's term for a piece of automation. These tasks can respond to many different events, like a Shopify webhook, a manual trigger, a regular interval (e.g. hourly, daily), or an incoming email. Tasks use subscriptions to signal their interest in specific event types.

When a task receives an incoming event, it can choose to generate an action – an operation that has an effect.

  • The Shopify action makes changes to a Shopify store, like tagging, publishing, creating or deleting resources. It provides direct and complete access to Shopify's admin API, with support for both REST and GraphQL.
  • The Email action is for sending email. It supports custom templates, and attachments.
  • The FTP action is for uploading files to an FTP or SFTP server. These files may be generated by the task, or can be fetched from external locations.
  • The HTTP action performs any request, to any HTTP endpoint. This facilitates integration with third-party APIs.
  • The Files action generates a variety of file formats, including PDF, CSV, ZIP, and anything retrieved from a public URL. Files generated this way receive a temporary URL of their own, and can be fed into other tasks for further processing.

For a complete list of supported actions, see Actions.

Liquid

Mechanic makes heavy use of Liquid – a template language created by Shopify. Its primary use is in task code. In the same way that a Liquid theme receives browser requests and renders HTML, a Mechanic task receives events, and renders actions (by defining them with JSON).

In Mechanic, our Liquid implementation includes additional support for constructing arrays and hashes, and includes many useful filters, making data processing more efficient.

Run queues

Mechanic performs work using queues of runs, with no limit on how large each queue can become. If there is a sudden surge of incoming events for a Shopify store, the store's dedicated Mechanic queue could become delayed. This is an important difference between Mechanic and many other systems: in a high-traffic period, Mechanic will never refuse incoming events for a store; instead, it will process each one as soon as possible, by putting them into a run queue. The rate at which Mechanic processes work varies, depending on concurrency and the Shopify API rate limit.

mechanic-docs's People

Contributors

ericabee avatar gitbook-bot avatar isaacbowen avatar mattsodomsky avatar paulnewton avatar tekhaus avatar timdmackey avatar tonegolf71 avatar tristantekkon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.