Contact creation in CRM software when new community member ist created or updated

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

  • 1253
  • More
Attachments
Replies (5)
    • Hello 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?

        • I'll specify my thought. UNA has the alert system which means the places with the code like

          bx_alert($this->getName(), 'profile_created', 0, 0, array('override_result' => &$mixed, 'remote_profile_info' => $aProfileInfo));

          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.

          But you may insert the RAW block with your given HTML / Javascript code and place it on the profile's creation page and bound the submit "AusfГјhren" button with UNA "Submit" there. On a quick look, the button in your example has the submit_form() function's call onclick. So it should be added to our button too. 

          Hope I could explain the possible ways and challenges :-)

          • Thanks buddy, you did. I will give a try to the HTML/js code version with RAW block and if I fail with that, I'll dig into the mystrious world of the alert system. 😉 

            • Or I better wait for the UNA CRM module. Just heard that news in today's streaming session with Andrew and Alex.

              Login or Join to comment.