Introduction to UDFs
User-defined functions (UDFs) let you extend the system and program the Twin Engine to perform operations that are not available through the built-in, system defined functionality. The Twin Engine supports the following languages for writing UDFs:
- JavaScript UDFs - View how to write UDFs using JavaScript and its available functionality
User-defined functions execute in a sandbox environment which is an isolated domain with limited execution time and resources.
Where can I use UDFs?
There are a number of resources which can utilize UDFs but only some can mutate data. Others are restricted to read-only mode, see the below table to find out more:
Name | Read-only |
---|---|
UDF Automation Action | ❌ |
UDF Automation Trigger | ✔ |
UDF Automation Condition | ✔ |
UDF Ingress Mapper | ✔ |
UDF Ingress Transformation | ✔ |
A number of built-in functions are not available in read-only mode. These are UDFs which are only to evaluate and read data, functions which mutate data will not be available in this mode.
All functions which are not available in read-only mode will have a warning.