How do I convert a lead in SFDC through API using Restforce Gem

303 Views Asked by At

I've been using the Restforce gem with Ruby (sans Rails) in order to add leads, contacts, and opps to Salesforce. Now I want to be able to convert a lead to a contact or account. Here is SFDC's documentation on the method I'd like to use.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_convertlead.htm

However, Restforce does not appear to support this feature yet. There is no convert_lead or convertLead method with that library. I'd appreciate pointers on how I could work around this or get Restforce to work for me? Thanks!

1

There are 1 best solutions below

0
Nic Nilov On

Clone the Restforce gem on Github and add convertLead method to restforce/api.rb. There are plenty of examples within that file.