No kidding. Even if you are not a developer, you can still learn the basics of Salesforce REST API in just under 60 minutes. Here is a step-by-step do-it-yourself guide on how to make REST API calls and interact with Salesforce.
But first of all, what is Salesforce REST API? Here is a very simple explanation – Salesforce REST API allows you to interact with Salesforce from outside the Salesforce. That means that you can create/update/delete records in Salesforce from an external program. That means that you can issue a query to Salesforce and get the response.
Where are APIs used? APIs are used when you want to integrate Salesforce with other applications. Your other application can be in any language (Java, PHP, .Net, Ruby, Oracle, etc. etc.) and on any platform.
Here is an example. Say, you are using an ERP and whenever you create/update a customer in your ERP system, you want to create/update that record as an ‘Account’ in Salesforce. So what you need to do to accomplish this is to write an ‘AFTER INSERT’ trigger in your ERP database. The trigger will make a REST API call to Salesforce and will insert/update the record in the ‘Account’ object in Salesforce.
If you want to do something in Salesforce from outside Salesforce, you need to use an API. You need to make an API call. And here is a nice video explaining the concept of an API
So how do you get started with APIs in Salesforce? I created two blog posts earlier that contained step-by-step instructions on how to connect to Salesforce from Java using REST API and SOAP API. So if you are a programmer/developer it should be quite easy to follow these instructions and have a taste of how to work with Salesforce using APIs.
But what if you are from a non-programming background? Say you are an admin, functional consultant, solution architect, tester etc. If the term API sounds greek to you, stay with me for next 60 minutes or so and I assure you that by the end of it not only will you make your first API call, but also insert / update & delete records in Salesforce using APIs.
So how are we going to do this? Rather than writing a program using Java or PHP or .Net we will use one of the most popular tool to design, build and test APIs called “Postman“. So while in a real world you will make REST API calls using Java or PHP or .Net etc. in this case we will use the Postman app to make API calls to Salesforce and watch the response.
Here is your Step-By-Step DIY Guide on using Salesforce REST API. Enjoy it chilled with Vodka, lemon and a pinch of salt
|Liked this guide? We are now also offering a complete course on Mastering Salesforce APIs. This is a training course designed for all Salesforce Professionals (Admins, Consultants, Developers & Architects) to understand how Salesforce APIs work. For more details please click here.|
Where can you use this guide?
- You can use it when you need to create a login in Salesforce for the middleware / 3rd party system to make REST calls. You will create a user, setup the profile and use Postman app to test and ensure that the user is able to connect to Salesforce using API
- You can will use it when you need to test API calls. For example, you can use it to create / update / delete records in Salesforce and make sure that there are no profile/permission issues
- You can use it to see the response structure. When you make a REST API call to Salesforce, Salesforce will return a response.
References & Useful URLs
- Developer Guide – REST API Developer Guide
- Blog Post – Explore the Salesforce APIs with a Postman Collection
- GitHub – Salesforce APIs for Postman
- Trailhead Module (30 mts) – API Basics
- YouTube Video (1:02:59 Hrs) – Salesforce API Fundamentals
- Salesforce Live Video (26:31 Mts) – Exploring the Salesforce APIs with Postman
57 thoughts on “A 60 Minutes Step-By-Step DIY Guide to Salesforce REST API for Non-Developers”
Simple and highly effective article, thanks a lot Ashish for this Guide
My pleasure Koods. Thanks for your feedback.
Hi Asagarwal, thanks for this very educative writeup on REST API. I need a quick help from you. I am integrating Salesforce with MuleSoft for account creation using REST API. When an account is created in MuleSoft how can I send the information of the account to MuleSoft? What I have done is created an account API but how do I notify MuleSoft that an account has been created and it need to come and pick the account?
Indraganti, usually there are two approaches. One is that MuleSoft will poll Salesforce every x minutes and check if any new account was created in the last x minutes based on the created date field. The other approach is Salesforce will notify MuleSoft when a new account gets created. This notification can be sent using Outbound Message, Streaming API, Platform Event or Change Data Capture.
Hope this gives you some idea.
How we should pull data from salesforce for every 15 minutes using salesforce API’s or python script.
Hi Akshay, I am not familiar with Python but one of ways will be to use Apex Data Loader (https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/data_loader.htm) and use your operating systems scheduler to schedule it (e.g. like cronjob on Unix) at pre-defined internval
Excellent Mr. Ashish
Hope to see more such technical blogs in future. Keep it up.
Thanks Sunil, please do checkout our blogs topic idea bank at URL https://asagarwal.force.com/s/idea/Idea__c/Default where you can either upvote an existing idea or submit a new content idea. 🙂
fantastic job Asish !!!
It is first time I gone through all the slides of any documentation. Really amazing learning
Thanks Bhupesh 🙂
Hi Ashish – thank you for this tutorial. I am trying it and getting this on the 44th slide
HTTP error 400
You have sent us an Illegal URL or an improperly formatted request.
Sounds like you have some unrecognized characters in the URL or parameters. It will be better to construct this string in a text file and copy paste from there.
I have tried to download PDF copy by providing details and submitted, but i dint get any mail(PDF copy). can you please share the same. Thanks.
Excellent document, it has helped a lot.
I have an issue, when I m executed the code its giving me org.apache.http.conn.HttpHostConnectException
Caused by: java.net.ConnectException: Connection timed out: connect
Could you please help me on what m I missing?
Saved lot of time with your fantastic article with each step covering all the points..Thanks for the beautiful article.
Thanks for the feedback Ganesh
Thank you for the wonderful posts that you come up with 🙂
Clear as crystal your thoughts, explanation. Kudos to all your efforts!
Keep it coming please for all learners. Thank You.
Thanks for you kind words Kavita
I am getting an Error authenticating to Force.com: 400. anyone can solve issue.
I was trying to execute all the steps what ever you have mentioned but i am getting authorization failure error.
https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id=3MVG9tzQRhEbH_K0tOTRBpicAd6XVc4wsIMv8yOn3FUSeoDGZoG2ugrt4KGInjiTuVH4ysKpPDSV1z0Z5NNQ3&client_secret=5211F77E4AA3702453AF9333A5428E62FA268BF5C95B358B76E8B3AD8DDB4229& email@example.com& password=password
Note: I did not metioned my user name and password in this comment. I am using developer edition for executing this task.
Could you please let me know if i have done any mistake.
Hi Siva, what exactly is the error message that you are getting?
Amazingly Great job. Thanks for sharing this topic “A 60 Minutes Step-By-Step DIY Guide to Salesforce REST API for Non-Developers”. The best part is the article has all the practical detailing! Keep sharing
Thanks Soha, Glad you liked it.
Definitely the most useful guide that I have found about API’s in Salesforce, Clear and concise with great examples. Helped a lot thankyou.
Thanks for your feedback, Daniel. Glad to know that you find it useful.
I am executing the first code mentioned in the guide which is verification of salesforce connection. But I’m getting 400 error.
What will be the issue? Thanks in advance.
I’m very much glad that I found this website in some random surfing. The REST API concepts are very well-explained in by you Agarwal. The topics are very-well explained by you and are in an understandable manner. Thank you so much!
Thanks for your feedback Malathi. Happy to note that it was helpful 🙂
Very helpful as I am getting deeper into code and understanding of API work with APEX and in general.
Very precise explanation Mr. Agarwal.
Thank you so much Mr Agarwal. Really Very Useful Post. GAZAB 🙂
As a non developer it helped me a lot to understand the concept and how to test using ACR..Excellent step by step explanation..
Gone through many blogs/sites/documents but did not find anything as simple and useful as this one..Best guide for beginners..
Hope to see many posts like this..Doing a great job..
Thanks a lot to you..
Hi Ashish, thank for your post. how do I use the get updated method using Salesforce SOAP API?how to use that with Nodejs?thanks
Very Good Explanation
As an absolute beginner to API’s and REST I found this very easy to follow.
Hi Asagarwa, Very useful for non-developer person. I saw slides and get a clear idea about integration but i have one question. We are using an application Request Tracker and it has rest API. We ant all tickets from request tracker should be in Salesforce. any help how can i integrate it.
I have RT rest URI
You are awesome……Ashish…!!! Thank you for providing such great integration topic in easy way… keep going on..!!
I am not able to done with Advance Rest client. I followed you step as you mention
I am not able to install advanced Rest client…. help me..
Good. It clarifies lot of doubts arises when we start with REST. I am now confident to go deep dive into it.Thank you for the sharing.
This is a very help article it helped me clear lot of my doubts and got me started with the salesforce REST Api. Thanks a lot Ashish.
You are welcome Alok. Glad that it helped.
Amazing. Thank you so much.
What data do I need to ask my customer in order to connect to their system via api?
Hi Ashish: Great article. I was working on integrating an external system on SOAP UI and show case this on a Canvas App in sfdc. Any suggestions or directions to get started?
How we can get refresh token from salesforce ?
It’s very useful , i appreciate , good job.
Impressive explanation Mr. Asagarwal!
We appreciate your efforts you have put in!
Keep on posting. 🙂
Impressive xxplanation Mr. Asagarwal!
We appreciate your efforts you have put in!
Keep on posting. 🙂
Ashish- thanks much. i am using this to simulate some of the integration scenarios in my current salesforce system. Do you have a tool reccommendation for SOAP?
Thanks Vijay, For SOAP you may want to explore the tool called SOAPUI (https://www.soapui.org/). This is quite powerful and will work for both SOAP & REST testing.
I do not get option to reset token, What settings needs to be changed for same. Sorry I am novice in SalesForce
Hi Shails, I am not sure what exactly do you mean by “do not get the option to reset token”. What exactly is it that you are trying to do?
This article is simply awesome. No words to explain how much it has helped me.
This is really a amazing step by step guide.
Thanks Akshay, glad that it was helpful to you.
Hello Mr ASAGARWAL
U r notes are awesome.
GR8 job !! Dont stop just keep posting.. !!
Also I have suggestion/request . Can u include more adv. topics such as Integration diff technology into salesforce. Lots of companies are asking for integration expert.
I have a interview scheduled early next week . I know interviewer will ask about Integrating java application into salesforce. They want me to explain it with an example. I would be helpful if u can help me with this.
If u have any doc or video link plz share at firstname.lastname@example.org
Thanks Nitin. I do intend to post step-by-step guides to integrate Salesforce with External Apps using different methods. For integrating Java application with Salesforce, there are different ways depending on what is the business requirement and you are trying to achieve. For example, you can use Salesforce SOAP or REST API to update data in Salesforce when the records get updated in your java application. You can use outbound message or Apex Callouts to update records in your java application when the records get updated in Salesforce. Or you can use Canvas Apps to expose the UI of your Java Application inside Salesforce and use Salesforce Canvas SDK to pass the data back and forth between Salesforce and Java Application. Or you can just use Salesforce Connect with External Objects to show external data inside Salesforce. These are just a few examples. There are many more methods, tools, AppExchange Solutions, middleware available that can be looked at.
I thank you very much. It helped me for learning.
I always watch for your upcoming sessions as such.
Thanks Shrini ! 🙂