SalesforceConnect

This gem makes easier to connect to sales force API for simple CRUD operations. It allows multiple configuration and easy integration with existing code.

It uses the RestForce Gem (https://github.com/ejholmes/restforce). Please check Rest Force documentation for further funcionality.

Installation

Add this line to your application's Gemfile:

gem 'salesforce_connect'

And then execute:

$ bundle

Or install it yourself as:

$ gem install salesforce_connect

Usage

First you have to create an Connected App on SalesForce control panel.

In case you want to dinamically change the Salesforce user, you may also manually set the configuration:

    SalesforceConnect::configure({
        username: 'username here'
        password: 'password here'
        security_token: 'token here'
        client_id: 'client id here'
        client_secret: 'client secret here'
    })

Create a new user object:

    user = SalesforceConnect::User.new

Find:

    user.find(:Id, '005o0000000VmeA')

Select:

    user.select(:Id, '005o0000000VmeA')

Create:

    user = SalesforceConnect::User.new
    user.create(name: 'Test', last_name: 'test', email: '[email protected]')

Known limitations

All users that are created, some fields are setted with default values, for the sake of simplicity

Contributing

  1. Fork it ( https://github.com/lucca65/salesforce_connect/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request