Mechanic
đŸ“Ŗ Shopify REST Deprecation
  • â›Šī¸Introduction
  • 🤓Hire a Mechanic developer
  • đŸ’¯status.mechanic.dev
  • đŸ“ŖShopify is deprecating the REST API
  • 🙋"I need something custom!"
  • 🧑‍đŸ’ģ"I need help with my custom task!"
  • 🤖"I need help with my AI-written task!"
  • Resources
    • âŦ‡ī¸Install Mechanic
    • 🧑‍đŸ’ģTask library
      • Contributing
      • Requesting
    • 🚀Slack community
    • 🤝Partner directory
    • 🧠Tutorials
      • Video walkthroughs
        • Auto-tag orders by originating staff member
        • Maintain a tag for orders processed today
        • Auto-tag orders with their tracking numbers
        • Sync inventory for shared SKUs
        • Auto-tag products when their SKU(s) change
        • Auto-publish new products
        • Email a report of customers who haven't ordered in X days
        • Upgrading a Mechanic task: Adding a time delay
        • Email the customer when tracking numbers are added to their order
        • Adding an optional time delay to your Mechanic task
        • Delete all orders
        • Send an email when a specific product is shipped
        • Send recurring reminders about unpaid orders
        • Send an email when a product's price goes below its cost
        • Auto-tag customers by sales channel
        • Creating products in bulk
      • Creating a Mechanic webhook
      • Practicing writing tasks
      • Triggering tasks from a contact form
      • Creating scheduled CSV feeds
      • Fetching data from a shared Google sheet
    • 🏆Converting tasks from Shopify REST to GraphQL
      • Conversion: Single resource lookups
      • Conversion: Resource loops to paginated queries
      • Conversion: Connections from a resource
      • Conversion: Metafield lookups from a resource
      • Conversion: Resource lookups in task option fields
  • Core Concepts
    • Events
      • Topics
      • Parent and child events
    • Tasks
      • Subscriptions
      • Code
        • Environment variables
        • Action objects
        • Error objects
        • Log objects
      • Options
        • Custom validation
      • Previews
        • Defining preview events
        • Stub data
      • Shopify API version
      • Advanced settings
        • Documentation
        • JavaScript
        • Perform action runs in sequence
      • Import and export
      • User Form
    • Actions
      • Cache
      • Echo
      • Email
      • Event
      • Files
      • Flow
      • FTP
      • Google Drive
      • Google Sheets
      • HTTP
      • Integrations
        • Report Toaster
      • Shopify
      • File generators
        • Base64
        • PDF
        • Plaintext
        • URL
        • ZIP
    • Runs
      • Scheduling
      • Concurrency
      • Ordering
      • Retries
    • Interacting with Shopify
      • Responding to events
        • Reconciling missing events
      • Reading data
        • âš ī¸Liquid objects
        • 🏆GraphQL in Liquid
        • Bulk operations
        • The Shopify action
      • Writing data
      • Shopify admin action links
      • API rate limit
      • API versions
  • Platform
    • 🔆Policies
      • Data
      • Plans
      • Pricing
      • Privacy
    • Cache
      • Cache endpoints
    • Email
      • Receiving email
      • Custom email addresses
      • DMARC
      • Email templates
    • Error handling
    • Events
      • Event topics
      • Event filters
    • GraphQL
      • Basics
        • Shopify Admin API GraphiQL explorer
        • Queries
        • Mutations
        • Pagination
      • Bulk operations
    • Integrations
      • Appstle Subscriptions
      • Google Drive and Google Sheets
      • Judge.me
      • Locksmith
      • Report Toaster
      • Shopify Flow
      • Run links
    • Liquid
      • Basics
        • Syntax
        • Data types
        • Variables
        • Comments
        • Filters
        • Operators
        • Control flow
          • Condition
          • Iteration
        • Whitespace
      • Liquid console
      • Mechanic filters
        • Deprecated filters
      • Mechanic keyword literals
        • array
        • hash
        • newline
      • Mechanic objects
        • Action object
        • Cache object
        • Event object
        • Options object
        • Task object
        • âš ī¸Shopify REST Admin API
          • đŸšĢArticle object
          • đŸšĢBlog object
          • đŸšĢCollection object
          • đŸšĢCustomer object
          • đŸšĢDiscount code object
          • đŸšĢDispute object
          • đŸšĢDraft order object
          • đŸšĢFulfillment object
          • đŸšĢFulfillment order object
          • đŸšĢFulfillment event object
          • đŸšĢGift card object
          • đŸšĢInventory item object
          • đŸšĢInventory level object
          • đŸšĢLine item object
          • đŸšĢLocation object
          • đŸšĢMetafields
            • Metafield object
            • Metafield representation object
            • Metafield collection object
          • đŸšĢOrder object
          • đŸšĢOrder risk object
          • đŸšĢPrice rule object
          • đŸšĢProduct object
          • đŸšĢProduct image object
          • đŸšĢRefund object
          • đŸšĢShipping zone object
          • đŸšĢShop object
          • đŸšĢTheme object
          • đŸšĢTheme asset object
          • đŸšĢTransaction object
          • đŸšĢVariant object
      • Mechanic tags
        • liquid
        • action
        • assign
        • error
        • log
      • Mechanic code snippets
    • Shopify
      • Custom authentication
      • "Read all orders"
    • Webhooks
  • Techniques
    • Preventing action loops
    • Writing a high-quality task
    • Tagging Shopify resources
    • Debouncing events
    • Responding to action results
    • Working with external APIs
      • JSON Web Signatures
      • AWS request signatures
    • Finding a resource ID
    • Migrating templates from Shopify to Mechanic
    • Securing Mechanic webhooks
    • Monitoring Mechanic
  • FAQ
    • The app isn't loading. What do I do?
    • How do I stop a large batch of runs?
    • A Shopify event is missing. Where is it?
    • Does Mechanic have an affiliate program?
    • Can non-owners install Mechanic?
    • Can I replace Shopify's order emails with Mechanic?
    • Can I manually set Shopify permissions for Mechanic?
    • Does my theme need to be updated for Mechanic?
    • Do you have a plan for development stores?
    • Why don't I see any events in my task's activity?
    • Can I read data back from my webhook submission?
    • My task added a tag, but now the tag is missing – why?
    • How do I add an unsubscribe link to my emails?
    • How do I send images with my emails?
    • Can I re-send order confirmation emails with Mechanic?
    • Why am I seeing a different price than on the app store?
    • Do you have a Partner-friendly plan?
    • Why are my tasks delayed or not running?
    • My task is failing because of a permissions problem. Why?
    • How do I preview email attachments?
    • Can I query external APIs?
    • Why can't I access the Shopify API during preview mode?
    • How do marketing preferences work with Mechanic?
    • Can I send data to Google Sheets?
    • What's possible with timeline comments?
    • I'm getting a "query param length is too long" error when using GraphQL.
    • Can my Mechanic concurrency limit be raised?
    • What IP address does Mechanic use?
    • Can Mechanic read or manage customer subscriptions?
    • Why is everything harder now?
    • Can task content be translated into multiple languages?
    • Can I add a time delay to my task?
    • Can I add another store to my existing Mechanic subscription?
    • How can I reduce memory usage of my task?
    • How do I connect PayPal to Shopify with Mechanic?
    • How do I add a Shopify access scope to my task?
    • Can I have my Mechanic data retained for more (or less) than 15 days?
Powered by GitBook

Important Updates

  • đŸ“Ŗ Shopify REST Deprecation
On this page
  • What is Report Toaster?
  • Terminology
  • Action
  • Report
  • Update
  • Event topics
  • report_toaster/reports/create
  • report_toaster/reports/fail

Was this helpful?

Edit on GitHub
Export as PDF
  1. Platform
  2. Integrations

Report Toaster

PreviousLocksmithNextShopify Flow

Last updated 1 year ago

Was this helpful?

Mechanic allows developers to integrate directly with to retrieve and update data. Use Report Toaster's powerful reporting engine to retrieve and operate on your Shopify data.

Report Toaster is offered by . Get assistance with this integration at , or by emailing .

What is Report Toaster?

Report Toaster is a Shopify app that allows merchants to access their data in ways not possible via the Shopify Admin.

From :

Introducing Report Toaster, created by Cloudlab. The most powerful reporting and analytics app available for Shopify merchants. Access any data in your store to create, schedule and export custom reports across all of your sales channels. You can also select from our list of over 80 pre-built reports.

Terminology

Some terms to know when using Report Toaster.

Pre-Built Reports

Any report that comes included when the Report Toaster app is installed. Report Toaster includes over 80 pre-built reports.

My Reports

The set of reports customized and saved by a Report Toaster user. Each account will have its own unique set of "My Reports".

Report ID

Used to uniquely identify any Report Toaster report. Found in the URL when navigating to a specific report, as in the example below with the Report ID being v_qygPGcofjQ.

https://reporttoaster.cloudlab.com/my-reports/v_qygPGcofjQ

Action

The Report Toaster integration includes a report_toaster action which can be used to perform one or more operations on data within Report Toaster.

This action accepts two options, one specifying a Report Toaster operation, and the other varying based on the specified operation.

Option
Description

operation

Required; The name of the operation to run as part of the Report Toaster action. Available types are "report" and "update".

Required; see specific usage documentation

Report

The Report operation is used to run a report using the Report Toaster engine. The report can be from Pre-Built reports or My Reports.

This operation is most useful in concert with the report_toaster/reports/create webhook, by which a task may take the resulting report and pass to another service, or parse to complete additional tasks.

Report results can be returned inline, in which case there will be a 10MB limit. Alternatively, a file URL can be returned in a variety of formats.

Operation option
Description

reports

Required; an array of objects defining the reports that will be executed. See below for the report options.

Report object definition

Report option
Description

id

Required; a string specifying the unique identifier for a pre-defined report to be executed

file

Optional; an object describing a file to be returned when inline JSON results are not desired. Available file formats are "json", "csv", and "pdf"

meta

Optional; an object providing context for the report execution. This value will be returned with the report_toaster/reports/create webhook

Basic Example: Single operation returning JSON Data (limit 10 MB)

{% action "report_toaster" %}
  { 
    {% comment %}
      Generate one or more reports. When each report is complete, a
      'report_toaster/reports/create' event will be created with the result.
    {% endcomment %}
    "operation": "report",
  
    {% comment %}
      This batch array identifies one or more reports to be run.
    {% endcomment %}
    "batch": [
      {
        {% comment %}
          The id of one of your 'My Reports'. This id is on the query string
          when you run the report in Report Toaster.
        {% endcomment %}
        "id": "vVYKue9k7P",
  
        {% comment %}
          Optional custom context that will be returned with the report
          data in the 'report_toaster/reports/create' event.
        {% endcomment %}
        "meta": {
          "internal_request_id": "something something",
          "task_id": {{ task.id | json }}
        }
      }
    ]
  }
{% endaction %}

Basic Example: Batch operation - return one CSV file and two JSON

{% action "report_toaster" %}
  {
    {% comment %}
      Generate one or more reports. When each report is complete, a
      'report_toaster/reports/create' event will be created with the result.
    {% endcomment %}
    "operation": "report",

    {% comment %}
      This batch array identifies one or more reports to be run.
    {% endcomment %}
    "batch": [
      {
        {% comment %}
          The id of one of your 'My Reports'. This id is on the query string
          when you run the report in Report Toaster.
        {% endcomment %}
        "id": "v_t3a23v4e23",

        {% comment %}
          Optionally set this to create a download link to the report data
          instead of returning the report data in the event. Options are
          'json', 'csv' and 'pdf'. If csv then include_headers can be used
          to turn headers on/off - they are included if ommitted
        {% endcomment %}
        "file": {
          "format": "csv"
         ,"include_headers": false
        },

        {% comment %}
          Optional custom context that will be returned with the report
          data in the 'report_toaster/reports/create' event.
        {% endcomment %}
        "meta": {
          "internal_request_id": "something something",
          "task_id": {{ task.id | json }}
        }
      },
      { "id": "v_123" },
      { "id": "v_456" }
    ]
  }
{% endaction %}

Update

The Update operation is used to update some data in the Report Toaster dataset. Results will be returned as part of the standard mechanic/actions/perform webhook.

The update operation will be limited to attributes that are intended for update via external sources.

Operation option
Description

[the name of the model to be updated; currently, only "Order" is supported]

Basic Example: Update shipping costs

{% action "report_toaster" %}
  {
    {% comment %}
      Update operation to update values in Report Toaster
    {% endcomment %}
    "operation": "update",

    {% comment %}
      Update any number of orders with their corresponding shipping costs 
      and/or transaction fees
    {% endcomment %}
    "Order": [
      { "id": 4192644956357, "shipping_cost": 6.54 },
      { "id": 4192637419717, "transaction_fees": 5.32 },
      { "id": 4192651182277, "shipping_cost": 4.76, "transaction_fees": null }
    ]
  }
{% endaction %}

Event topics

The Report Toaster action sends webhook events to Mechanic, reporting back on the results of an action.

report_toaster/reports/create

Occurs when a Report Toaster report has been created and is available for download.

Basic Example: Return JSON data

{
  "id": "vVYKue9k7P",
  "name": "30-Day Summary", 
  "data": {....},
  "meta": {
    "internal_request_id": "something something",
    "task_id": "fc3872b8-66a0-4ffb-bcaf-6f1b4a966aba"
  },
  "definition": {....}
}

Basic Example: Return file

{
  "id": "vVYKue9k7P",
  "name": "30-Day Summary", 
  "file": {
    "format": "pdf",
    "url": "https://example.com/report.pdf"
    "size": 1234567
  },
  "meta": {
    "internal_request_id": "something something",
    "task_id": "fc3872b8-66a0-4ffb-bcaf-6f1b4a966aba"
  },
  "definition": {....}
}

report_toaster/reports/fail

Occurs when a requested Report Toaster report has failed.

Basic Example

{
  "id": "vVYKue9k7P",
  "name": "30-Day Summary",
  "error": {....},
  "meta": {
    "internal_request_id": "something something",
    "task_id": "fc3872b8-66a0-4ffb-bcaf-6f1b4a966aba"
  },
  "definition": {....}
}

[varies, see or usage]

Required; an array of update objects which use the format. Current limitations are as follows: 1. The "id" attribute must be used to identify an Order. 2. Currently only "shipping_cost" and "transaction_fees" can be updated.

Report Toaster
Cloudlab
support.cloudlab.com
support@cloudlab.com
Report Toaster's app store listing
Merge/Patch
Report
Update