Hi folks, I have a question concerning POST action when a new member account is created. The open source CRM solutions I work with have campaign functionality, which allow the creaton of new contacts by using web forms. How could I integrate the necessary html code and js-Script into the related UNA forms, in order to forward the member data to such a CRM software like, for example, SuiteCRM, when a new member creates its person or organisation or an existing member updates or even deletes its data? Please find an example of such a webform of SuiteCRM attached. I know, this question is beyond the team's major focus, but since there is no other solution for data exchange available and that solution works on simple logic hook in SuiteCRM, maybe you could give me the right hint. Cheers, thomlin
If I've got you right and you need to transfer some user's info somewhere right after pressing the create account / profile action then you need to create the new module which will operate with proper alert handlers like sys_account->create, bx_persons->create etc. See the Alert class for the beginning https://github.com/unaio/una/blob/master/inc/classes/BxDolAlerts.php
Close, but not exactly, LeonidS. What you explain is the techy solution. Mine is the illiterate version. 😁 The POST action in the attached html triggers a script at the end of the html, which will send the form data to the CRM software which will then process the data. So, for me as a non-techy it would be easier to trigger that script at the same time when the profile creation or editing form is posted. Does that make sense to you?
Those callings are everywhere in UNA. So it means to add the processing of the necessary event you may just add the proper handler for it. The alerts handlers are introduced via MySQL commands like Dolphin connect has for example:
INSERT INTO `sys_alerts_handlers` SET `name` = 'bx_dolcon', `class` = 'BxDolConAlerts', `file` = 'modules/boonex/dolphin_connect/classes/BxDolConAlerts.php';
SET @iHandlerId := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_dolcon');
INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
('account', 'logout', @iHandlerId),
('profile', 'delete', @iHandlerId),
('profile', 'add', @iHandlerId);
So when an event like profile add or delete happen then it would be processed with the handlers from modules/boonex/dolphin_connect/classes/BxDolConAlerts.php too.
So it is the most proper solution for UNA.
Hope I could explain the possible ways and challenges :-)