Custom Web Logic Hooks or custom events

Hi All

Ive used a few Web logic hooks to send data out to our services server but now have the need to do something more custom. I can achieve what i need with a before save and after save hook that can compare fields and then send the data via curl.

I just wandered if this was the best way or is there a way to create a custom trigger event which would make it easier for our sugar admins to manage the web hooks

Also does anyone know where the core functions are that sugar uses when you create a web logic hook, just interested how they do it

Parents
  • Hi John, 

    There is a tool to configure logic hooks easily in graphic designer - it's purpose is exactly to make Sugar subscriber's admin a superhero in configuring Sugar. 

    Data validation checks and sending results to external systems is that could be delivered with it, moreover -  you can even configure a middleware-based integration for Sugar with it. 

    The tool is called Logic Builder - a cloud designer which is avaliable here:  https://logicbuilder.integroscrm.com

    I suppose you may find a lot of examples of Logic Builder application here in the Club

    However, if you like to try it out I would suggest a step-by-step guide on how to deliver an example of the solution from scratch in 15 min - https://integroscrm.com/sugarcrm-video-tutorials-and-webinars/#ppsShowPopUp_125

    You would need to sign up here logicbuilder.integroscrm.com then just repeat the steps suggested in the video

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

  • thanks for the info, i have tried looking at this system but not getting the confirmation email. I do like to see the code in sugar though just to understand how it ticks, hence asking about the code

  • Hi John

    Regarding your ask about the code, have a look at modules/WebLogicHooks/WebLogicHook.php. It's pretty much self-contained in the class.

    Now, I think you can imagine that there are various ways to achieve what you want, and you can surely do it via an after-save hook, but one approach you alluded to could be viable.

    I'm referring to the definition of a custom event. I've been thinking about custom events lately as they can be an approach to gather related business logic into a finer-grained event instead of something generic like an after-save event. 

    One benefit of the custom event is that you can control when the event should be triggered, which means you can fire it from anywhere like a scheduled job, an API, or even from an orchestrator type after/before save logic-hook. Additionally, you would also be able to pass process variables when triggering the event, which your hook classes would have access to across the event execution.

    Just a thought. 

    I hope it helps.

  • Hi Hector, John

    Totally agree! According to my experience, that works perfectly when configuring integrations

    So you may do that in 3 steps 
    1) declare a custom endpoint like this:


    2)  configure a custom behavior for the declared endpoint, e.g. calculate a total number of Calls+ number of Meetings for the given Account Name, it looks like this :


    3) generate zip in a click and install zip to your Sugar via Module Loader

    So when you call the endpoint via API it performs the logic you need - calculates the number and returns the value as output!



    That is truly amazing what you can do with Sugar architecture!

    And it takes just 15 min ON THE FLY to get the solution configured if you make it with low code tools like Logic Builder

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Reply
  • Hi Hector, John

    Totally agree! According to my experience, that works perfectly when configuring integrations

    So you may do that in 3 steps 
    1) declare a custom endpoint like this:


    2)  configure a custom behavior for the declared endpoint, e.g. calculate a total number of Calls+ number of Meetings for the given Account Name, it looks like this :


    3) generate zip in a click and install zip to your Sugar via Module Loader

    So when you call the endpoint via API it performs the logic you need - calculates the number and returns the value as output!



    That is truly amazing what you can do with Sugar architecture!

    And it takes just 15 min ON THE FLY to get the solution configured if you make it with low code tools like Logic Builder

    Best Regards,
    Dmytro Chupylka

    integroscrm.com
    We make work in Sugar CRM system faster, more convenient and efficient

Children
No Data