rforce

DESCRIPTION:

RForce is a simple, usable binding to the SalesForce API.

FEATURES/PROBLEMS:

Rather than enforcing adherence to the sforce.com schema, RForce assumes you are familiar with the API. Ruby method names become SOAP method names. Nested Ruby hashes become nested XML elements.

SYNOPSIS:

binding = RForce::Binding.new \
  'https://www.salesforce.com/services/Soap/u/10.0'

binding. \
  'email', 'password_with_token'

answer = binding.search \
  :searchString =>
    'find {McFakerson Co} in name fields returning account(id)'

 = answer.searchResponse.result.searchRecords.record
 = .first if .is_a? Array  

 = .Id
 = .first if .is_a? Array

opportunity = [
               :type, 'Opportunity',
               :accountId, ,
               :amount, '10.00',
               :name, 'Fakey McFakerson',
               :closeDate, '2008-07-04',
               :stageName, 'Closed Won'
              ]

binding.create :sObject => opportunity

REQUIREMENTS:

  • Builder gem

  • A SalesForce Enterprise or Developer account

INSTALL:

  • sudo gem install rforce