src/events/onDecision.tsx
.addEvent(OnDecision). The app’s manifest lists every event it handles, and the
consent screen shows them to admins as “Gets told when…”.
Using Effect? See Events in the Effect guide.
The handler
defineEvent(name, handler) or defineEvent(name, options, handler). The handler receives the event
payload’s fields at the top level (here decision) plus:
Payloads are listed in the event catalog.
Which installs receive an event
An install receives an event only when all of these hold:- The installed version’s manifest lists the event, because the app added it.
- The install holds the event’s read scope:
decisions:readfor decisions,calls:readfor call recaps,conversations:readfor posts, replies, mentions, reference occurrences and the structure Reintersect finds in chat (message.filed,conversation.updated,conversation.agreed). Subscribing adds the scope for you. - Your app can reach the circle the event happened in:
app.mentioned reaches a workspace install in any circle that isn’t connected, because a mention is
an explicit invitation; it also invites the app to that circle from then on. Your app never receives
events about its own replies and blocks.
The same rule limits where your app can write. See
Install and consent.
Delivery
Events travel on the lifecycle lane: a durable outbox that retries until your app answers.- Every delivery is signed. See Webhooks and security.
- Answer with any
2xxwithin 15 seconds. Anything else, or a timeout, is retried with jittered backoff from one minute up to six hours, up to 20 attempts. - Delivery is at least once. The SDK drops a repeated
webhook-idit has already handled in the same process; make handlers safe to run twice anyway. - Order isn’t guaranteed. Every object in a payload carries a
versionthat only increases: ignore an event whose version is older than one you already processed.conversation.updatedandconversation.agreedcarry the card’srevisioninstead: ignore a delivery whose revision is lower than the last one you saw for that conversation.message.filedcarries neither, so read the message’s conversation again if order matters to you. - Answering
410 Gonepauses deliveries to that install. After three days of continuous failures, Reintersect also pauses deliveries and emails the app’s owner (or the workspace owners). The developer resumes them from Settings → Developer → Apps → your app → Deliveries.