Integrate Sugar with external database

Hi everyone,

I need to connect Sugar CRM (v9) with an external database. Specifically, I want to react to the change of a field on the Contacts Module. Information of the changed record should then be transferred to another database. The remote database is only accessible via DBlink or direct login. Sugar DB and the remote DB are Oracle 19 DB's.

First thought was a trigger on the database (field level - Oracle PLSQL). But I would like to avoid that. I also don't really want to set up a scheduler.

Were there other approaches or best practice to reach this. Any ideas were very appreciated.

Thank you in advance!

  • We chose to do a 2 step approach:

    An after save logic hook puts the changes into a staging table when the record is changed, then a scheduler reads the recently staged records with "staged" in the status from Sugar and makes the changes in Oracle, when the Oracle update comes back successful then the staged record is changed to status "synced", if there are issues it is reported to the developer that there is a problem and the status is changed to "error".  This allows us to track changes and track the sync. to better handle any errors.

    Of course you need to have 1:1 relationship between Sugar Contact and Oracle Contact, and make Sugar the master.
    Things can get really messy if you allow your users to create/modify Contacts in both systems.

    I highly recommend against any 2-way sync.


  • I would second, strongly, the point of avoiding 2 - way sync. 

    Regardless of which systems are in play, bidirectional synchronization is a complex topic that can easily cause many problems and potentially lead to data loss.

Reply Children
No Data