Four Key Reasons to Learn Markdown
Back-End Leveling UpWriting documentation is fun—really, really fun. I know some engineers may disagree with me, but as a technical writer, creating quality documentation that will...
At Highgroove, we’re always looking for new Ruby gems to help speed up development and keep the code DRY. The gem I found this time was Heroku’s very own Databasedotcom gem, a fantastic Salesforce.com API wrapper for Ruby! I must admit, I wasn’t very surprised to find a gem since Salesforce owns Heroku, but I did not expect it to be so fantastic and easy to use. Here’s how!
There are only a few steps involved in getting the Databasedotcom gem connected to your salesforce instance and working:
client = Databasedotcom::Client.new(:client_id => ENV['SALESFORCE_KEY'], :client_secret => ENV['SALESFORCE_SECRET'])
client.authenticate :token => SALESFORCE_OAUTH2_TOKEN, :instance_url => INSTANCE_URL, :refresh_token => SALESFORCE_REFRESH_TOKEN
client.materialize("Contact")
Contact.find_or_create_by_FirstName_and_LastName(:FirstName => 'Daniel', :LastName => 'Rice')
There are many other ways to use this gem, and its possible to interface with custom objects and custom fields, but I wanted to mainly illustrate how few lines of code it takes to make a Salesforce integration thanks to the awesome job by the Heroku team.
To see more use cases, features, and general information about this gem, please check out the Databasedotcom gem’s README on Github.
Image Credit: Salesforce.com *No Software logo is a registered trademark of Salesforce.com
Writing documentation is fun—really, really fun. I know some engineers may disagree with me, but as a technical writer, creating quality documentation that will...
Humanity has come a long way in its technological journey. We have reached the cusp of an age in which the concepts we have...
Go 1.18 has finally landed, and with it comes its own flavor of generics. In a previous post, we went over the accepted proposal and dove...