More granular preference options with conditions

When working with preferences, you’ll sometimes run into advanced use cases where you need to provide even more granular preference options for your customers. For example: you may want to let a user mute notifications about a given resource in your product. That’s where preference conditions come into use in the Knock model: they provide a powerful way for you to add extra logic that’s computed during preference evaluation per recipient.

You can now apply a set of conditions to an individual category, workflow, or channel type preference, which will need to return true to send the notification out. The conditions you create can reference properties in your data payload or on the recipient. Here's an example of a condition where we only send a notification if the current resource is not in a list of muted ids for a recipient:

{
  "argument": "data.pageId",
  "operator": "not_contains",
  "variable": "recipient.mutedPageIds"
}

Read the documentation to get started →

More accurate email previews

We know making sure you see an accurate preview for your notifications is crucial when creating your notifications. Previously, we had rendered a close approximation of your emails on the client, but there were some cases where what you would see in the preview tab would differ from what you'd see when you ran a test.

From today we now render the emails on the backend, applying the same set of transformations to the email as you get before it's delivered to your users. This means a much more accurate previewing experience, CSS warts and all #htmltables4eva.

Fixes and improvements

  • 👀 We now show you the variable pane on our workflow builder, with a new button in the top bar to toggle the variable pane on and off in both the builder and the message template editor
  • 👀 We moved the action menu in the email template editor into the top bar, cleaning up the UI
  • 🐛 We fixed an issue where our users.identify and objects.set endpoints weren't correctly upserting data
  • 🐛 We fixed an issue with attachments on AWS SES not coming through correctly
  • 🐛 We fixed an issue in our Elixir SDK where calling the Users.get_feed/3 endpoint with no options would cause an error