Anyway, I’ve to warm you. We’ve tested this integration in Glucosio and email are not fast enough for Instant Messaging. They can take from 5 to 30 minutes to arrive so the whole “Live” Chat feature would be pointless.

Smooch supports other integrations as well: Slack, Facebook Messenger, HipChat, Zendesk, Telegram and more. Since Slack is very popular with startups, we’ll choose it in this example.

Adding a new integration isn’t difficult at all. Just go to your Smooch Dashboard and click the button “Connect to Slack” in the Integrations section.

Due to a Slack limitation, Smooch can’t create private channels to manage your chats. For this reason I warmly suggest you to create a new Slack account, separate from your primary one (for example you can name it appname-support) and invite only your support guys in it.

Now each time an user contacts you through your app’s chat, a new Slack channel will be created and you’ll be able to reply to him just writing

/sk your_message

For example /sk Hi, how can we help you?

You can also get more information about the user (device model, OS version, network) writing:

/sk !profile

Channel names are generated randomly but you can use Smooch SDK to associate each user with a name or an email account and use it to make channel name relevant. Read more about this on Smooch documentation.

Google Cloud Messaging

Now that you’ve configured how to reply to user messages, you need a way to let the user know that a new message has arrived. In this situation, Google Cloud Messaging is your friend.

Send data from your server to your users’ devices, and receive messages from devices on the same connection. The GCM service handles all aspects of queueing of messages and delivery to client applications running on target devices.

Did I also say it’s completely free? :)

To configure it, simply go to Google’s cloud messaging documentation and click on the button GET A CONFIGURATION FILE. Put the generated file (google-services.json)in the root directory of your project.

Remember to take note of the Server API Key and the Sender ID, we’ll need those later.