Add an email rule
add_email_ruleWhen something happens on one of the seller's checkouts, add the buyer to a tag or sequence (or automation, publication or group) in their connected email tool. when: sale (someone buys the checkout), order_bump (they add the order bump in the cart), upsell (they take the one-click upsell after paying), refund, subscription_cancelled, or checkout_abandoned (they typed their email on the checkout but hadn't paid wait_hours later; runs once per person and checkout, never for anyone who bought by then, never in test mode or on the seller's free trial, and only for emails typed after the rule was made). For example "order bump buyers → sequence X, upsell buyers → sequence Y, every sale → sequence Z" is three calls. With several order bumps or upsells, pass offer to pick one (its id from get_product, or its headline). Call list_email_options first for the exact tag and sequence names. Joining a sequence can start sending the buyer emails, so confirm the plan with the seller first. Applies straight away, also on a live checkout; the seller can pause or remove it under Automations, or with remove_email_rule.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"product": "<product>",
"when": "<when>",
"add": "<add>"
},
"name": "add_email_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | Yes | The tag, sequence, automation, publication or group, by its name or id from list_email_options. | |
| kind | No | Only needed when a tag and a sequence share a name. | |
| when | Yes | ||
| offer | No | Only for order_bump or upsell: which one, by id or headline. Omit for any. | |
| account | No | Only to work in a client's account: its id from list_accounts. Leave it out for your own account. | |
| product | Yes | The checkout's id or slug. | |
| emailTool | No | Only needed with more than one email tool connected: its id or type (e.g. kit). | |
| wait_hours | No | Only for checkout_abandoned: how many hours after they typed their email, if they still haven't paid. Default 24. |