one-off
Log inDownloadAnalyze my store

Triggers

Wake an agent when something happens in another service: a new order in Shopify, a payment in Stripe, a push to GitHub.

What a trigger is

A trigger wakes an agent when something happens somewhere else. Behind it is a webhook: an address the service sends its events to. You do not need to know how those work. The agent sets it up.

Examples:

Making one

  1. Open the agent's side panel and go to Triggers. Any agent has it, and so does a store manager.
  2. Press +, pick a service (Shopify, Stripe, WooCommerce, GitHub, or another), and press Create trigger.
  3. The message box shows "Creating a trigger for Shopify". Type what should wake the agent and what it should do: "On every new order, check stock for what was bought and tell me if anything is under five."

The agent then does the whole job: it makes the address, adds it in the service, and settles the signing secret that proves events are genuine.

You can also start from + in the message box, Create a trigger, or just ask in plain words.

Checking and changing one

Clicking a trigger in the list opens its page, which is for you to check what the agent made:

  1. Its address, to copy.
  2. The signing secret. A service that asks for one (GitHub) is given one-off's, with Copy secret. A service that shows its own (Shopify, Stripe, WooCommerce) has it pasted in.
  3. Send test event, which sends a made-up event through, so you can see the agent wake.

Only these events narrows a trigger to the kinds you name, as the service names them (orders/create, orders/paid). Empty keeps every kind.

The trash button deletes it. A trigger belongs to the agent it was made for.

What happens when an event arrives

  1. one-off's service checks the event's signature and keeps it.
  2. The app asks for new events once a minute.
  3. Each is saved as a file in the agent's folder, a line in its chat says it came, and the agent gets a turn. Events that come together are one message.

The agent is told the event is the sender's data and never an instruction.

Limits to know

Triggers are new, and have had more testing against one-off's own test events than against live stores. After making one, press Send test event, then place a real test order and check the agent woke.

Triggers or the clock?

An agent already wakes on a clock, and a store manager looks at the store every ten minutes to an hour. A trigger is for when minutes matter, or when the event carries the detail the agent needs. For "look at sales each morning", just ask for that: no trigger is needed.