3

I want to know the process of how we can insert Lead/Account/Opportunity via webhook i.e giving the URL to thirdparty application and third party will take care of rest to insert the data.

Thanks in advance

3 Answers 3

2

There are two possible solution to insert Lead in Salesforce.

  1. You can use standard REST API to insert lead from your third party application to Salesforce. It also authenticate user using OAuth which makes it se

  2. You can use Enterprise WSDL or parter WSDL to call SOAP API.

  3. There are some third party API tools (Mulesoft) are also available which can be used as well.

SO it is all depends what is your use case it.

2
  • Himanshu Third Party Provider asked me to give a URL so that he can process it from their side to insert the Lead They call it webhook
    – Cloud Arch
    Jan 18, 2016 at 12:50
  • in that case it is easy use case of REST API and insert the data.
    – Himanshu
    Jan 18, 2016 at 13:34
1

It sounds like you need to create a Public RESTful REST Service (aka webhook). Full instructions are in the linked blog, but, in summary, assuming the third-party site wants to send you some JSON:

  • Create an Apex REST Method. You can model the JSON that the third-party app wants to send by creating an Apex class with matching instance variables. JSON2Apex is a useful tool for this. Your Apex REST Method will need to create the relevant record and insert it.
  • Add the Apex REST Method's class to the Enabled Apex Classes in the Site’s Public Access Settings.
  • The public URL for an Apex REST Method has the format {Site_URL}/services/apexrest/[optional-namespace]{URL_mapping}. For example, https://patdevorg-developer-edition.na9.force.com/services/apexrest/myservice
  • Test from the command line with curl - e.g. curl https://patdevorg-developer-edition.na9.force.com/services/apexrest/myservice?name=Burlington
  • To debug your webhook, turn on debug logging for the Site guest user, which will have a name like SiteName Site Guest User
0

If i am not wrong you can use web-2-lead feature of sfdc to create leads from websites. You can read more from here: https://help.salesforce.com/apex/HTViewHelpDoc?id=setting_up_web-to-lead.htm&language=en

1
  • Web to Lead form i know. my Third party provider asked me to give the URL so that he can use it form his Database and create a Lead. I dont Know how to start with.
    – Cloud Arch
    Jan 18, 2016 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.