Hi Spice Community! I have a developer question.
Imagine on save of a new Contact, I would like to trigger a request to a third party system.
Could I develop a logic hook in Spice to do this?
Could I create a custom scheduler to do this by selecting all new contacts since last run, and send as a bulk request to my third party system?
In short, is there an extensible framework for the server side business logic? And if there is, can I package up my work and install into another Spice system?
Many thanks!
There are tree options to accomplish this
(1) logic hooks: they still exist. But have changesd slightly. The definition is int eh database and the call is not by include etc but simply by the full qualified class name (since we namespaced SpiceCRM bottom up in the php backend) plus the method.
(2) a schduler: also as you can see scheduler have been significantly reworked (load of more functions for dependencies between scheudlers, for fall backs, notifications for monitoring, no longer clogging etc.). Also scheduler tasks are defined by fully qualified class names and methods and can easily be extended. Also this is all now stored in the database.
(3) this can also be done with a Workflow. That can handle system tasks as well that trigger specific actions and work between the ui, the user and the backend.
Configuration can easily be transferred from one system to another by either the packages and deployment tools or the config transfer. Coding not yet but this will follow during this year that you can fully package this including the developed hooks and config and just deploy on other systems.
Thank you that’s interesting I’ll take a look at those three. Would it be considered best practice to place additional classes in the api/custom/ directory?
exactly … this is what they are there for. With the namespace they will be found and we have way more flexibility to use them. If your extension is a generic partner extension we also have the /api/extension directory where all standard extension that are not customer specific but sit on top of the core reside.