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. As we built Tok to boost Chatter’s capabilities, we can say 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.

At Oktana we are obsessed with Chatter and that’s why we created Tok, our messaging app to boost Chatter capabilities. Tok is 100% integrated with Salesforce and enables real-time conversations in your company. You can maintain your company culture in a secure way, archiving everything in Salesforce to meet compliance requirements.

As Salesforce has improved Chatter, we’ve been able to refactor Tok several times to take advantage of the new APIs. Previously, we used the Private Message API. However, we started testing the new Direct Message API, and let us tell you, the experience is becoming way more flexible and enjoyable.

New improvements for the next Tok version

First, let us talk about Tok Channels. With the Direct Message API, you will be free to add or remove members whenever you need to. In other words, this is surely a better way to manage real-time communication across projects and assignments. If you are a user and you finish your arrangements on a Channel, you can now leave it and focus on your next project. 

What about big, long-term projects? They usually require big teams working together. Direct Message API allows us to host up to 16 members in every channel. In addition, Salesforce created the Direct message API to take care of private conversations:

“Imagine a scenario where a customer brings up an issue they have with a product in the community feed. A support agent can share that post and address the customer’s concerns privately in a direct message. Similarly, a channel manager can discuss sensitive sales data with one or more partner users in a partner community.” 


Our team of developers is always working to take advantage of most of the Message APIs available within Salesforce. What is more, we are currently working to support 100% of the Direct Message API. We are committed to real-time communication and this drives us to constantly incorporate new resources. We want to provide you with a solution that increases productivity and develops your company culture. So, stay tuned because we are close to releasing an updated version of Tok with these functionalities. If you haven’t tried Tok, stop overthinking and download it now in this link

Tok 30 day trial
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

Take a Look at Tok

Are you a Salesforce user looking for a way to securely and efficiently stay in contact with everyone within your organization? Then it might be time to take a look at Tok. Tok is Oktana’s flagship Salesforce app designed to help keep everyone at your organization in close contact at all times. If your team’s been begging you to adopt Slack or another tool, but you’re concerned about security and safety, then Tok is what you need.

Built on Salesforce Chatter, Tok allows for instant messaging, team messaging, and groups to connect all within Salesforce. That way, you know your conversations are safe, secure, and archived within your Salesforce instance. Your team never has to leave Salesforce to talk and collaborate. To highlight how Tok can help your organization, we’re producing a series of videos to demonstrate Tok.

First, let’s take a look at some of the basic features of Tok. In this video, we walk through all the different chat options available to you in Tok and how they’re different from each other.

Next, notifications are essential to making sure everyone within your team stays on the same page. You need to know when new messages arrive so they can act on them immediately. That’s why we’re walking through how notifications work in Tok, so you know the team will always be ready.

And that’s it for the first in our series walking through all you can do with Tok. If you’re interested in learning more feel free to contact us here or you can get a 30 day free trial of Tok right now on the AppExchange.

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 location 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.

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 and much more. 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 one of the coolest features of Tok; the TokBot! The TokBot automates commands on Tok as well as on the Salesforce platform. In Tok, you can create polls and surveys 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 seriously extend your Chatter capabilities, and on a killer UI, Tok is the solution for you!

Tok 30 day trial