Skip to main content

Overview

Icon Shortcuts is a Beta feature. You configure it through a key-value pair rather than through a template tile on the dashboard. For more information, refer to FAQs and Feature or Product in Beta.
Icon Shortcuts is an Android push template that displays a row of three to six tappable icons. Each icon carries a destination of its own, so a single notification offers up to six entry points into your app. A standard push notification directs every user who taps the notification to the same screen. Icon Shortcuts allows each user to select the destination that matches their interest. Every notification above carries five icons. The notification drawer displays the collapsed state first, and the expanded state appears when the user pulls the notification down. This campaign sets a background color on the card that holds the icons. You choose the icon shape and the card color. The following notifications show the two icon shapes. For the keys that set the shape and the color, refer to Card and Icon Appearance.
Icon Shortcuts requires a device running Android 12 and above and an app built with MoEngage Android SDK BOM 4.5.0 or above. Every other user receives the Basic notification that the campaign carries, so compose its title and message as a complete notification. For more information, refer to Before You Begin.

Use Cases

One Icon Shortcuts notification can serve several intents at once. The following patterns are common:
  • Retail and commerce: You can open a different category from each icon, such as Trending, Bestseller, and New Arrival, or reserve one icon for the current sale.
  • Marketplaces and aggregators: You can show one icon per partner brand and open that brand’s storefront, which suits a shop-by-brand campaign.
  • Offers and promotions: You can dedicate each icon to an offer, such as a seasonal sale, a buy-one-get-one deal, or a cashback campaign.
  • Account and servicing: You can link users to orders, wallet, offers, and support from a single notification, which shortens the path to a routine task.
  • Content and media: You can open a section from each icon, such as news, sport, and video, or give each icon a channel that opens that channel’s live stream.
Each image conveys its meaning on its own, because Icon Shortcuts displays no text beside the icons. Recognizable logos and category symbols work best. For the format, size, and legibility requirements, refer to Choosing Icon Images.

How Icon Shortcuts Work

Icon Shortcuts builds on the Basic notification template. You create a Basic notification campaign and add Icon Shortcuts as a key-value pair. The campaign carries the complete template, so an app that meets the requirements in Before You Begin requires no code change to render it.

What the User Sees

Icon Shortcuts forms the entire content of the notification. The collapsed state and the expanded state use the same icons and differ only in size, so you supply one set of images for both states. A tap on an icon runs that icon’s action and closes the notification by default. A tap outside the icons runs the click action of the Basic notification. Set that click action to the destination that suits a user who taps the notification without choosing an icon, such as your home screen or the campaign’s landing page.

What Happens When Icon Shortcuts Does Not Render

The campaign carries one message, and Icon Shortcuts sits on top of it. Whenever Icon Shortcuts does not render, the device displays the title, message, and image that you entered on the Basic notification. Requirements and Validation Rules lists every condition that leads to this outcome. The Template Backup option does not apply to Icon Shortcuts. The campaign builder offers Template Backup for every template except the Basic notification, and Icon Shortcuts builds on the Basic notification.

Icon Count and Rendered Size

MoEngage fits the icons within the width that the notification area allows, so the number of icons determines the rendered size of each icon. The following table lists the sizes in dp (density-independent pixels), the unit that Android uses to size elements consistently across screens. A sixth icon adds a destination and reduces the size of every icon. Select six icons when the sixth destination matters more than icon size, and select five or fewer when each image needs the larger size to stay recognizable. Some devices use a more compact notification layout, where MoEngage reduces the spacing around the icons. The icon sizes in the preceding table do not change.

Choosing Icon Images

Supply each icon as a square PNG, JPEG, or WebP image. An unsupported format prevents Icon Shortcuts from rendering. Nothing else is enforced, but three choices affect the result:
  • 192 x 192 pixels. A smaller image renders, but appears less sharp on high-density screens.
  • 10 KB or less. Heavier images reduce the rate at which the template posts. When the template does not post, the device displays the Basic notification.
  • One high-contrast symbol. Icons render at 30dp to 44dp, where fine detail and small text are not legible. Place any label inside the image, in one or two words.

Before You Begin

Ensure the following before you build the campaign:
  • SDK version: Your app is built with MoEngage Android SDK BOM 4.5.0 or above, and includes the Rich Notification module (com.moengage:rich-notification). The BOM sets the version of that module, but your app must still include it. Confirm both with your development team.
  • Icon images: You have three to six square icon images in PNG, JPEG, or WebP format, hosted at public HTTPS URLs that anyone can open in a browser. MoEngage recommends 192 x 192 pixels and 10 KB or less per image. For more information, refer to Choosing Icon Images.
  • Destinations: You have the destination for each icon. Your development team provides the deep link or the screen name. An icon that opens a web page inside the app requires no developer involvement.

Step-by-Step Instructions for Sending an Icon Shortcuts Campaign

Step 1: Build the Basic Notification

  1. Create a push campaign. On the Content step, select the Basic notification template.
The Content step of the push campaign builder, showing the template tiles with Basic notification as the first tile
  1. Enter the title, message, and image. For more information, refer to Create Push Campaigns.
  2. Compose the title and message as a complete notification, because every user outside the supported device and SDK version receives this Basic notification in place of Icon Shortcuts.

Step 2: Add Icon Shortcuts as a Key-Value Pair

  1. In Basic Details, locate Key value pairs, then click + New KV pair. The Key value pairs section at the end of Basic Details, below Default click action and URL, with the New KV pair link highlighted
  2. Enter moeFeatures in the Enter key box.
  3. Paste the Icon Shortcuts payload into the Enter value box. Use the following example as the starting point.
The Key value pairs section in Basic Details, below Default click action, with moeFeatures entered as the key and the single-line template JSON entered as the value

Build the Payload

Enter your icons and destinations below, then copy the result into the Enter value box. The builder assembles the same structure as the example that follows, on a single line and ready to paste.

Start from the Example Instead

The value of the moeFeatures key is a JSON block that defines Icon Shortcuts. The example defines five square icons, each of which opens a product category. Copy the Ready to Paste version into the dashboard, and use the Formatted version to read the structure while you replace the values that belong to your campaign. Both versions define the same Icon Shortcuts template. The example points at Unsplash URLs so that you can send a test campaign without hosting images first. Replace them with your own images before you launch. MoEngage does not control third-party URLs, which can change or stop resolving at any time.

Editable Fields

Retain the structural keys exactly as the example defines them: expanded.type, cards[].type, widgets[].type, and showLargeIcon. Icon Shortcuts renders only when expanded.type reads iconShortcuts and each widget’s type reads image. For more information, refer to Requirements and Validation Rules. Set displayName to IconShortcuts. The key is mandatory, and its value affects reporting rather than rendering. MoEngage sends the value as the template_name attribute on the Notification Clicked Android event, so IconShortcuts keeps the click data of every Icon Shortcuts campaign together in one group. For more information, refer to Reporting.
The Ready to Paste version carries no line breaks. If you reformat the JSON while you edit the payload, remove the line breaks and spaces before you paste the payload into the dashboard, and confirm that the payload remains valid JSON. A formatting error prevents Icon Shortcuts from rendering.The 4 KB limit that FCM enforces applies to the complete push message, which carries this payload and the Basic notification together. FCM rejects a message above the limit, so the device receives no notification at all.

Step 3: Test and Launch

  1. Send a test campaign to a device running Android 12 or above.
  2. Confirm that Icon Shortcuts appears. On a standard notification channel, the device shows the Basic notification first and replaces it with Icon Shortcuts a moment later, so a brief appearance of the title and message is expected. On a heads-up notification channel, MoEngage posts Icon Shortcuts directly.
  3. Tap each icon and confirm that the icon opens the destination that you configured.
  4. Publish the campaign once Icon Shortcuts and every destination behave as expected.

Requirements and Validation Rules

Icon Shortcuts renders only when all of the following conditions are true. Icon Shortcuts renders in full or not at all, so one unmet condition under Device and app, Payload structure, or Icons replaces Icon Shortcuts with the Basic notification. The condition under Delivery behaves differently: FCM rejects an oversized message, so nothing reaches the device. Review this checklist before you launch a campaign, and review it again when a test notification arrives without Icon Shortcuts. Device and app
  1. The device runs Android 12 or above.
  2. The app version on the device is built with MoEngage Android SDK BOM 4.5.0 or above and includes the Rich Notification module.
Payload structure
  1. The moeFeatures value is valid JSON.
  2. richPush contains displayName and an android object that contains showLargeIcon. Both keys are mandatory. Neither value affects whether Icon Shortcuts renders: displayName sets the reporting name, and showLargeIcon controls the large icon on the Basic notification.
  3. expanded.type is iconShortcuts.
  4. The first entry in cards carries three keys: a whole-number id, a type, and a widgets list. MoEngage ignores every further entry in cards.
Icons
  1. The first card has three to six widgets whose type is image. Widgets of other types do not count toward the total.
  2. Every widget carries a whole-number id and a content URL.
  3. Every icon has at least one action. A single icon without an action prevents Icon Shortcuts from rendering.
  4. Every image URL uses HTTPS and is publicly reachable, and every image is a PNG, JPEG, or WebP. Dimensions and file size are not enforced. For more information, refer to Choosing Icon Images.
  5. All images finish downloading within 10 seconds in total. A single slow image prevents Icon Shortcuts from rendering.
Delivery
  1. The complete push payload remains within the FCM limit of 4 KB. FCM rejects a message above the limit, so the device receives no notification at all, not even the Basic notification.
A campaign that does not meet one of these conditions raises no error and reports no warning in the dashboard. The user receives the Basic notification instead, which is the only signal that Icon Shortcuts did not render. A payload above 4 KB is the exception, because FCM rejects the message and no notification arrives. Send a test campaign to a device running Android 12 or above before every launch.

Icon Actions

Every icon requires at least one action. Most campaigns open a screen in the app, and an icon can also share text, start a call, copy a code, or record an event. A tap on any icon runs that icon’s action and closes the notification by default. Icons support no dismiss action, so an icon cannot serve as a close control.

Action Examples

Copy the block that you need into an icon’s actions list, and replace the example values with your own. Open a destination
myapp://category/headphones and com.yourcompany.store.ProductActivity are placeholders. Use the values that your development team provides. Record behavior
Act on the device

Custom Data in Actions

A navigate action can carry your own values in kvPairs. MoEngage passes each value to the app when the user taps the icon, and appends the values to the deep link as query parameters. Use kvPairs to identify the campaign or the offer that drove the tap. Confirm the key names with your development team, because the app reads the key names. kvPairs applies to navigate and track actions. The share, call, copy, custom, and coupon actions ignore kvPairs.

Reporting

A tap on an icon records the Notification Clicked Android event, and MoEngage adds three attributes that identify the icon. Assign a distinct widgets[].id to every icon, so that widget_id identifies the destination that the user selected. To compare taps across icons, run a Behavior analysis on the Notification Clicked Android event and apply Split by to widget_id. A tap outside the icons records the same event with template_name alone. The absence of widget_id marks the tap as a tap on the notification body. To record an event under a name of your own, add a track action to the icon. MoEngage then records that event in addition to the Notification Clicked Android event. For more information, refer to Icon Actions.

Card and Icon Appearance

Set the following three keys inside style to control the shape of the icons and the appearance of the card that holds them. The first notification at the top of this page sets bgColor to a pale pink. The color fills the card that holds the icons, and the notification keeps its own background around it. Choose a color that holds its contrast against your icon images. The icons sit directly on this color, so a light icon on a light card loses its edges.

Advanced Settings

Settings That Work with Icon Shortcuts

Configure the following settings in the Advanced section of the Basic notification:
  • Auto Dismiss, which clears the notification after the time that you set.
  • Group Key, which groups the notifications that share the key under one summary. Device manufacturers handle grouping in their own way, so the grouping appears on most devices rather than on all. For more information, refer to Push Notification Grouping.
  • Update Key, which replaces an earlier notification that shares the key. The replacement also applies when the campaign delivers the Basic notification. For more information, refer to Push Notification Update.

Settings That Do Not Apply to Icon Shortcuts

  • Text. Icon Shortcuts carries no title, message, or summary. That text reaches the user only through the Basic notification.
  • Action buttons. The buttons that you configure on the campaign appear only with the Basic notification.
  • A large icon. The template reserves no space for one, so a large icon on the campaign appears only with the Basic notification.
  • A separate click action for the notification body. A tap outside the icons runs the click action of the Basic notification.

Payload Reference

Use the following tables to verify a value or to review a payload that someone else assembled.

richPush Fields

MoEngage ignores unrecognized keys, so an unsupported key leaves Icon Shortcuts intact.

expanded Fields

Card and Widget Fields

Action Types

Track Action Types

kvPairs.valueOf carries one value, so a track action records a single event attribute or sets a single user attribute. The kvPairs on a navigate action do not serve as an alternative, because MoEngage passes those values to the app rather than recording them. For more information, refer to Custom Data in Actions.

FAQs

Icon Shortcuts is a Beta feature. During the beta, the campaign builder does not provide a dedicated template tile, so you configure the template in the moeFeatures key-value pair rather than through on-screen fields.This affects campaign configuration only. After delivery, Icon Shortcuts renders and reports in the same way as every other push template.To request a dedicated template tile in the campaign builder, submit a feature request through your MoEngage account manager or MoEngage Support.
An app already built with MoEngage Android SDK BOM 4.5.0 or above, with the Rich Notification module included, requires no change to its code, because the campaign carries the entire template in the moeFeatures key-value pair. Your development team confirms the version and supplies the deep link or the screen name for each icon. An icon that opens a web page inside the app requires neither.An app on an earlier version needs an SDK upgrade and an app release before Icon Shortcuts reaches your users. For more information, refer to Push Templates for Android Developers.
The device, the app, or the payload does not meet one of the requirements for Icon Shortcuts, and every cause produces the same result. Review Requirements and Validation Rules in order.
Icon Shortcuts renders and the action runs, so review the destination. Confirm with your development team that the app recognizes the deep link or the screen name that you entered, and that you copied the value exactly.
A tap outside the icons runs the click action of the Basic notification rather than an icon action. Set that click action to the destination that suits a tap outside the icons.
Icon Shortcuts carries no text, and each image conveys its meaning on its own. The title and the message that you enter on the Basic notification reach the users who receive the Basic notification. An icon that needs a label carries the label inside the icon image.
Every icon runs the action that you configure and then closes the notification, so an icon cannot serve as a close control. To clear the notification without a user action, set Auto Dismiss on the Basic notification.
These users receive the title, message, and image that you entered on the Basic notification, which is the only message that reaches them. Compose it as a complete message.
Yes. MoEngage records the icon in the widget_id attribute on the Notification Clicked Android event, alongside template_name and card_id. For more information, refer to Reporting.