| Table of contents |
|---|
Hooks are places inside a code file that allow functions in other code files to be run by having them hook into the current code.
When to Expose a Hook
It is best to expose a hook when you want a section in your custom code to be available to be hooked into by other code files. This exposed section will allow code to be run within your custom code file.
An exposed hook can be called from within the same module or from other custom modules. This makes hooks very versatile in how they are accessed within the Kayako suite.
When to Use a Hook
To determine if a hook should be used depends on the goal that needs to be achieved. If the functionality that is required to be added needs to manipulate or show data in a module that is not updated by you then utilizing a hook is recommended. This method preferred to manually modifying this code because when an update to the module is released the custom changed to it will not have to be re-added manually.
When a situation as described above is encountered then that is when using an available hook is recommended. If there is no hook available where one is required, a request will have to be made to add it. If the area that a hook is required is inside Kayako managed code see the Request More Hook Locations section for details on how to submit a request.a