We’re excited to announce today the release of two new webhooks: Presence and Receipts. With these new webhooks — in addition to our popular Before and After Message webhooks — customers now have the foundation to do two important things very well:
Build chat features that directly support almost any business goal they're pursuing, and
More deeply understand the interactions between users that occur on their platforms.
The net effect is an incredibly flexible platform that helps customers move beyond simple engagement and retention goals to solving challenging business problems and addressing specific metrics.
For example, consider SaleBirdie, a fictional online marketplace that connects independent crafters and makers with buyers. SaleBirdie would like to increase the number of completed transactions on its platform.
With CometChat, SaleBirdie could be automatically notified when a user logs into chat via the Presence Webhook. The company could run a check for unpurchased items in that customer’s cart and then, if appropriate, send a prompt via chat to the customer to complete the transaction. They could potentially offer a discount, highlight the scarcity of the item, or highlight some other incentive to purchase. The result here would obviously be more transactions.
Now consider a second example. The fictional BestRoast chain of coffee stores is in the midst of rolling out a new standard for how they prepare their Caffe Mocha drink — it’s now three pumps of syrup instead of five. With CometChat’s Presence and Delivered and Read Receipts webhooks, BestRoast can distribute the new policy when a barista logs onto its employee-facing app, see how many baristas have seen the message, and how many have read the message. It could even prompt employees to acknowledge receipt for added confidence that the new policy will be followed. The result in this case is a streamlined rollout of a new policy and more actionable intelligence on how quickly and widely it is adopted.
These are just a few of the use cases we’ve imagined. Our customers — including Shaadi.com, India’s largest matrimonial service — are already inventing others. We’re very excited to see what you all will come up with.
How do I access and use these Webhooks?
Webhooks are available to anyone on a Pro or Custom Plan. Customers who are on a legacy plan can quickly find out if they have access to webhooks by logging on to their dashboard.
Implementing a webhook is easy. Let's look at how you’d implement and configure the Presence Webhook, which monitors and notifies you when a user’s online presence has changed. First, go to the CometChat dashboard and find the ‘Webhooks’ section on the left navigation panel and look for the ‘after_connection_status_changed’ event Webhook.
We can create a Webhook to listen for this event:
Once this webhook is created and enabled, CometChat servers will send a HTTP request to this URL when any user either goes online or offline. You can then act on this data in whatever way will serve your goals.
An example of the data that is sent to the Webhook URL for Presence event is here:
As always, our documents are the best place to learn more about how to implement and integrate CometChat, including:
Webhooks are a key component of CometChat’s outstanding flexibility
One of CometChat’s core product tenants is flexibility. We serve smart customers and we view our role as building a robust tool with which our customers can build whatever they imagine. Webhooks are one way we ensure that our platform is maximally flexible.
It’s that same tenant that drives our extensions, which is designed to increase the functionality of our platform by integrating with other best-in-class providers.
Very shortly we’ll host an Office Hours dedicated to our new webhooks. Over the next few months we’ll continue to build out documentation, use cases, and more to make sure that the developer experience around webhooks is up to par.