Repository navigation
Replies: 2 comments
|
Hey! How are you? Thank you for your proposal (and your patience). We've aligned on this app intent type and will be making it available soon! It'll land with a slight variation of your proposal but it should serve the same purpose. I'll let you know when it lands. |
0 replies
|
Hey @atyaglik! This is out!! #72 is merged. It landed as Actions are |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
1. What type are you proposing?
application/alert, with actionscreateandedit.An alert is a merchant-owned rule: when a store event happens (an order is paid, a variant hits low
stock, a checkout over $500 is created, a refund is issued), if it matches some filters, notify
these people over these channels, at most this often. The artifact is the rule, not a single message.
2. What do merchants ask Sidekick to do that needs it?
Merchants already ask Sidekick to watch the store for them. Today Sidekick can only answer with a Flow
workflow or an explanation; it can't hand the request to the alerting app the merchant installed for
exactly this. Examples:
edit)With
application/alert, Sidekick opens the app's alert editor pre-filled with the event, filters andrecipients it extracted, and the merchant reviews and saves.
Sidekick data tools already let apps answer questions about existing alerts ("which alerts watch low
stock?", "why didn't I get notified?"). The missing half is creating or changing an alert from the same
conversation: the data tool can return
gid://application/alert/<id>resource links, and aneditintent on the same type makes them actionable.
3. What apps would register intents for it?
checkouts, customers, fulfillments, refunds; delivered by email and Telegram.
The shape is the same across these categories: event + filters + recipients/channels + throttling.
4. What fields does it need?
A sketch; every field optional (no
required, per the catalog rules):idedit.nameenablededit.eventsorders/paid,refunds/create,products/delete); app-defined keys otherwise (inventory/low_stock). Apps should list their accepted values in their tool instructions.filtersrecipients{channel, address, name}channel:email,sms,slack,telegram,teams,push,webhook, or app-defined.address: email / phone / channel or chat handle.throttle{limit, period}limitnotifications perperiod(hour,day,week,month).schedule{days, times, timezone}daysas ISO weekday names,timesasHH:MM. Omitted = deliver immediately.filters(all optional,additionalProperties: true):productIdscollectionIdslocationIdsminAmount{amount, currencyCode}inventoryThresholdDraft schema:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://extensions.shopifycdn.com/shopifycloud/schemas/v1/application/alert.json", "title": "Alert Schema", "type": "object", "properties": { "id": { "type": "string", "description": "The alert ID" }, "name": { "type": "string", "description": "Merchant-facing alert name" }, "enabled": { "type": "boolean", "description": "Whether the alert is active" }, "events": { "type": "array", "description": "Store events the alert watches: Shopify webhook topics where available, app-defined keys otherwise", "items": { "type": "string" }, "examples": [["orders/paid"], ["inventory/low_stock", "inventory/out_of_stock"]] }, "filters": { "type": "object", "properties": { "productIds": { "type": "array", "items": { "type": "string", "pattern": "^gid://shopify/Product/" } }, "collectionIds": { "type": "array", "items": { "type": "string", "pattern": "^gid://shopify/Collection/" } }, "locationIds": { "type": "array", "items": { "type": "string", "pattern": "^gid://shopify/Location/" } }, "minAmount": { "type": "object", "properties": { "amount": { "type": "string", "description": "Decimal amount, e.g. \"500.00\"" }, "currencyCode": { "type": "string", "description": "ISO 4217 code" } } }, "inventoryThreshold": { "type": "integer", "minimum": 0 } }, "additionalProperties": true }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "channel": { "type": "string", "description": "Delivery channel", "examples": ["email", "sms", "slack", "telegram", "teams", "push", "webhook"] }, "address": { "type": "string", "description": "Email, phone number, channel or chat handle" }, "name": { "type": "string" } } } }, "throttle": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 1 }, "period": { "type": "string", "enum": ["hour", "day", "week", "month"] } } }, "schedule": { "type": "object", "properties": { "days": { "type": "array", "items": { "type": "string", "enum": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] } }, "times": { "type": "array", "items": { "type": "string", "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$" } }, "timezone": { "type": "string", "description": "IANA time zone; defaults to the shop's" } } } }, "additionalProperties": true }Example registration:
5. Anything close in the existing list?
application/email,application/campaign— one message or a marketing send to customers. An alertis a standing rule whose recipients are the merchant's own team, and email is only one of its channels.
application/ticket— a support conversation with a customer, not a rule.application/back-in-stock-alert(RFC) — shopper-facing signup for restock notifications. Sameword, different audience: customers opt in there; the merchant configures internal notifications here.
Worth keeping the names distinct;
application/store-alertis an option ifalertreads too broadly.application/report(RFC) — generating a report on demand. A scheduled digest of events couldsit in either; we'd keep
application/alertevent-driven and leave periodic reports toreport.an alerting app expect Sidekick to configure that app's alert (its channels, throttling, templates),
not to build a parallel Flow workflow.
All reactions