Slack roll-ups, webhook redelivery and scheduled notification sends
Busy workflows post to Slack once per 5 minutes with a count, throttled webhooks can be sent again, and a scheduled notification now waits whole.
Added
2- WebhooksA webhook delivery that was throttled, or skipped while its endpoint was auto-disabled, now keeps its event and can be sent again, once, with POST /api/organizations/webhooks/:id/deliveries/:deliveryId/redeliver. It goes out with its original event id and timestamp, so a receiver that dedupes on the id sees one event, and it counts toward your 240 deliveries a minute. It needs permission to update webhook endpoints, and a refusal answers 409 or 429 with a code. Before, such an event was lost for good.
- NotificationsA scheduled notification that has not gone out can now be cancelled with DELETE /api/v1/public/workspaces/:workspaceId/notifications/scheduled/:scheduledId, using the scheduledId a scheduled send now returns. Once it is going out, has gone out or was cancelled, that answers 409 SCHEDULED_SEND_NOT_PENDING. A scheduledAt more than 365 days ahead now answers 400, and a finished scheduled send's record is removed after 30 days.
Improved
4- NotificationsSlack alerts for Workflow instance completed and Workflow instance failed now post at most once per workflow every 5 minutes, each on its own clock. The next post says how many more runs completed or failed in the meantime, and if the workflow goes quiet, a summary with the count follows when the 5 minutes end. A count is kept through a Slack rate limit (429). Before, every run posted, and a busy workflow flooded the channel until Slack dropped other alerts.
- NotificationsBehaviour change: Workflow instance completed is now off by default for Slack alerts, and Workflow instance failed stays on. If you never changed your event selection, turn it on under Settings > Slack notifications to keep getting it; a selection you saved is followed exactly. The last event switch that is on can no longer be turned off, since an empty selection means the defaults. It says To stop all Slack posts, remove the webhook URL.
- NotificationsSlack alerts now name and link what they are about. Workflow published, paused and resumed link the workflow by name, and run completed and failed link the run too. Email and push campaign sent link the campaign, and push campaign sent counts recipients, not devices. Version move completed and cancelled open the move's page, where they led to Page not found before.
- WebhooksBehaviour change: payment.* and subscription.* events are now always delivered, even once your organization's 240 deliveries a minute are spent, so a customer who pays during a large campaign still reaches your backend. They still count toward the limit, so a burst of them makes other events reach it sooner.
Fixed
9- WebhooksBehaviour change: email.sent now fires for every email delivered for your app, not only for mail to an audience contact. It now carries campaignId and templateId when the message has them, and audienceId when the recipient is a contact. An endpoint subscribed to it will see more deliveries.
- Webhookssubscription.canceled and subscription.trial_expired now describe the subscription that ended. Before, their subscriptionId, status and plan could be replaced by the workspace's current subscription, often Free, so a receiver closing its record by subscriptionId closed the wrong one.
- WebhooksPeople who join through a hosted form or a newsletter sign-up now raise audience.member_created, with source form: when they are added, or at their first confirmation when the form asks for one. Workflows on Audience member created now start for them. Confirming still raises audience.member_updated as well.
- WebhooksThe webhook endpoint routes now answer 400 for an id that is not valid, instead of 503. GET /api/organizations/webhooks/:id/deliveries now answers 404 for an endpoint that is not your organization's, where it answered 200.
- WebhooksAn event BuildBase sends once, such as payment.succeeded for an invoice or email.opened for a message, no longer reaches your webhooks twice when it is raised twice at the same moment. A server that is restarting, as in a deploy, now waits a few seconds for the events it has just raised to be handed on to your webhooks, workflows and notification emails. Before, those could be lost.
- NotificationsA notification sent with data.scheduledAt through bb.notification.send() now waits whole until that time. Before, only the push waited, and the email went out at once. Event, channel and plan switches and each person's preferences are read when it goes out. The answer adds scheduled: true and scheduledAt, and a scheduledAt that is not a date answers 400 instead of quietly dropping the push. The console's test send refuses scheduledAt.
- NotificationsOne workspace's sends can now add at most 20 new notification types a day (UTC). A send of a further new type that day answers 403 NOTIFICATION_EVENT_NOT_SET_UP, which the SDK already handles. Types already set up keep sending, and an owner can still add one in the console. Before, any member's sends could register any number of new types for your whole organization.
- Push notificationsSending a push campaign twice at once, by a double click or two requests, now sends it once, and the second answers 400. A device that subscribes again no longer gets, and costs you, another welcome push.
- NotificationsPayment and refund alerts in Slack now show amounts by the currency's decimal places. A JPY payment showed a hundredth of its amount, and a KWD one ten times too much.