A transformation lets you modify the payload of a webhook prior to delivery.
Transformations are a preview feature, and should not be used for mission-critical use cases at this time.
By using transformations in preview, you accept that:
- You are limited to 1 million transformations per month.
- Your transformations can be disabled at any time without prior notice.
- The Hookdeck team may view and audit your transformation code (but not your environment variables).
- The Hookdeck team might introduce backward-incompatible changes to the transformation functionality or API.
- Events that trigger transformation issues cannot be retried yet.
How transformations work
You can use transformations to change payload formats (e.g. converting XML to JSON); unify models across sources (e.g. conforming WooCommerce orders and Shopify orders to a single standard); add compatibility with an API (e.g. by adding keys or reformatting the payload); and more.
Filter rules are run after any transformation has been performed.
Transformations have some important limitations to keep in mind.
- The transformation runtime cannot perform any IO, or access any external resources such as the network or file system.
- The execution runtime is limited to 1 second.
- Transformation code is limited to 100 KB.
- Transformations run in environments known as isolates, which carry their own set of limitations, detailed below.
Isolates deliver a host of performance and security advantages, but they also come with some noteworthy limitations.
While external JS libraries can be bundled with webpack for use inside your transformations, not all bundled libraries will function out of the box. Libraries that call unsupported APIs (such as the Node.js API) may require shimming using polyfills as a means of adding support. And for some libraries, this workaround may not function due to other limitations, such as:
- dependencies for which polyfills cannot add support.
- resource limitations.
- process timeouts.
In the event that memory or time limits are exceeded, the isolate will terminate the execution of your code.
Guide To Zendesk Webhooks Features And Best Practices
In this guide, you will learn about Zendesk webhooks features, their behavior and what are the best practices for working with them.