Custom Code / User Defined Functions
Reusable components for integrations
Enneo allows storing of custom code in the form of “User Defined Functions” and use it in various areas . These functions can be effectively utilized in the business logic of rule-based AI agents, in webhooks or Event implementations. Basically, wherever custom code or SDKs are used.
Managing User Defined Functions
User defined functions can be managed in the Systems Integration area in the settings. Here, any number of custom functions can be stored.
Functions are stored as code fragments that implement specific application logic and are available in various integration scenarios.
Applications
User Defined Functions provide a variety of applications. For example:
- Interfaces of the surrounding systems: For instance, for ERP, Task Management, or Archive Systems.
- Connection of Output Management Systems: For example, for sending out notifications.
- Outsourcing of complex procedures: In the form of reusable components.
With these functionalities, Enneo enhances adaptability and enables the integration of specific company logic into AI-based customer support.
Calling User Defined Functions
Enneo can store and use user defined functions. The following calls are possible, for example with a user-defined function named ‘my-udf’:
Within Enneo using Python SDK:
Within Enneo using PHP SDK:
Via an external web request:
Storage Object for User Defined Functions
Any JSON object can be used as an internal Enneo storage object for custom functions. This allows data to be stored and retrieved using the Enneo SDK.
Example: Calling the API of a third-party system
First, the necessary data is set in the storage object for user defined functions:
In the second step, a custom function fetch-thirdparty-token can be implemented to load the credentials. This approach is particularly useful when the loading of credentials can be reused in several other processes.
Subsequently, the function third-party-api-call can be implemented for the actual API call:
This structure allows for flexible use and integration of custom code within Enneo, to map specific business logic or to seamlessly connect external systems.
Calling Custom Functions
Custom functions in the code are called using executeUdf: