# Inbox

## Overview

Inbox is a separate communication channel similar in functionality to Facebook notifications.

From the end-user perspective, it allows users to view and manage all their notifications in one place. It acts as a centralized hub for all notifications, making it easier for users to stay informed about the latest updates and interactions on your platform.

<figure><img src="/files/5iiAkO1TjzJBkHvZfgaf" alt=""><figcaption><p>Gamification: List of Inbox messages</p></figcaption></figure>

{% hint style="info" %}
"Inbox communication channel" is enabled for any setup with CRM Automation. This is including the possibility to send "simple" inbox messages, and the end-user is able to see them as part of the Gamification widget.

"Inbox widget" is an additional feature that needs to be enabled on your setup. It provides additional possibilities to:

* Send notifications with rich content with the support of HTML
* Displaying notifications in a separate widget independent from the Gamification widget
* Possibility to get real-time updates about the count of unread messages per user

All setups are limited to 1 million notification messages per month by default.

Please contact your Success Manager for more details.
{% endhint %}

The Inbox can be accessed from the main Gamification widget or by clicking on the bell/envelope icon that you can place on the front end of your platform. Once you click on the bell icon, the Inbox widget will appear, displaying all the latest notifications.

<figure><img src="/files/UvKUOXfqinr0Gpvk72CS" alt=""><figcaption><p>BO: Example of inbox notifications</p></figcaption></figure>

Users can interact with notifications by adding them to their favorites, expanding a notification if it has additional details, or marking all notifications as read.

## Inbox template

From the operator's perspective, every notification can have the following attributes

* Title - a short subject for the notification
* Body - a short presentation of the notification
* Rich body - is an extended presentation of the notification with support of the HTML formatting
* Icon - for the visual representation of the inbox notification
* Deep link or URL - to direct the user when he is clicking on the inbox
* Open Links - choose whether links within the message will open in a new window or the current one
* Enable "zoom" mode for images - zoom in on images by clicking on them within the message

<figure><img src="/files/QcE3p3xLCqlSXfY2c5Od" alt=""><figcaption><p>BO: Rich body Inbox setup</p></figcaption></figure>

There are 2 types of notification messages that behave in different ways:

* Simple inbox - has only a title, a short description, and an icon. Clicking such a message will navigate the user to a specified deep link or URL.
* Inbox message with a rich body - has an additional rich body, clicking on such a message will open the Inbox widget with the latest notification in focus and with an expanded rich body. Deep links or URLs for this type of notification should be set inside the HTML of the rich body.

There is a set of additional configurations for the Inbox notifications:

* For how long the inbox message will stay on the screen when sent to the user, the default value is 7 seconds, and can be adjusted for each inbox template
* For how long the inbox message will stay in the notification center of the user, the default value is 30 days, and it can be adjusted for each inbox template. You can choose between a relative period or an exact date when the message will disappear.
* For the "Inbox widget", you can define how it can be closed - either by clicking on the "X" icon inside the inbox widget or, additionally, by clicking outside of the widget
* You can configure it to show a preview of the message for a short period when the user is online, and define the position of that message for mobile and desktop devices, either in label settings or individually per template.

## Inbox message lifecycle

There are the following lifecycle stages of the inbox message

* The message is created as part of the Journey or Scheduled campaign
* If the user is online, it will be delivered to him; otherwise, it will stay in the delivery pool for the period specified by the operator (20 seconds by default)
* When a message is delivered to the end user while he is online, it appears as a "Simple inbox message" in the bottom-right corner of the screen. At this moment, the message's "impression" will be recorded.
* If the message is defined as "Simple," clicking it will take the user to the Deep Link or URL specified in the template.
* If the message has a rich body, clicking it opens the Inbox widget with the message in focus.
* The "read" status of the message will be set when the user clicks the message, regardless of whether the message has a rich body.

{% hint style="info" %}
**Caps impact**

You can configure user-level and global-level caps for Inbox messages.

If they are set up and reached, then the "Simple inbox message" will not be shown to the end-user, but the message will still be available in the history of the inbox for a particular user.
{% endhint %}

#### **Recall Inbox messages**

Initiating a recall will instantly remove a message from all recipients' inboxes. This is most helpful for messages that have already been sent and appear to be inaccurate or outdated.

<figure><img src="/files/5SeKPVtVrs5R9jbNaVD9" alt=""><figcaption><p>BO: Example of recalling an inbox message</p></figcaption></figure>

## Sending inbox messages through the API

You can send messages to end users via the Smartico REST API.

General documentation about Smartico REST API can be found in the Back Office in the Label \ Using Rest API section.

To make a call to the API, you need to specify a private authorization key, which you can request from your Success Manager.

```bash
curl --request POST \
--url 'https://apis.smartico.ai/api/external/events/v2' \
--header 'Authorization: your-private-auth-key' \
--header 'Content-Type: application/json'
```

{% hint style="info" %}
Note: depending on your setup and geographical location, the URL of the API can be different
{% endhint %}

Example of the JSON body to deliver an inbox message

```jsonp
[
    {
        // unique UUID of the request
        "eid": "96b60b08-25f0-4129-b363-ef0d4db780ef",
        // UTC timestamp of the request
        "event_date": 1680106470149,
        // brand_id as it is identified in your system. 
        // if you don't know, please consult with your Success Manager
        "ext_brand_id": "your-external-brand-id",
        "user_ext_id": "id-of-the-user-your-system",
        "event_type": "core_personal_message",
        "payload": {
            "title": "Title of the inbox message",
            "short_message": "Short message",
            "rich_message": "<b>some rich message</b>",
            "icon": "https://mycnd.com/image.png",
            "channel": "inbox-api"
        }
    }
]
```

Before sending the message, you need to create Journey and Inbox templates in the Smartico BackOffice.

You should create an inbox message template as defined in the screenshot below. Pay attention to the tag names; they should match the field names sent in the API request. You can also add your own styles and HTML in the rich message that will be used for all the messages you are going to send.

<figure><img src="/files/IjLthO9IP8TNIEKwQzxR" alt=""><figcaption><p>BO: Setup of Inbox with API events</p></figcaption></figure>

The journey should be triggered by "Core: send personal message" trigger and the "inbox-api" should be set for the "Core: personal message channel", as specified in the screenshot below.

<figure><img src="/files/Sw5lMi1SZWymKnZr8bLA" alt=""><figcaption><p>BO: Setting the trigger for the Journey</p></figcaption></figure>

You should set the entry mode to "Every time conditions are met.." and campaign duration to 1 minute.

<figure><img src="/files/8Kl8QwJQvvrb4wax6Jct" alt=""><figcaption><p>BO: Journey setup suitable for Inbox</p></figcaption></figure>

Create a Journey flow as shown on the screen below. Use the Inbox template created before.

<figure><img src="/files/9HDgEodBVcm2acYpJwSO" alt=""><figcaption><p>BO: Journey flow with Inbox</p></figcaption></figure>

## Technical integration

For the technical details related to the integration of the Inbox widget, please refer to[ ](/welcome/technical-guides/front-end-integration/extended-integration.md#inbox-widget)the [Extended integration](/welcome/technical-guides/front-end-integration/extended-integration.md#inbox-widget) article.

## Revamped Inbox

We've entirely redesigned our Inbox feature. This update offers a more intuitive and enjoyable experience when navigating messages, staying updated with notifications, and effortlessly managing your communications.

<figure><img src="/files/EneLps7vO35RnXp9J4GO" alt=""><figcaption><p>Gamification: Example of message with rich body</p></figcaption></figure>

**New Improvements:**

* **CTA Buttons** - we've introduced two new call-to-action (CTA) buttons for messages with rich content, which are also visible within the notifications. They can be configured through the BO, allowing operators to include deep links in both primary and secondary message buttons.
* **All tab** and **Favorite tab** - offer distinct and clear separation between all your messages and those designated as favorites.
* **Show unread toggle** - with the new switch, you can effortlessly view all unread messages in both the All and Favorites tabs.
* **Enhanced expand mode for messages** - Regardless of rich content, all messages can now be expanded for improved readability and clarity.

<figure><img src="/files/5aXCqUbyltP8CQQ1AavK" alt=""><figcaption><p>Gamification: Example of simple inbox message</p></figcaption></figure>

* **Back-to-top button** - Our latest update includes a back-to-top button for seamless navigation back to the top of the page with a single click after scrolling down.
* **Load more button** - for a better user experience we have added the Load more button. After the 20th message, click the 'Load More' button to reveal additional messages.
* **Empty inbox animation** - we have added an animation for the cases where you don’t have any messages in the inbox.
* **The stand-alone mode** was also revamped

<figure><img src="/files/5pD6c4mYUf4Hrbqzj1b5" alt=""><figcaption><p>Gamification: Example of standalone inbox</p></figcaption></figure>

## Add sound for incoming inbox messages

You can enable a sound alert when players receive an inbox message. The setting, **'Enable sound for receiving inbox,'** is located in the inbox template within the BO. By default, this option is turned off, meaning no sound will play when a message arrives. When enabled, players will hear a default notification sound, and you can also upload a custom sound of your choice.

<figure><img src="/files/ymsFTCMv0LpZw8vrlxjF" alt=""><figcaption><p>BO: Setup sound for receiving inbox</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.smartico.ai/welcome/products/crm-automation/communication-channels/inbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
