How to push data to external system using module logic hook

Hi All,

I need to know is it possible to push data from  sugar to external system using logic hook.I know web logic hook is enough  to push data even though i have an special requirement to push data using logic hook. I like to know is it any way to achieve this.

Parents
  • Hi Sino Thomas,

    Logic Hooks can only be used within the environment. If you want to send data that we have in logic hooks to the external environment then you can call the curl request. 

    It can also pass via the create.js, record.js according to your need. 

  • Hello Maryam,

    Thanks for your solution.

    I found the following suggested ways from the internet.

    1)Create a logic hook on the module and push data to External system or ESB. May be curl request is call in the logic function.

    2)Create a logic hook on the module that queues a background job to call the External system or ESB.

    Let me know which one is a feasible solution.

  • Hi Sino,

    Can you send me the reference from where you found these solutions? I don't know in which context they discussed ESB and Job Queues, according to my information they both are used at the OS level in general, these are not specific with SugarCRM. 

    So I can't say anything about the above approaches you discussed because I think they will complicate the environment and implementation as well.

    I have already faced this type of situation where I need to send the bean data to some external website. So I did it in create.js and record.js in which I can access my data and send it to my external party. 

  • Hi Sino Thomas,

    While I think this architectural discussion might be a little complex and there are many nuances, I would try to give you some pointers to help out.

    I would definitely follow your approach. Between the logic hook that talks directly to the external system and queueing a job via a logic hook, that then would talk to the external system I would definitely recommend the second approach.

    That's how web logic hooks work as well. At least you would not have the users experience depending on the speed of the secondary system, while if you had logic hooks talking directly to the external system (or ESB/middleware), the system would have to wait for the communication to the external system to be completed, before responding to the user.

    Another alternative is also to look into Sugar Integrate, our latest iPaaS system integration product. Especially if you are planning to have many integrations, it is going to be really helpful to have a central system with a standard data mapping layer between all the systems, that you can rely upon.

    In regards to "UI based integrations", normally I would only use those within custom dashlets. The typical use-case is to see relevant information (from external systems) contextual to the record you are looking at in the UI. Eg: I am looking at an Account, and I need to know that the Account has paid all their invoices. The dashlet could make a real-time call to the accounting/ERP software and retrieve that information. For pushing information outbound they are normally not recommended also because they would not trigger in case of Sugar Mobile, or any other UI leveraging Sugar's API. Logic hooks instead would still trigger.

    Hope it helps and good luck! 

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States

  • Hello Enrico Simonetti

    Your architectural discussion very helpful for me.

    based on my suggested methods what I conclude is 

    Create a logic hook on the module that queues a background job to call the External system or ESB.

    Is more recommend  approach. Is it my understanding is right ?

Reply Children