<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Custom Web Logic Hooks or custom events</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/4441/custom-web-logic-hooks-or-custom-events</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Custom Web Logic Hooks or custom events</title><link>https://sugarclub.sugarcrm.com/thread/22204?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 14:21:08 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5ec440f2-9d81-40e8-992f-267f71da2e5d</guid><dc:creator>Dmytro Chupylka</dc:creator><description>&lt;p&gt;Hi Hector, John&lt;br /&gt;&lt;br /&gt;Totally agree! According to my experience, that works perfectly when&amp;nbsp;configuring integrations&lt;br /&gt;&lt;br /&gt;So you may do that in 3 steps&amp;nbsp;&lt;br /&gt;1) declare a custom endpoint like this:&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/1181x240/__key/communityserver-discussions-components-files/54/CaptureA2.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;2)&amp;nbsp; 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 :&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/1590x614/__key/communityserver-discussions-components-files/54/CaptureC2.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;3) generate zip in a click and install zip to your Sugar via Module Loader &lt;br /&gt;&lt;br /&gt;So when you call the endpoint via API it performs the logic you need - calculates the number and returns the value as output!&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="/resized-image/__size/1580x548/__key/communityserver-discussions-components-files/54/CaptureB2.JPG" /&gt;&lt;br /&gt;&lt;br /&gt;That is truly amazing what you can do with Sugar architecture!&lt;/p&gt;
&lt;p&gt;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&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Web Logic Hooks or custom events</title><link>https://sugarclub.sugarcrm.com/thread/22203?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 13:49:08 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:64d8d969-1176-4b73-8fdf-d2cf36a215de</guid><dc:creator>Dmytro Chupylka</dc:creator><description>&lt;p&gt;John,&lt;br /&gt;I won&amp;#39;t ask you to check the spam folder for registration email - we&amp;#39;ve activated your registration, you are welcome to&amp;nbsp;log in to&amp;nbsp;&lt;a href="https://logicbuilder.inegroscrm.com"&gt;https://logicbuilder.inegroscrm.com&lt;/a&gt;&amp;nbsp;now&lt;br /&gt;please drop me a line if any questions&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Web Logic Hooks or custom events</title><link>https://sugarclub.sugarcrm.com/thread/22202?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 13:41:08 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:f60ab83e-e278-4812-9fb7-cb69c7e4a1e2</guid><dc:creator>Hector Rios</dc:creator><description>&lt;p&gt;Hi John&lt;/p&gt;
&lt;p&gt;Regarding your ask about the code, have a look at&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;modules/WebLogicHooks/WebLogicHook.php.&amp;nbsp;&lt;/strong&gt;It&amp;#39;s pretty much self-contained in the class.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m referring to the definition of a custom event. I&amp;#39;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.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Just a thought.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I hope it helps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Web Logic Hooks or custom events</title><link>https://sugarclub.sugarcrm.com/thread/22197?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 10:42:16 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:1a0231c0-bf99-4429-bfad-f5f4fc35e638</guid><dc:creator>john Fieldsend</dc:creator><description>&lt;p&gt;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&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom Web Logic Hooks or custom events</title><link>https://sugarclub.sugarcrm.com/thread/22165?ContentTypeID=1</link><pubDate>Sun, 31 Jan 2021 23:21:03 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:cd3ad033-64d4-483d-97b2-e01c8be29b0f</guid><dc:creator>Dmytro Chupylka</dc:creator><description>&lt;p&gt;Hi John,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There is a tool to configure logic hooks easily in graphic designer - it&amp;#39;s purpose is exactly to make Sugar subscriber&amp;#39;s admin a superhero in configuring Sugar.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Data validation checks and sending results to external systems is that could be delivered with it, moreover -&amp;nbsp; you can even configure a middleware-based integration for Sugar with it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The tool is called Logic Builder - a cloud designer which is avaliable here:&amp;nbsp; &lt;a href="https://logicbuilder.integroscrm.com"&gt;https://logicbuilder.integroscrm.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I suppose you may find a lot of examples of Logic Builder application here in the Club&lt;/p&gt;
&lt;p&gt;However, if you like to try it out I would suggest&lt;span style="font-family:inherit;"&gt;&amp;nbsp;a step-by-step guide on how to deliver an example of the solution from scratch in 15 min -&amp;nbsp;&lt;/span&gt;&lt;a style="font-family:inherit;" href="https://integroscrm.com/sugarcrm-video-tutorials-and-webinars/#ppsShowPopUp_125"&gt;https://integroscrm.com/sugarcrm-video-tutorials-and-webinars/#ppsShowPopUp_125&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;You would need to sign up here &lt;a href="https://logicbuilder.integroscrm.com"&gt;logicbuilder.integroscrm.com&lt;/a&gt; then just repeat the steps suggested in the video&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>