Trickle Docs
  • Trickle
  • Getting started
  • Frequently asked questions
  • Triggers
    • Scheduled trigger ready
    • Customer tags changed
    • Product tags changed
    • Order cancelled (deprecated)
  • Actions
    • Schedule trigger
    • Add order line item
    • Send advanced HTTP request (deprecated)
  • Extras
    • Hooks
  • Privacy Policy
Powered by GitBook
On this page
  • Hook URL
  • Optional query parameters
  • Request body
  • Notes
  • Examples
  1. Extras

Hooks

Allow incoming web requests to trigger your workflows.

PreviousSend advanced HTTP request (deprecated)NextPrivacy Policy

Last updated 3 years ago

Hooks allow you to start workflows from external systems, even if those systems don't have a Shopify Flow integration themselves. This lets you leverage the capabilities of Shopify Flow to apply logic and take action directly, rather than having to rely on an external third party workflow tool like as Zapier or Tray.

When you install Trickle, a unique hook URL for your store is generated. You can then send HTTP requests from anywhere to that URL, and a trigger will fire, allowing you to begin a workflow inside Flow.

Hook URL

You can find your store's unique Hook URL at the bottom of the application's home page once you've installed the application.

You can send any kind of HTTP request (GET, POST, PATCH etc) to your Hook URL. In addition to the required token and trigger name elements in the path of the URL, you can include some optional parameters, either in the query string or as a JSON object in the request body.

Optional query parameters

Parameter
Description

trigger_schedule

customer_id

If you provide a customer ID here, customer data will be available in the "Scheduled trigger with customer ready" trigger at the scheduled time.

order_id

If you provide an order ID here, customer data will be available in the "Scheduled trigger with order ready" trigger at the scheduled time.

product_id

If you provide a product ID here, customer data will be available in the "Scheduled trigger with product ready" trigger at the scheduled time.

Request body

If you provide a body in your request, it will be available in the "Scheduled trigger with custom data ready" trigger at the scheduled time.

If you don't provide any body in your request (eg, if it's a GET request), then the custom data trigger will still fire, but with the name of the trigger in the custom data field. (This is to ensure that at least one "Scheduled trigger ready" trigger fires from a hook request, even if there's no data besides the trigger name.)

Notes

If your request body is provided as a JSON object with customer_id, order_id, or product_id keys, those values will be treated the same as if they had been provided in query parameters.

Examples

GET request with order query parameter

This example would fire a "Scheduled trigger with order ready" trigger as soon as the request was made, with a Trigger name value of order_ready and the data for order 2080379863089 available in the workflow.

GET https://app.tricklexp.com/hooks/9WN1JEAgoZsjMf7gEkeAiEJv/order_ready?order_id=2080379863089

POST request with scheduling query parameters and request body

POST https://app.tricklexp.com/hooks/9WN1JEAgoZsjMf7gEkeAiEJv/signed_up_to_list?trigger_schedule=In 24 Hours
{
  "customer_id": 4532557414449,
  "message": "Thanks for signing up yesterday."
}

Hook URLs have the structure https://app.tricklexp.com/hooks/:hook_token/:trigger_name, where :hook_token is unique to your store and :trigger_name is a required name for the trigger (this is passed as Trigger name in the trigger and lets you differentiate between different incoming hooks).

When you would like the corresponding trigger to fire. Supports the same syntax as documented for the action. If you omit this parameter, the trigger will fire right away.

Scheduled trigger ready
Schedule trigger
Scheduled trigger ready