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
  • Residency
  • Retention of events
  • Examples

Was this helpful?

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

Data

PreviousPoliciesNextPlans

Last updated 8 months ago

Was this helpful?

Residency

Mechanic stores all data in the US, on encrypted volumes provided by Crunchy Data and AWS. Data encryption keys are managed by Crunchy Data.

For more details, see Crunchy Data's documentation.

Retention of events

An event is retained for a default of 15 days after the event is considered "complete" (see definition below). This interval cannot be changed for a Mechanic account. Expunged data may persist in encrypted database backups for a limited period of time.

If you want to have your data retained for longer, start here:

For stores that have uninstalled Mechanic, events will be retained for the same retention period after the event's latest activity, whether or not an event is "complete".

Retained event information includes:

  • Event data (for Shopify events, this means the payload of the related webhook)

  • Task runs for those events (i.e. the result of rendering task Liquid with the related event data)

  • Action runs for those events, and their results

For the purposes of data retention, an event is considered "complete" when all of the following are true:

  1. The event has no related runs which are pending (i.e. event/task/action runs that have neither succeeded nor failed)

  2. The event's descendent events, up to five generations, have no related runs that are pending (see )

The content of event data varies based on the tasks configured for your Mechanic account. A task that monitors customer events will result in Mechanic storing customer data, for example. Similarly, a task that monitors order events will result in Mechanic storing order data (which includes customer data). However, tasks that simply scan orders or customers in bulk (perhaps on a schedule, or upon request) may not necessarily store order or customer data.

Examples

Immediate deletion

  1. A customer creates an account.

  2. Shopify sends Mechanic a customer creation event, containing all of that customer's data.

  3. A merchant-configured Mechanic task sends that customer an email; no other activity is performed.

  4. 15 days later, by policy, Mechanic deletes the customer creation event (which contain the customer's data), and the related runs (which contain everything needed to send them the email).

Delayed deletion

  1. A store staff member creates a customer order.

  2. Shopify sends Mechanic an order creation event, containing the order's data and the customer's data.

  3. A merchant-configured Mechanic task is scheduled to run 30 days in the future, at which time it will send a follow-up customer email.

  4. 15 days after the order was created, Mechanic checks the order creation event, and discovers that a task run is still pending. The event is not deleted.

  5. 30 days after the order was created, the task runs, generating an "email" action run which sends the customer follow-up later.

  6. Shortly thereafter, Mechanic checks the order creation event, finds that all related runs have been completed, and deletes the event (which contains the order's data and the customer's data), and the related task and action runs (which contain all details for the customer follow-up email).

Recursively delayed deletion

  1. A store has an unusual data retention period: their Mechanic account is configured to delete events after 1 day.

  2. A customer is tagged "member".

  3. Shopify sends Mechanic a customer update event, containing all of that customer's data.

  4. A merchant-configured Mechanic task observes this event. Noting the addition of the customer tag, this task checks the both the current event and the last 5 events (keep reading) to ensure that the customer has placed at least 1 order every 24 hours, untagging if they have not. The task observes that there is no parent event, so the only activity it performs is to schedule a follow-up event for 1 day later. The follow-up event's data includes the customer's ID, and their current number of orders.

  5. 1 day after the customer was tagged, the task runs again. It queries Shopify for the customer's updated order count. It compares this number with the order count provided by the current event (which it had scheduled for itself earlier). Observing that the customer has placed 1 more order since last time, the task leaves the "member" tag in place, and schedules a follow-up event for 1 day later. As before, the follow-up event's data includes the customer's ID, and their current number of orders.

  6. Shortly thereafter, Mechanic checks the original customer update event. It discovers that the event's runs are all completed. It notices that the event has a child event (i.e. the event scheduled in step #3), who also has all of its events completed. It notices that the child event also has a child event (i.e. the event scheduled in step #4), and that this event has a pending run. Therefore, Mechanic does not delete the original event.

  7. 2 days after the customer was tagged, steps #4 and #5 are repeated.

  8. 3 days after the customer was tagged, steps #4 and #5 are repeated.

  9. 4 days after the customer was tagged, steps #4 and #5 are repeated.

  10. 5 days after the customer was tagged, steps #4 and #5 are repeated.

  11. 6 days after the customer was tagged, step #4 is repeated. However, when Mechanic checks the original customer update event, it finds that the 5 following generations of child events all have completed runs. At this time, the original customer update event is deleted (containing the customer's data), along with its related task and action runs (containing the customer ID and then-current order count). Every day thereafter, until such time as the customer fails to place an order during the previous day, Mechanic will delete one additional event, and its related runs.

Deletion after Mechanic is uninstalled

  1. A store staff member creates a customer order.

  2. Shopify sends Mechanic an order creation event, containing the order's data and the customer's data.

  3. A merchant-configured Mechanic task is scheduled to run 90 days in the future, at which time it will send a follow-up customer email.

  4. The next day, Mechanic is removed from the store's apps list.

  5. 15 days later, because Mechanic has been uninstalled, Mechanic deletes the order creation event even though it is not considered complete.

🔆
Security
Can I have my Mechanic data retained for more (or less) than 15 days?
Parent and child events