Validating workflow trigger data
The data you pass into your Knock workflows is essential to ensure your notifications have the right content and context. Previously, if you omitted a value or passed through the wrong type of data into your workflow triggers, you could lead to malformed or incorrect notifications. Given how critical this data is, we're rolling out the ability to validate the incoming data for your workflow trigger by providing a JSON schema that describes the expected data.
When provided, if the data does not match the schema the workflow trigger API will return a 422 Unprocessable Entity
response with a list of errors. This ensures that your workflows are not run should incorrect data be provided.
You can configure a validation schema for your workflow trigger under the "Trigger step" in the workflow builder. It's also possible to supply the workflow trigger schema via our management API and CLI via the trigger_data_json_schema
field.
Trigger data validation is available today to all Knock customers. Read our documentation to learn more about how this feature works.
Fixes and improvements
- 👀 We added support for MessageMedia as a new SMS provider
- 👀 We added support for event idempotency through source events (docs)
- 👀 We now expose
url
and any message interaction data to Segment and Heap for link click and interacted events respectively - 🐛 We fixed an issue where saving and committing a partial would not update the underlying schema
- 🐛 We fixed an issue where some JSON editors would not scroll correctly