Skip to main content

Functions

Functions in th.care allow you to define reusable logic and operations that can be shared across apps and components. They enable you to encapsulate complex business rules, workflows, and data manipulations. th.care functions can be considered "the back end" of the application. They are still in their early days of development but have great promise to be a powerful tool for solution developers.

Functions can be triggered by hooks on forms. Essentially when a form is submitted, the function can be triggered from that submission with the form data that was submitted. The function can do whatever it needs to with that data and can call the solution API or trigger subsequent functions.

An HTTP request can also trigger functions. This would enable solution functions to integrate with client systems or other systems not part of the solution (hint, things like Thrive Gateway).

Functions are written in typescript, compiled to javascript, and run in a node environment. They are currently deployed as Azure Function Apps but will be able to be deployed to other environments in the future.