Polymathic

Digital transformation, higher education, innovation, technology, professional skills, management, and strategy


Rails + SugarCRM – An alternative approach

After slogging through connecting Rails and Sugar via SOAP, I was tired and frustrated. The API is slow, and doing anything meaningful took a long time (ok, it took 30 seconds, but that seems slow to me; aren’t computers supposed to be fast?!). So, I came up with an alternative approach.

I know that Active Record (or whatever it’s called) in Rails is really just a fancy wrapper for the database. So, I created a second database connection, directly to the Sugar database!

You just have to setup new models and controllers in Rails. But, that’s not too hard. See this solution (http://pragdave.pragprog.com/pragdave/2006/01/sharing_externa.html). Use option 3. It worked well. Once you get the mapping figured out, you can even use the join tables, relationships, etc. It all works transparently.

I use this to synchronize various objects and fields.

Of course, you have to have access to the database. And, of course, I know I’m majorly in danger of screwing something up. And you have to figure out the inner workings of the Sugar database. And, of course, this might not work on the next version, etc., etc.

But, heck it is fast! And very easy to use!

If you want to know more, just let me know.


Discover more from Polymathic

Subscribe to get the latest posts sent to your email.



3 responses to “Rails + SugarCRM – An alternative approach”

  1. Have you had continuing success with this second method? I’m thinking of doing something similar, and I’m wondering how much complexity is involved in adding records to the Sugar DB from Rails — is there much in the way of required associative records that have to be generated (and filled)?

  2. Hi, I would like to know more regarding rails and the open source sugarcrm please. Just send an email to me and we can talk off line. Thanks!

  3. Howdy!

    Just thought I would let you know that I wrote a gem for interacting with SugarCRM via REST. I wrote a blog article about it here: http://developers.sugarcrm.com/wordpress/2010/11/16/web-services-in-your-own-language-part-2-ruby/

Leave a Reply

Your email address will not be published. Required fields are marked *

About Me

Visionary leader driving digital transformation across higher education and Fortune 500 companies. Pioneered AI integration at Emory University, including GenAI and AI agents, while spearheading faculty information systems and student entrepreneurship initiatives. Led crisis management during pandemic, transitioning 200+ courses online and revitalizing continuing education through AI-driven improvements. Designed, built, and launched the Emory Center for Innovation. Combines Ph.D. in Philosophy with deep tech expertise to navigate ethical implications of emerging technologies. International experience includes DAAD fellowship in Germany. Proven track record in thought leadership, workforce development, and driving profitability in diverse sectors.

Favorite sites

  • Daring Fireball

Favorite podcasts

  • Manager Tools

Newsletter

Newsletter