Extend the Salesforce Platform
- List the Salesforce APIs.
- Explain how Heroku and Salesforce are related.
- Identify ways Salesforce interacts with IoT and bots.
Earlier, we talked about declarative development in Salesforce using tools like Lightning App Builder and Process Builder. These tools require very little interaction with Salesforce’s underlying APIs.
Property__c property = [SELECT Name, Price__c from Property__c WHERE Id=:propId];
Put simply, every object in your org has an API name that lets you access data for that object. Let’s look at the SOQL query from the last unit again:
The __c denotes that the object is a custom object or field. This query is using the automatically created API access point for the Property object to retrieve information about properties in your org.
|API||What you can do with it|
|SOAP API||Integrate your org’s data with other applications using standard SOAP protocols.|
|REST API||Access objects in your org using standard REST protocols.|
|Metadata API||Manage customizations in your org and build tools that manage your metadata model.|
|Tooling API||Build custom development tools for platform applications.|
|Marketing Cloud API||Expose Marketing Cloud capabilities with the REST API and get comprehensive access to most email functionality with the SOAP API.|
|Bulk API||Load, delete, and perform asynchronous queries on large data sets.|
|Streaming API||Send and receive notifications securely and efficiently. Notifications can reflect data changes in your org, or custom events.|
|Chatter REST API||Build UI for Chatter, Communities, Recommendations, Files, Topics, and more.|
|Mobile SDK||While it’s technically a software development kit, it’s worth including here. Integrate Native or Hybrid mobile apps directly with Salesforce.|
If you want to learn more about Lightning Platform APIs, check out the Lightning Platform API Basics module in the resources.
While APIs can be used both within Salesforce and with your external systems, Heroku is all about interacting with the outside world. Heroku is a web development platform that lets you quickly build, deploy, and scale web apps.
One of the great things about Heroku is that you have a lot of flexibility in how you write your app. If you’re a Java nerd, you can write your app in Java. If you’re a diehard Python fan, Heroku won’t get in your way. PHP your jam? PHP to your heart’s content!
Heroku is built on Amazon Web Services (AWS), meaning a lot of infrastructure concerns you might have in standard web app development are taken care of for you. On top of that, Heroku Connect unifies your Salesforce data with your Heroku Postgres data so you don’t have to manage moving information across platforms. No worrying about infrastructure or data storage means more time for you to focus on new development..
Let’s briefly head back to our DreamHouse scenario. We’ve looked at the Salesforce side. It’s an internal employee productivity app where real estate agents can track their properties, their customers, and their customers’ favorite properties.
But where are the customers seeing these properties? On the DreamHouse Heroku app, of course! Check it out here.
The topics we’ve covered up to now are more or less the “essentials” of our development environment. But there are many other opportunities for you to flex your development skills and have some fun with the platform.
Depending on your industry, integrating Salesforce with the Internet of Things (IoT) may or may not be a necessity. However, with smart devices on the rise, it’s not a bad idea to get familiar with developing with IoT in mind.
For example, when DreamHouse real estate agents prepare to show a house to a potential buyer, there are things they always do, such as unlock the doors to the house, turn on the lights, and make sure the temperature is just right.
What if real estate agents could make these preparations on-the-go from their Salesforce mobile app? By connecting smart devices with Salesforce, they can do exactly that. Using a combination of Visualforce or Lightning components, microservices hosted on Heroku, and the IoT interfaces from smart locks, lights, and thermostats, you can build IoT control right on the platform.
Of course, IoT has many other applications. For any company with a connected hardware component, Salesforce’s IoT capabilities give you an easy way to collect, manage, and analyze data about devices. It also helps you do things like monitor the performance status of your customers’ devices and define business logic that supports customer engagement.
Chatbots are typically used in external customer service. But you can also build them right into your Salesforce org to help your employees navigate their data.
Let’s think about DreamHouse again. Say a family gets in touch with a real estate agent and tells her they want to purchase a three bedroom home in the Boston area. To find appropriate homes for this family, the real estate agent can take advantage of bots. Back in our DreamHouse org, we can see a bot in action.
From the AppLauncher, select DreamHouse. At the bottom of the page, there’s a DreamBot item. Click it, type 3 bedrooms in Boston, and press enter.
Pretty cool! The bot turned up all the properties from DreamHouse’s listings that match the criteria you entered.
DreamBot is coded entirely in Apex. If you want to take a closer look at how it’s done, open your Developer Console and go to. You can also code bots that connect to services like Slack, Facebook Messenger, and Amazon Alexa.
We’ve only scratched the surface of the possibilities of Salesforce platform development.
You can use Apex and the Einstein Vision API to create custom image recognition and classification engines. For the cat lovers out there, check out the Build a Cat Rescue App That Recognizes Cat Breeds Trailhead project. And if you don’t like cats, don’t worry. Einstein Vision can work for you, too. This blog post uses the Einstein Vision API in combination with Raspberry Pi to detect and deter cat invaders.
For the data-savvy, you can Create a Custom Map for Analytics Charts using Einstein Analytics, GeoJSON, and Python.
Or, you could use platform events and Lightning components to Build an Instant Notification App.
We’ve covered a lot of ground in this module. We talked about what the Salesforce platform is and how you can use it to develop quickly with no- and low-code. We also covered the programmatic pillars of the platform: Lightning components, Apex, and Visualforce. Finally, we discovered some new and exciting ways to extend the Salesforce platform.
Another thing you should take away from this module is that the platform is extremely dynamic. Between the accelerated development capabilities and the many technologies that integrate with Salesforce, you have tons of options for building out your Salesforce org.
Throughout Trailhead, you’ll learn much more about the technology we’ve discussed here. Additionally, the Salesforce Developers portal is your best resource for all things related to developing on the Salesforce platform. It’s full of developer guides, blog posts, forums, and more information to help you as you get started.