Salesforce Direct Message API: the new way to communicate

APIs (application programming interfaces) make our professional life, as developers, much simpler. This feeling is more remarkable when it comes to IT messaging apps. APIs were always good allies. Today, we will share how the Salesforce Direct message API is helping us improve communication for our customers.

APIs: What are they for? 

Firstly, we want you to picture this: developers are normally running huge projects and need to create brilliant solutions in a short period of time. Therefore, we need to build bridges between different systems that, often, have never been related. In these situations, we need to be strategic and creative to meet our customer’s expectations and enhance the user experience. 

This is when APIs become our best friends. They are able to make two or more systems interact with one another. Oxford defines an API as: 

“A set of functions and procedures allowing the creation of applications that access the features or data of an operating system, application, or other services.”

This might sound difficult but the fact is, APIs are everywhere. Every time you use your phone, check your social media apps, share data within your company, or chat with your teammates, there are APIs working behind the scenes. 

Direct Message API, a whole new messaging experience in Salesforce

Chatter, the Salesforce enterprise collaboration tool, is no exception. Since Chatter is part of Salesforce, there are several Message APIs that make it possible to integrate this product with other solutions. 

For those who are not familiar with Chatter, we are talking about the product Salesforce built to provide a collaborative communication platform. All Salesforce employees, partners, and most customers interact, collaborate, and share information from within Salesforce using Chatter. Everything is available to your teammates and securely archived.

We started testing the new Direct Message API, and let us tell you, the experience is becoming way more flexible and enjoyable. 


Salesforce Direct Message API

How do we leverage the Salesforce ConnectApi to build Tok?

To understand the use of the Salesforce ConnectApi, first we need to talk about programming languages. Whether we are experts developers, tech geeks, or an average human being who owns a computer, most of us are, at some level, aware of programs. But, what exactly are they? Well, to keep it simple we will say they are a system of vocabulary and commands that allow humans to communicate with computers. For those who are not familiar with this environment, remember that computers think in binary. They speak in 1s and 0s, so programming languages help us translate our instructions into a language that computers will understand. 

Apex: Salesforce’s programming language.

At some point, you may hear about Java, JavaScript, Python. If you are more experienced, you may also know Ruby, C#, C++ or Swift. All of them are programming languages. Now, what is the scenario when it comes to Salesforce? Well, there is a specific and powerful programming language just for us named Apex. Salesforce created this language to allow developers to run and customize on-demand apps within Salesforce. Salesforce describes it as: 

“Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Lightning Platform server, in conjunction with calls to the API”.

So, how is Apex directly related to us? Well, we build our solutions inside Salesforce, therefore we use Apex as a programming language. Every time we create a product to enhance your experience in the Salesforce environment, we use Apex. That’s what we did for Tok, our app that boosts Chatter capabilities to the next level to ensure real-time communication to our customers. 

What is Chatter REST API?

Let us go a little bit deeper. Shortly after the release of Chatter, the Salesforce enterprise collaboration tool, Salesforce launched Chatter REST API with plenty of messaging features and better integration between third-parties apps and Salesforce through HTTP requests. This way, it would be easier for a group of users to be notified about events. Salesforce designed Chatter API to enhance data delivery and treatment, especially across mobile apps. This API is powerful enough to display a feed on an external system, such as an intranet site after users are authenticated. Salesforce also recommends other uses: 

“Use Chatter REST API to display Chatter feeds, users, groups, and followers, especially in mobile applications. Chatter REST API also provides programmatic access to files, recommendations, topics, notifications, Data.com purchasing, and more. Chatter REST API is similar to APIs offered by other companies with feeds, such as Facebook and Twitter, but it also exposes Salesforce features beyond Chatter.”

With the Summer ‘20 release, the company launched a new version under the name of Connect REST API (Connect REST API Developer Guide – version 49.0). If you explore the Salesforce’s Guide, you will also notice that there is a preview of the next release (winter ‘21 version 50.0). 

ConnectApi: How does Tok leverage Chatter REST API methods and classes?

As you can see, Salesforce built Chatter REST API to establish bridges between Chatter and other independent platforms. But what happens with applications or other solutions that were built on the Salesforce platform like Tok? How does Tok take advantage of all the methods and classes Chatter REST API provides? Well, even though Chatter REST API is a powerful tool, we don’t use it directly. Instead, we use ConnectApi. 

Since Tok uses APEX, Salesforce’s programming language, ConnectApi (also, Connect in APEX) is the best way to access Chatter REST API data and capabilities. It allows our developers to work with feeds, users, groups, messages, and other classes or methods. Salesforce summarizes the power of ConectApi: 

“[Use ConectApi to] create Apex pages that display feeds, post feed items with mentions and topics, and update user and group photos. Create triggers that update Chatter feeds. Many Connect REST API resource actions are exposed as static methods on Apex classes in the ConnectApi namespace. These methods use other ConnectApi classes to input and return information. We refer to the ConnectApi namespace as Connect in Apex.”

Now that you understand how ConnectApi helps us to build Tok, all you need to do is relax. So, take a seat in front of your computer, grab a cup of coffee and experience the way ConnectApi empowers your communications through Tok. If you like this information but you also feel you need to dive deeper, we recommend this article: How Our New App, Tok, Can Improve Business Communication.

Our developers are constantly working to take full advantage of any new version. Haven’t tried Tok yet? Install it here.

Tok 30 day trial

Tok is Rising on the Chatter Horizon

Enterprise collaboration is one of the major catalysts in building a successful workplace environment, one where employees are engaged, where they’re meeting KPIs, and where they’re achieving consistent success towards their business goals. Constant connectivity enables team members to break down the barriers between departments and locations so they can seamlessly collaborate on projects. As in most industries, Salesforce decided to jump on board with their very own instant messaging product, Chatter

Tok and Chatter

Salesforce Chatter is an enterprise collaboration platform which is used as a company intranet or employee directory. It became a popular option for Salesforce users because it is heavily integrated with all of Salesforce’s clouds, objects, and features. Using Chatter, employees can tag, follow and share cases, opportunities, leads and much more to constantly keep updated on their tasks in real time.

What if we told you there was a way to make Chatter even more functional than ever? Well, we’ve got just the thing to enhance your experience; our product, Tok!

 

Tok Interface

Tok completely elevates Chatter to the next level by enabling users to maximize Chatter capabilities with an easy-to-use messenger application that includes interfaces for desktops, laptops, tablets and phones. What’s even more awesome about Tok is that users don’t even need to log into their Org to communicate with their colleagues.

“Finally, someone is making Chatter do what it always should’ve done!!! From the first day, I started using salesforce over 6 years ago I always felt that Chatter could and should be so much more. Everyone I know has to find another company-wide instant messaging platform because Chatter is so inept as a real-time communication platform. “Michael Irving, Business Development Specialist, InTech Together, Inc.

What else? Team members can send cool and customized messages by adding attachments or files like images, GIFs, videos, etc. Tok is also super intuitive where users can drag and drop items from their desktop directly into the platform for simple sharing amongst colleagues.

We certainly can’t forget about Tok’s coolest features: the TokBot! The TokBot automates commands on Tok as well as on the Salesforce platform. You can create polls and surveys in Tok and share them in Groups on the Tok interface. Also from within Tok, you can list views, create new contacts, leads, opportunities and much more. Since Tok is fully integrated with Salesforce, all of this info will automatically be stored in your Salesforce Org.

 

TokBot

Enterprise collaboration is a tool that will never go unnoticed because of the impact it has on team member engagement, and that’s why Chatter has stood the test of time on the Salesforce platform. But if you want to extend your Chatter capabilities seriously and on a killer UI, Tok is the solution!

 

Tok 30 day trial