In-App Inbox Guide - What is it and how to implement in code?

Nik L. - Jan 18 - - Dev Community

Interact w/ Inbox Playground - Here

Documentation - Here

React Inbox Github Repo - Here


Consider prominent social media platforms like LinkedIn and Facebook, where the bell icon notification center commands immediate attention. This central hub not only informs users of updates aligned with their interests but also accentuates activities necessitating attention, providing clear guidance on requisite actions.

What attributes contribute to the in-app Inbox achieving a remarkably high open rate of 75%, surpassing email engagement by approximately twice and outpacing push notifications by around threefold?

Image description

Exploring Use Cases and Building the Perfect Inbox Experience

In this section, we delve into the diverse applications of the In-App Inbox as a communication channel, explore various in-app notification types, and present a comprehensive guide on crafting an optimal Inbox experience for your users. This exploration goes beyond merely adding a feature; it entails a strategic enhancement of your product's notification capabilities to deliver a superior user experience.

Why is Web/ Mobile App Inbox a Necessity for Modern Applications?

The In-App Inbox isn't positioned as a replacement for email or other communication channels; instead, it thrives when integrated into a larger multichannel communication framework. Think of it as a missing link seamlessly integrating into your communication ecosystem, amplifying your brand's reach. Several compelling reasons underscore the value of incorporating in-app notifications into your product:

  1. Reduce Notification Overload

In an era dominated by constant notifications across various channels, the In-App Inbox addresses the need for a centralized and unobtrusive notification experience. With email and SMS channels becoming crowded, in-app notifications offer a focused environment for users to access relevant messages, ensuring crucial updates aren't lost in the noise.

In a well-designed notification system, strategic routing to the in-app channel before resorting to attention-seeking channels significantly mitigates notification overload. Certain notifications, like task updates or document mentions, are best consumed at the user's preferred time, enhancing overall user experience. Check push notification vs mobile inapp inbox notification.

  1. Great Supplementary Channel for Missed Notifications

Serving as a centralized repository, the Inbox enables users to catch up on notifications they might have missed on other channels. Unlike push channels, where messages are lost upon dismissal, Inbox notifications persist, storing the record of all notifications for convenient later reference. Grouping notifications using tabs enhances convenience, facilitating efficient filtering within the Inbox. You can check about 5 mobile app inbox notification use-cases to get started.

  1. Real-time Notification for Active Users

For products with high visit rates, such as SaaS applications, workflow management platforms, and collaboration tools, the Inbox becomes the go-to channel for real-time communication. By sending notifications directly into the application, it minimizes the need for users to switch contexts, leading to improved response times and rates. This is particularly valuable for actions users need to take within the product without leaving the application.

  1. Long-lived Notifications

Inbox notifications boast a longer lifespan, residing in the inbox as long as the company or user deems necessary. This proves ideal for updates and actions requiring future reference, such as offers, referral codes, or impending payments. The flexibility to set expiration dates and update notification content ensures relevance and accuracy.

  1. Ideal for Collaboration and Workflow Automation Tools

In B2B SaaS applications, especially those focusing on workflow automation and collaboration, the Inbox becomes indispensable. Ensuring timely updates while users are within the product prevents delays in action. This is particularly critical in scenarios involving collaboration across different companies or departments on multiple projects. The Inbox, as seen in platforms like Jira or Notion, efficiently consolidates information, surpassing scattered notifications on out-of-app channels.


Exploring Notification Experiences: Selecting the Right Interface

In this section, we examine the various in-app notification experiences related to the Inbox, namely Full Page Inbox, Floating or Side Panel Inbox (Feeds), and Toasts. Each serves a distinct purpose, catering to diverse user experiences. Let's delve into the specifics of each type to comprehend when and why you might employ them in your product. Additionally, combining these experiences within your product for a tailored approach is also discussed.

Full Page Inbox

A dedicated page within your product designed to showcase Inbox notifications, the Full Page Inbox is well-suited for collaboration and workflow management tools. Here, daily task checklists and activity updates find a home inside the Inbox. Users can seamlessly view new and historical notifications, refine displayed notifications, and utilize the Inbox as a task list for actionable items. This functionality, reminiscent of email inboxes, is exemplified in tools like Jira and Asana.

Full Page Inbox

Floating or Side Panel Inbox (Feeds)

This variant of a full-page inbox serves a slightly different purpose, primarily focused on sharing updates, akin to social media platforms or collaboration tools such as Notion. Notifications are displayed in reverse chronological order, accompanied by a bell icon indicating unread notifications. Users can access the feed through a popover or side panel, taking actions like marking notifications as read/unread or archived.

Floating and Side Panel Inbox

Feeds prove suitable for products where a full-page Inbox might be excessive. Hubspot and Trello illustrate instances where notification feeds efficiently guide users through updates and comments without the need for a dedicated page. For products heavily reliant on notifications for day-to-day actions, a combination of both Feed and a Full Page Inbox can be employed, with the feed showing the latest updates and the Full Page Inbox acting as a comprehensive list of older alerts.

Toasts

Notification Toasts deliver real-time notifications through transient UI elements that pop up on the screen and then disappear. Best used for time-sensitive updates, Toasts draw users' attention while actively using the product. Caution is advised to use Toasts sparingly, as they can become a distracting UI pattern when overused.

Image description

In SuprSend, Feeds, Full Page Inbox, and Toasts can all be implemented with the same Inbox component, offering basic customization for a tailored user experience.

Anatomy of Notification Feed

Image description

Image: Anatomy of Notification Feed

Floating Inbox - Component Breakdown

No. UI Component Description
1. Bell Icon with Counter Displays the number of new notifications since the last Inbox opening.
2. Header Section Contains the title of the Inbox, along with filters and general actions like Mark all as read.
3. Mark all as Read An action button to mark all unread notifications as read.
4. Filter Allows the addition of filters for users to refine notifications, like showing only unread notifications. Helps users reach the required notification faster.
5. Tabs Used for categorization and grouping of notifications, based on status (read, unread) or type (mentions, replies).
6. Notification Card Displays the actual notification content, including title, body, buttons, avatar, and subtext.
7. Notification Text Contains the title and body of the notification, with rich text content.
8. Subtext Used for notification tags or supplementary information, such as 20 likes . 5 comments in a LinkedIn post update.
9. Unread Dot Distinguishes between notification states (Read and Unread), crucial for easy differentiation.
10. Buttons Navigation buttons for internal product pages and external links, or for driving inline actions like opening a modal or triggering internal functions.
11. Avatar Displays user profile images, company logos in social media platforms, or icons to distinguish between various notification types.
12. Received at Time Displays the timestamp of when a notification was received, crucial for providing context.
13. Footer Ideal for displaying powered by tags for branding or static content similar to Jira's message: "That’s all your notifications from the last 30 days."

Crafting the Ideal Inbox Experience: A Technical Guide

To integrate in-app notifications seamlessly into your product, it is essential to construct two major components:

  1. Frontend UI Development:

    • Design an intuitive user interface on the frontend that facilitates user interaction with notifications.
    • Implement features for composing and formatting various message elements, including avatars, buttons, images, and rich text messages.
    • Utilize our Figma design kit for modern in-app notification feed designs, serving as a valuable starting point for your team.
  2. Backend System Implementation:

    • Establish a robust database infrastructure to store and manage messages, user preferences, and relevant data.
    • Develop server-side infrastructure to handle message processing, storage, and delivery.

Backend Responsibilities:

  1. Infrastructure:
    • Set up a resilient database system for efficient storage and management of messages and user preferences.
    • Implement server-side infrastructure to process, store, and deliver messages.

Image description

  1. User Authentication and Authorization:

    • Incorporate secure user authentication and authorization mechanisms, such as HMAC or JWT tokens, to prevent unauthorized access to the Inbox service.
  2. Real-Time and Cross-Browser Synchronization:

    • Integrate web socket connections for real-time updates from the database, ensuring users receive messages instantly without manual refreshes.
    • Ensure synchronization across different browsers and devices for a seamless user experience.
  3. State Management:

    • Implement effective state management to track notification status, user interactions, and message read/unread states.
    • Set notification expiry and provide options for users to archive or delete notifications.
  4. Aggregation and Filtering:

    • Introduce tabs and filtering options in the Inbox for organized notifications.
    • Display new notification counts on the bell icon and unread notification counts on each tab for user awareness.
  5. Observability Layer:

    • Develop an observability layer to track channel performance and facilitate effective debugging of customer-facing issues.
  6. Designing for Scale and Reliability:

    • Evaluate the scalability and reliability of the system, addressing challenges associated with high write volumes in a notification system.

Beyond these considerations, a well-designed notification system should feature intelligent routing mechanisms, allowing notifications to be routed among multiple channels based on interaction and delivery status. Additionally, building a preference management system to enable users to opt out of specific notification categories and tailoring Inbox feeds and designs for different tenants in a multi-tenant system is crucial.


Implementing Inbox with SuprSend:

Building an Inbox experience in-house can be resource-intensive. Consider SuprSend as a viable alternative, offering a ready-to-use Inbox component that can be seamlessly integrated into your product in less than an hour. SuprSend provides a comprehensive solution with multi-channel notification support, observability, notification routing, user preferences, and multi-tenant support for an enhanced notification experience.

With SuprSend Inbox, you can:

  • Create modern Inbox designs native to your product using customizable UI components or build your own UI with a headless library.
  • Implement varied in-app experiences, choosing from a full-page Inbox, Notification feed with floating and side panel views, or toast notifications.
  • Easily pass any type of notification content (avatar, header, buttons, image, and rich text) using intuitive form editors.
  • Organize, group, and filter notifications seamlessly with tabs.
  • Handle various click actions, such as opening links, launching modals, or calling internal functions like approve.
  • Gain complete observability into notifications with state management features like mark as read/unread, clicked, and archive.
  • Experience real-time notification synchronization and cross-browser/device notification state synchronization without the need for infrastructure setup and maintenance.

Moreover, SuprSend extends beyond in-app notifications, offering capabilities for scheduling, batching, and orchestrating notifications across multiple out-of-app channels, along with managing user preferences, all without the need for custom application code.

Ready to explore SuprSend Inbox? Check out our live demo or delve into the documentation for a comprehensive understanding of this feature.


  1. Implement In-App Inbox Notification Center In Your Angular App With 7 Lines of Code

  2. Implement In-App Inbox Notification Center In Your Flutter App With 8 Lines of Code


You may want to check out other SuprSend SDKs too. Consider giving us a star after usage. It's free and open.

GitHub logo suprsend / suprsend-go

SuprSend SDK for go

suprsend-go

SuprSend Go SDK

Installation

go get github.com/suprsend/suprsend-go
Enter fullscreen mode Exit fullscreen mode

Usage

Initialize the SuprSend SDK

import (
    "log"

    suprsend "github.com/suprsend/suprsend-go"
)

func main() {
    opts := []suprsend.ClientOption{
        // suprsend.WithDebug(true),
    }
    suprClient, err := suprsend.NewClient("__api_key__", "__api_secret__", opts...)
    if err != nil {
        log.Println(err)
    }
}
Enter fullscreen mode Exit fullscreen mode

Trigger Workflow

package main
import (
    "log"

    suprsend "github.com/suprsend/suprsend-go"
)

func main() {
    // Instantiate Client
    suprClient, err := suprsend.NewClient("__api_key__", "__api_secret__")
    if err != nil {
        log.Println(err)
        return
    }
    // Create WorkflowTriggerRequest body
    wfReqBody := map[string]interface{}{
        "workflow": "workflow-slug",
        "recipients": []map[string]interface{}{
            {
                "distinct_id": "0f988f74-6982-41c5-8752-facb6911fb08",
                // if $channels is present, communication will be tried on mentioned channels only (for this request).
                // "$channels": []string{"email"},
Enter fullscreen mode Exit fullscreen mode

GitHub logo suprsend / suprsend-py-sdk

SuprSend SDK for python3

suprsend-py-sdk

This package can be included in a python3 project to easily integrate with SuprSend platform.

Installation

suprsend-py-sdk is available on PyPI. You can install using pip.

pip install suprsend-py-sdk
Enter fullscreen mode Exit fullscreen mode

This SDK depends on a system package called libmagic. You can install it as follows:

# On debian based systems
sudo apt install libmagic

# If you are using macOS
brew install libmagic
Enter fullscreen mode Exit fullscreen mode

Usage

Initialize the SuprSend SDK

from suprsend import Suprsend
# Initialize SDK
supr_client = Suprsend("workspace_key", "workspace_secret")
Enter fullscreen mode Exit fullscreen mode

Following example shows a sample request for triggering a workflow. It triggers a pre-created workflow purchase-made to a recipient with id: distinct_id, email: user@example.com & androidpush(fcm-token): __android_push_fcm_token__

from suprsend import WorkflowTriggerRequest
# Prepare Workflow body
wf = WorkflowTriggerRequest(
  body={
    "workflow": "purchase-made"
    "recipients": [
        {
          "distinct_id": "0f988f74-6982-41c5-8752-facb6911fb08",
          # if $channels is present, communication will be tried on mentioned
Enter fullscreen mode Exit fullscreen mode

GitHub logo suprsend / suprsend-node-sdk

Official SuprSend SDK for Node.js

suprsend-node-sdk

This package can be included in a node project to easily integrate with SuprSend platform.

Installation

npm install @suprsend/node-sdk@latest
Enter fullscreen mode Exit fullscreen mode

Initialization

const { Suprsend } = require("@suprsend/node-sdk");

const supr_client = new Suprsend("workspace_key", "workspace_secret");
Enter fullscreen mode Exit fullscreen mode

It is a unified API to trigger workflow and doesn't require user creation before hand. If you are using our frontend SDK's to configure notifications and passing events and user properties from third-party data platforms like Segment, then event-based trigger would be a better choice.

const { Suprsend, WorkflowTriggerRequest } = require("@suprsend/node-sdk");
const supr_client = new Suprsend("workspace_key", "workspace_secret");

// workflow payload
const body = {
  workflow: "_workflow_slug_",
  actor: {
    distinct_id: "0fxxx8f74-xxxx-41c5-8752-xxxcb6911fb08",
    name: "actor_1",
  },
  recipients: [
    {
      distinct_id: "0gxxx9f14-xxxx-23c5-1902-xxxcb6912ab09",
      $email: ["abc@example.com"
Enter fullscreen mode Exit fullscreen mode

GitHub logo suprsend / suprsend-react-inbox

SuprSend SDK for integrating inbox functionality in React applications

@suprsend/react-inbox

Integrating SuprSend Inbox channel in React websites can be done in two ways:

  • SuprSendInbox component which comes with UI and customizing props.
  • SuprSendProvider headless component and hooks, incase you want to totally take control of UI. (example: Full page notifications).

Detailed documentation can be found here: https://docs.suprsend.com/docs/inbox-react

Installation

You can install SuprSend inbox SDK using npm/yarn

npm install @suprsend/react-inbox
Enter fullscreen mode Exit fullscreen mode

SuprSendInbox Integration

After installing, Import the component in your code and use it as given below. Replace the variables with actual values.

import SuprSendInbox from '@suprsend/react-inbox'
import 'react-toastify/dist/ReactToastify.css' // needed for toast notifications, can be ignored if hideToast=true

// add to your react component;
<SuprSendInbox
  workspaceKey='<workspace_key>'
  subscriberId='<subscriber_id>'
  distinctId='<distinct_id>'
/>
Enter fullscreen mode Exit fullscreen mode
interface ISuprSendInbox {
  workspaceKey: string
  distinctId: string | null
  subscriberId: string | null
  tenantId?: string
  stores?: IStore[]
  pageSize?: number
  pagination?: boolean
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . .