RDSalesForce is a ruby gem for save a Person as a Lead in Salesforce.
It uses the restforce gem to work with the Salesforce REST api.
Add this line to your application's Gemfile:
gem 'rdsalesforce', :git => 'git://github.com/nickollascoelho/rdsalesforce.git'
And then execute:
$ bundle
Create a RDSalesForce::Client object
params = {
:host => 'url.salesforce.com',
:username => 'myUsername',
:password => 'myPassword',
:client_id => 'myClientId000111',
:client_secret => 'myClientSecretXXXX000111',
:security_token => 'mySecurityTokenXXX9999111DDD'
}
@client = RDSalesForce::Client.new(params)
Create a RDSalesForce::Person object
person_parameters = {
:name => "Name",
:last_name => "LastName",
:email => "[email protected]",
:company => "MyCompany",
:job_title => "MyJobTitle",
:phone => "+55000111222333",
:website => "www.mycompany.com"
}
@person = @client.create_person(person_parameters)
Save the object as your Salesforce lead
@person.save_as_salesforce_lead
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request