Integration with Salesforce using REST API
REST API provides a powerful, convenient, and simple Web services API for interacting with Force.com.
Its advantages include ease of integration and development, and it’s an excellent choice of technology for use with mobile applications and Web 2.0 projects
A Lot of people ask about how can we integrate external system with Salesforce without using any ETL tool. Here is the example in which I am going to show you how can we insert Account in salesforce by using .NET windows form application.
First, we need to create connected app that uses OAuth protocol to verify both the Salesforce user and the external application.
Follow these steps to create a connected app:
From Setup, click Create | Apps.
In the Connected Apps section, click New.
When you’ve finished entering the information, click Save to save your new app.If you’re using OAuth, saving your app gives you two new values the app uses to communicate with Salesforce:
Consumer Key: A value used by the consumer to identify itself to Salesforce. Referred to as client_id in OAuth 2.0.
Consumer Secret: A secret used by the consumer to establish ownership of the consumer key. Referred to as client_secret in OAuth 2.0
We can Authenticate the user via one of several different OAuth 2.0 authentication flows. In this example we are using Username-password flow, where the application has direct access to user credentials.
User Interface of the application from which we are inserting Account record.
Code Snippet:
The record is successfully created in Salesforce. You can verify the ids from above error log and URL.
Feel free to post questions and suggestions. Cheers !