If you have a chat feature in your app or are in the process of building one, this post is bound to interest you.

With smart replies popping up in more and more apps, this short post explains why you should care about them and announces our new, even smarter way to implement them in your own iOS, Android or JavaScript chat app with CometChat Pro. In short, smart replies improve focus and save your users time and effort. Best of all, with our new extension, you enable them with the flick of a switch. There’s really no reason to wait anymore.

Smart replies can be found anywhere nowadays:

They make it much easier to reply to messages on devices with limited input capabilities, like Apple Watch or any Android wear:

And in the case of business communication tools like Gmail or Slack, smart replies help users drastically save time when giving mundane responses freeing up focus for the things that truly matter.

Did you know smart replies constitute ten percent of all emails sent on Gmail? Numbers like this tell us smart replies are helpful. But exactly how to implement smart replies is not obvious and certainly not easy. That’s why we built the Smart Replies extension.

How to enable smart replies

CometChat Pro customers can now enable smart replies with practically no code.

If you haven’t heard of CometChat, we are on a mission to build the best chat platform on the market. To give you an example, here is a complete-ish chat application built with CometChat in JavaScript:

import { CometChat } from "@cometchat-pro/chat"

const me = await CometChat.login("bookercodes", "EXAMPLE TOKEN")

// Subscribe to messages sent in #General
CometChat.addMessageListener("#General", new CometChat.MessageListener({
  onTextMessageReceived: message => console.log(message)
}))

// Send message to the #General channel
const message = new CometChat.TextMessage(
  "#General", "Hello world", CometChat.RECEIVER_TYPE.GROUP);
try {
  await CometChat.sendMessage(message);
} catch (error) {
  console.error(error)
}

// ^^^ JavaScript example, but we have Kotlin and Swift SDKs also

To ship it, you’d need to do a little more work but the basics work like this - you send messages with sendMessage, listen for new messages in real time with a MessageListener and that’s only the surface. You can also fetch message history and show typing indicators, online indicators and read indicators. And thanks to what we call extensions, you’ll easily enable additional features or metadata with no code. Smart Replies is one such extension:

You just enable the Smart Replies extension in your dashboard and our service generates 3 relevant replies using machine learning and includes them alongside the message body:

"@injected": {
  "extensions": {
    "smart-reply": {
      "reply_positive": "This is awesome!",
      "reply_neutral": "That's fine",
      "reply_negative": "This is awful",
      "category": "how_is_it"
    }
  }
}

You can see how it basically works with the flick of a switch. You instruct us to do the additional processing and we include the responses right alongside the message. No need to create additional requests, coordinate your own platform, or set up processing services. Everything you need to build a cutting-edge chat experience in one single place - that is the dream right there!

Extensions are something we’re really excited about and we’re even more excited to see what you build with them. To date, we have helped hundreds of people implement chat and we believe that puts us in a unique position to realise what’s important to them. That helps us focus on releasing updates that keep your chat cutting-edge while you focus on what’s important to you, your team, and ultimately, your business.

Read more about Smart Replies for your specific platform below: