diff --git a/gatsby-config.js b/gatsby-config.js index 08458ed89b..b030bbc433 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -962,9 +962,29 @@ module.exports = { title: "Carousel", path: "/resources/reference/push-notifications/templates/carousel" }, + { + title: "Input Box", + path: "/resources/reference/push-notifications/templates/input-box" + }, + { + title: "Multi Icon", + path: "/resources/reference/push-notifications/templates/multi-icon" + }, + { + title: "Product Catalog", + path: "/resources/reference/push-notifications/templates/catalog" + }, + { + title: "Rating", + path: "/resources/reference/push-notifications/templates/rating" + }, { title: "Timer", path: "/resources/reference/push-notifications/templates/timer" + }, + { + title: "Zero Bezel", + path: "/resources/reference/push-notifications/templates/zero-bezel" } ] } diff --git a/src/pages/resources/reference/push-notifications/android/index.md b/src/pages/resources/reference/push-notifications/android/index.md index 5b1b60c968..b6832a6ac7 100644 --- a/src/pages/resources/reference/push-notifications/android/index.md +++ b/src/pages/resources/reference/push-notifications/android/index.md @@ -14,7 +14,7 @@ This document outlines the steps required to configure your app to use default p -Default push template functionality is available for use with the **Adobe Campaign Classic** extension.

Supported versions are **Android SDK version >= 2.1.0 && < 3.0.0** and **iOS SDK version 5.0.0+**. +Default push template functionality is available for use with the **Adobe Campaign Classic** extension.

This is supported by **Android SDK version 3.1.0+**. ## Setup diff --git a/src/pages/resources/reference/push-notifications/index.md b/src/pages/resources/reference/push-notifications/index.md index 3c62c0d5f7..ceb190f290 100644 --- a/src/pages/resources/reference/push-notifications/index.md +++ b/src/pages/resources/reference/push-notifications/index.md @@ -12,7 +12,7 @@ keywords: -Default push template functionality is available for use with the **Adobe Campaign Classic** extension.

Supported versions are **Android SDK version >= 2.1.0 && < 3.0.0** and **iOS SDK version 5.0.0+**. +Default push template functionality is available for use with the **Adobe Campaign Classic** extension.

This is supported by **Android SDK version 3.1.0+** and **iOS SDK version 5.0.0+**. ## Setup @@ -22,3 +22,32 @@ Default push template functionality is available for use with the **Adobe Campai ## Templates View the [list of supported templates](./templates/). + +## Image specifications + +The tables below contain guidelines for your push notification content. **These recommendations help your images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +**Android** + +| Image type in notification payload | Aspect Ratios | Image Size | Supported File Types | File Source | +| :--------------------------------: | :---------------------------: | :--------: | :------------------: | ------------------------------------ | +| adb_image | 1:1, 3:2, 5:4, 4:3, 2:1, 16:9 | < 1 MB | PNG, JPG, WebP | Remote URI | +| adb_small_icon | 1:1 | < 1 MB | PNG, JPG, WebP | Bundled Drawable Asset | +| adb_large_icon | 1:1 | < 1 MB | PNG, JPG, WebP | Remote URI or Bundled Drawable Asset | +| Multi-icon images | 1:1 | < 1 MB | PNG, JPG, WebP | Remote URI or Bundled Drawable Asset | +| Rating icon images | 1:1 | < 1 MB | PNG, JPG, WebP | Remote URI or Bundled Drawable Asset | +| Carousel images | 1:1, 3:2, 5:4, 4:3, 2:1, 16:9 | < 1 MB | PNG, JPG, WebP | Remote URI | +| Filmstrip carousel images | 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | Remote URI | +| Horizontal product catalog images | 2:1, 16:9 | < 1 MB | PNG, JPG, WebP | Remote URI | +| Vertical product catalog images | 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | Remote URI | + +`adb_image` is used as the main image in basic, input box, remind later, timer, and zero bezel notifications. + +**iOS** + +| Image type in notification payload | Aspect Ratios | Image Size | Supported File Types | File Source | +| :--------------------------------: | :-----------: | :-----------: | :------------------: | ----------- | +| adb_media | 2:1 | 50 KB to 1 MB | PNG, JPG, WebP | Remote URI | +| Carousel images | 2:1 | 50 KB to 1 MB | PNG, JPG, WebP | Remote URI | + + `adb_media` is used as the main image in basic and timer notifications diff --git a/src/pages/resources/reference/push-notifications/templates/assets/android_auto_carousel.gif b/src/pages/resources/reference/push-notifications/templates/assets/android_auto_carousel.gif new file mode 100644 index 0000000000..34f6774f5e Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/android_auto_carousel.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/android_basic.gif b/src/pages/resources/reference/push-notifications/templates/assets/android_basic.gif new file mode 100644 index 0000000000..b01c7e9ed3 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/android_basic.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/android_filmstrip_carousel.gif b/src/pages/resources/reference/push-notifications/templates/assets/android_filmstrip_carousel.gif new file mode 100644 index 0000000000..1414a6c1f1 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/android_filmstrip_carousel.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/android_manual_carousel.gif b/src/pages/resources/reference/push-notifications/templates/assets/android_manual_carousel.gif new file mode 100644 index 0000000000..d56895f9d5 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/android_manual_carousel.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/android_timer.gif b/src/pages/resources/reference/push-notifications/templates/assets/android_timer.gif new file mode 100644 index 0000000000..912b439e9b Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/android_timer.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/horizontal_catalog.gif b/src/pages/resources/reference/push-notifications/templates/assets/horizontal_catalog.gif new file mode 100644 index 0000000000..28298f98f3 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/horizontal_catalog.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/input_box.gif b/src/pages/resources/reference/push-notifications/templates/assets/input_box.gif new file mode 100644 index 0000000000..b5135045b7 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/input_box.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/multi_icon.gif b/src/pages/resources/reference/push-notifications/templates/assets/multi_icon.gif new file mode 100644 index 0000000000..08c53ed255 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/multi_icon.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/rating.gif b/src/pages/resources/reference/push-notifications/templates/assets/rating.gif new file mode 100644 index 0000000000..70fccc0915 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/rating.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/vertical_catalog.gif b/src/pages/resources/reference/push-notifications/templates/assets/vertical_catalog.gif new file mode 100644 index 0000000000..eec2ced2e3 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/vertical_catalog.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/assets/zero_bezel.gif b/src/pages/resources/reference/push-notifications/templates/assets/zero_bezel.gif new file mode 100644 index 0000000000..6433d16ce1 Binary files /dev/null and b/src/pages/resources/reference/push-notifications/templates/assets/zero_bezel.gif differ diff --git a/src/pages/resources/reference/push-notifications/templates/basic.md b/src/pages/resources/reference/push-notifications/templates/basic.md index 89a5fcfb26..ee356cf5aa 100644 --- a/src/pages/resources/reference/push-notifications/templates/basic.md +++ b/src/pages/resources/reference/push-notifications/templates/basic.md @@ -12,7 +12,9 @@ import Tabs from './tabs/basic.md' # Push template - basic -A standard notification including a title, subtitle, message body, optional image, icons, link, buttons.
An alternate title and body can be optionally specified when the notification is expanded by the user. +A standard notification including a title, subtitle, message body, optional image, icons, links, and buttons. + +An alternate title and body can be optionally specified when the notification is expanded by the user. The following tables show all available properties in their respective payloads for FCM (Android) and APNS (iOS). diff --git a/src/pages/resources/reference/push-notifications/templates/carousel.md b/src/pages/resources/reference/push-notifications/templates/carousel.md index db9ba3e70a..344f3f3db1 100644 --- a/src/pages/resources/reference/push-notifications/templates/carousel.md +++ b/src/pages/resources/reference/push-notifications/templates/carousel.md @@ -12,10 +12,11 @@ import Tabs from './tabs/carousel.md' # Push template - carousel -A notification that shows a series of three to five images that scroll on/off the sides of the notification.
If operating in `automatic` mode, images will rotate every five (5) seconds. If operating in manual mode, the user is required to push a button to advance forwards or backwards through the carousel. +A notification that shows a series of three to five images that scroll on/off the sides of the notification. + +If operating in automatic mode, images will rotate every five (5) seconds. If operating in manual mode, the user is required to push a button to advance forwards or backwards through the carousel. Templates below show all available properties in their respective payloads for FCM (Android) and APNS (iOS). -
FCM diff --git a/src/pages/resources/reference/push-notifications/templates/catalog.md b/src/pages/resources/reference/push-notifications/templates/catalog.md new file mode 100644 index 0000000000..8fe9b4987f --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/catalog.md @@ -0,0 +1,27 @@ +--- +title: Adobe Experience Platform SDK basic push template +description: Basic push template supported by Adobe Campaign Classic mobile extension. +keywords: +- Adobe Campaign Classic +- Push +- Push Template +- Product Catalog +--- + +import Tabs from './tabs/catalog.md' + +# Push template - product catalog + +A notification containing a central image which can show one of three products. + +The user can select a product thumbnail to highlight it in the main image, causing the title, body, image, and product price to update in the notification. + +A call-to-action (CTA) button is provided to specify an action to take when the user interacts with a product. + +The table below shows all available properties in the respective payload for FCM (Android). + + + +FCM + + diff --git a/src/pages/resources/reference/push-notifications/templates/index.md b/src/pages/resources/reference/push-notifications/templates/index.md index 78005c1fcc..4c0dd6bc22 100644 --- a/src/pages/resources/reference/push-notifications/templates/index.md +++ b/src/pages/resources/reference/push-notifications/templates/index.md @@ -14,10 +14,17 @@ This document outlines the push templates that are supported by default. -Default push template functionality is available for use with the **Adobe Campaign Classic** extension.

Supported versions are **Android SDK version >= 2.1.0 && < 3.0.0** and **iOS SDK version 5.0.0+**. +Default push template functionality is available for use with the **Adobe Campaign Classic** extension. + +This is supported by **Android SDK version 3.1.0+** and **iOS SDK version 5.0.0+**. | Template Name | Compatibility | Description | Sample | | :------------ | :------------ | :---------- | :----- | -| [Basic](./basic) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic >= 2.1.0 && < 3.0.0*

**iOS**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*AEPNotificationContent 5.0.0+* | A basic push notification template.
Allows setting a title, message body, and optional image, action buttons, and click-through URL.

For **Android only**, it also supports a "remind me later" functionality which will schedule the notification to be re-delivered at a later time. | ![gif of sample basic notification](./../templates/assets/basic.gif) | -| [Carousel](./carousel) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic >= 2.1.0 && < 3.0.0*

**iOS**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*AEPNotificationContent 5.0.0+* | Shows a series of three (3) to five (5) images that scroll on and off the side of the notification.

Available in `manual` mode (user must click a button to scroll carousel items) and `auto` mode (carousel items scroll every five seconds). | ![gif of sample carousel notification](./../templates/assets/carousel.gif) | -| [Timer](./timerl) | **Android** - coming soon

**iOS**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*AEPNotificationContent 5.0.0+* | Notification containing title, body, and image. Configure a countdown timer which upon expiry can cause a new title, body, and image to be shown. | ![gif of sample timer notification](./../templates/assets/timer.gif) | +| [Basic](./basic) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*

**iOS**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*AEPNotificationContent 5.0.0+* | A basic push notification template.
Allows setting a title, message body, and optional image, action buttons, and click-through URL.

For **Android only**, it also supports a "remind me later" functionality which will schedule the notification to be re-delivered at a later time. | ![gif of sample android basic notification](./../templates/assets/android_basic.gif)
![gif of sample basic notification](./../templates/assets/basic.gif) | +| [Carousel](./carousel) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*

**iOS**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*AEPNotificationContent 5.0.0+* | Shows a series of three to five (3-5) images that scroll on and off the side of the notification.

Available in `manual` mode (user must click a button to scroll carousel items) and `auto` mode (carousel items scroll every five seconds). | ![gif of sample android manual carousel notification](./../templates/assets/android_manual_carousel.gif)
![gif of sample carousel notification](./../templates/assets/carousel.gif) | +| [Timer](./timer) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*
**iOS**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*AEPNotificationContent 5.0.0+* | Notification containing title, body, and image. Configure a countdown timer which upon expiry can cause a new title, body, and image to be shown. | ![gif of sample android timer notification](./../templates/assets/android_timer.gif)
![gif of sample timer notification](./../templates/assets/timer.gif) | +| [Input Box](./input-box) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*
| Notification containing title, body, and image. The notification contains a user input field which can receive a user text input that is sent back to the app via `Intent`. After the input is received, the notification can be updated with a feedback image and/or feedback message. | ![gif of sample input box notification](./../templates/assets/input_box.gif) | +| [Zero Bezel](./zero-bezel) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*
| Notification containing title, body, and an edge-to-edge background image which fills the notification area. | ![gif of sample zero bezel notification](./../templates/assets/zero_bezel.gif) | +| [Product Catalog](./catalog) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*
| Notification containing a main product image which can be changed by pressing one of the three product thumbnails present on the notification. The notification also contains a call-to-action (CTA) button to redirect the app user to a specified uri.
Product catalog notifications have recommended image aspect ratios depending on the layout style used. See this [table](./../index#Image specifications) for detailed information. | ![gif of sample product catalog notification](./../templates/assets/vertical_catalog.gif) | +| [Rating](./rating) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*
| Notification containing title, body, and image. The notification contains three to five (3-5) customizable rating icons to be used for rating confirmation, each containing a click-through URI and type. The call-to-action for each rating can be unique for each rating icon. | ![gif of sample rating notification](./../templates/assets/rating.gif) | +| [Multi icon](./multi-icon) | **Android**
**> Product**
*Adobe Campaign Classic*
**> SDK Extension**
*CampaignClassic 3.1.0+*
| Notification containing three to five (3-5) customizable icons. Each icon can be pressed to be redirected to a specified URI. The notification is persistent and will remain in the notification tray when it is interacted with. | ![gif of sample multi-icon notification](./../templates/assets/multi_icon.gif) | diff --git a/src/pages/resources/reference/push-notifications/templates/input-box.md b/src/pages/resources/reference/push-notifications/templates/input-box.md new file mode 100644 index 0000000000..97e67c516b --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/input-box.md @@ -0,0 +1,25 @@ +--- +title: Adobe Experience Platform SDK input box push template +description: Input box push template supported by Adobe Campaign Classic mobile extension. +keywords: +- Adobe Campaign Classic +- Push +- Push Template +- Input Box +--- + +import Tabs from './tabs/input-box.md' + +# Push template - input box + +A notification including a title, message body, optional image, and a user input text field. + +After receiving text input, an `Intent` containing the input is dispatched to the app and a feedback received notification can be displayed if a feedback message or image is provided in the push payload. + +The table below shows all available properties in the respective payload for FCM (Android). + + + +FCM + + diff --git a/src/pages/resources/reference/push-notifications/templates/multi-icon.md b/src/pages/resources/reference/push-notifications/templates/multi-icon.md new file mode 100644 index 0000000000..000f60f7b0 --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/multi-icon.md @@ -0,0 +1,23 @@ +--- +title: Adobe Experience Platform SDK timer push template +description: Multi icon push template supported by Adobe Campaign Classic mobile extension. +keywords: +- Adobe Campaign Classic +- Push +- Push Template +- Multi Icon +--- + +import Tabs from './tabs/multi-icon.md' + +# Push template - multi icon + +Notification that displays three to five (3-5) image buttons with no text. Each button contains a URI to follow if the user interacts with it. + +The table below shows all available properties in the respective payload for FCM (Android). + + + +FCM + + diff --git a/src/pages/resources/reference/push-notifications/templates/rating.md b/src/pages/resources/reference/push-notifications/templates/rating.md new file mode 100644 index 0000000000..bd2b27dfb2 --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/rating.md @@ -0,0 +1,24 @@ +--- +title: Adobe Experience Platform SDK rating push template +description: Rating push template supported by Adobe Campaign Classic mobile extension. +keywords: +- Adobe Campaign Classic +- Push +- Push Template +- Rating +--- + +import Tabs from './tabs/rating.md' + +# Push template - rating + +A notification that allows displaying a title, text, and image, along with 3-5 image buttons that allow the user to provide "rating" feedback. The number of image buttons displayed matches the number of rating actions defined in the `adb_rate_act` key-value pair. + +After a rating is selected in the notification, an `Intent` containing the rating is dispatched to the app. + +The table below shows all available properties in the respective payload for FCM (Android). + + +FCM + + diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/basic.md b/src/pages/resources/reference/push-notifications/templates/tabs/basic.md index 18d9df533a..20f339c158 100644 --- a/src/pages/resources/reference/push-notifications/templates/tabs/basic.md +++ b/src/pages/resources/reference/push-notifications/templates/tabs/basic.md @@ -2,7 +2,7 @@ noIndex: true --- - + ## Configuration @@ -26,80 +26,85 @@ The properties below define the payload sent to FCM: | Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | | Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Basic template uses a value of "basic". | | Title | ✅ | `adb_title` | string | Text shown in the notification's title. | -| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00` | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00`. | | Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | | Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | -| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00` | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00`. | | Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | | Image | ⛔️ | `adb_image` | string | URI of an image to be shown when notification is expanded. | | Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | -| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", or "OPENAPP".
Required if `adb_uri` is specified. | -| Button(s) | ⛔️ | `adb_act` | string | **The value is an encoded JSON string.**
One to three buttons to create for the notification. If using "remind later" functionality, only two buttons may be used in this field.
When decoded, the string contains an array of the following objects:
  • `label` - text shown on the button's label
  • `uri` - URI to be handled when user clicks the button
  • `type` - Type of link represented in `uri` - one of "WEBURL", "DEEPLINK", or "OPENAPP".
| +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Button(s) | ⛔️ | `adb_act` | string | **The value is an encoded JSON string.**
One to three buttons to create for the notification. If using "remind later" functionality, only two buttons may be used in this field.
When decoded, the string contains an array of the following objects:
  • `label` (required) - Text shown on the button's label.
  • `uri` (required) - URI to be handled when user clicks the button.
  • `type` (required) - Type of link represented in `uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
| | Icon | ⛔️ | `adb_icon` | string | Name of a small icon to use in the notification.
**Note** - The value referenced by this key is not used if a valid `adb_small_icon` key value pair is present in the payload. | | Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | | Large Icon | ⛔️ | `adb_large_icon` | string | URI or name for a large icon to use in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the large icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no large icon is set on the notification. | | Remind Later Text | ⛔️ | `adb_rem_txt` | string | If present, show a "remind later" button using the value provided as its label.
**Note** - both `remTxt` and `remTs` must be present in order to support "remind me later" functionality. | | Remind Later Date | ⛔️ | `adb_rem_ts` | string | If present, schedule this notification to be re-delivered at this epoch timestamp (in seconds) provided.
**Note** - both `remTxt` and `remTs` must be present in order to support "remind me later" functionality. | -| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "CampaignPushChannel".
If < API 26 (Android O), this value is ignored. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | | Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | -| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26 | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | | Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | | Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | -| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. Prior to API level 21 (Lollipop), sets the text that is displayed in the status bar when the notification first arrives. | -| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00` | -| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00` | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00`. | ## Example + + Below is a sample of what a payload might look like for a basic notification: ```json { - "message": { - "android": { - "collapse_key": "new_message", - "priority": "HIGH", - "data": { - "adb_version": "1", - "adb_template_type": "basic", - "adb_title": "game request", - "adb_body": "shall we play a game?", - "adb_sound": "bingBong", - "adb_small_icon": "ic_knight", - "adb_large_icon": "https://pictureofchess.com/logo.png", - "adb_n_count": "1", - "adb_n_priority": "PRIORITY_LOW", - "adb_channel_id": "a3b80ef", - "adb_image": "https://pictureofchess.com/board.png", - "adb_uri": "https://chess.com/games", - "adb_a_type": "WEBURL", - "adb_act": "[{\"label\":\"accept\",\"uri\":\"https://chess.com/games/552\",\"type\":\"DEEPLINK\"},{\"label\":\"decline\",\"uri\":\"\",\"type\":\"OPENAPP\"}]", - "adb_tag": "24", - "adb_sticky": "true", - "adb_ticker": "Play a game?", - "adb_body_ex": "Bob wants to play a game of chess with you. Click 'accept' to start!", - "adb_clr_body": "00EE00", - "adb_clr_title": "AABBCC", - "adb_clr_icon": "123456", - "adb_clr_bg": "000000", - "adb_rem_txt": "Remind me", - "adb_rem_ts": "1703462400", - "customKey": "custom data" - } - } - } + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_template_type": "basic", + "adb_title": "game request", + "adb_body": "shall we play a game?", + "adb_sound": "bingBong", + "adb_small_icon": "ic_knight", + "adb_large_icon": "https://pictureofchess.com/logo.png", + "adb_n_count": "1", + "adb_n_priority": "PRIORITY_LOW", + "adb_channel_id": "a3b80ef", + "adb_image": "https://pictureofchess.com/board.png", + "adb_uri": "https://chess.com/games", + "adb_a_type": "WEBURL", + "adb_act": "[{\"label\":\"accept\",\"uri\":\"https://chess.com/games/552\",\"type\":\"DEEPLINK\"{\"label\":\"decline\",\"uri\":\"\",\"type\":\"OPENAPP\"}]", + "adb_tag": "24", + "adb_sticky": "true", + "adb_ticker": "Play a game?", + "adb_body_ex": "Bob wants to play a game of chess with you. Click 'accept' to start!", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_rem_txt": "Remind me", + "adb_rem_ts": "1703462400" + } + } } ``` ## Usage recommendations -The tables below contain guidelines for your push notification content. **These recommendations help your text display reliably across multiple devices.** These values are guidelines only - it is still recommended to test a notification prior to sending it. +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. ### Image specifications | **Aspect ratios** | **Image size range** | **Supported file types** | | :-------- | -----------: | ------: | -| 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | +| 1:1, 3:2, 5:4, 4:3, 2:1, 16:9 | < 1 MB | PNG, JPG, WebP | ### Text guidelines @@ -168,7 +173,7 @@ Below is a sample of what a payload might look like for a notification using a b ## Usage recommendations -The tables below contain guidelines for your push notification content. **These recommendations help your text display reliably across multiple devices.** These values are guidelines only - it is still recommended to test a notification prior to sending it. +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. ### Image specifications diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/carousel.md b/src/pages/resources/reference/push-notifications/templates/tabs/carousel.md index b1f4375c68..1046227542 100644 --- a/src/pages/resources/reference/push-notifications/templates/tabs/carousel.md +++ b/src/pages/resources/reference/push-notifications/templates/tabs/carousel.md @@ -2,7 +2,7 @@ noIndex: true --- - + ## Properties @@ -13,72 +13,87 @@ The properties below define the payload sent to FCM: | Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | | Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Carousel template uses a value of "car". | | Title | ✅ | `adb_title` | string | Text shown in the notification's title. | -| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00` | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00`. | | Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | | Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | -| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00` | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00`. | | Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | | Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | -| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", or "OPENAPP".
Required if `adb_uri` is specified. | -| Carousel Items | ✅ | `adb_items` | string | **The value is an encoded JSON string.**
Three to five items in the carousel of the notification.
When decoded, the string contains an array of the following objects:
  • `img` (required) - URI to an image to be shown for the carousel item
  • `txt` - Optional caption to show when the carousel item is visible.
  • `uri` - Optional URI to be handled when the carousel item is touched by the user. If no `uri` is provided for the item, `adb_uri` will be handled instead.
| +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Carousel Items | ✅ | `adb_items` | string | **The value is an encoded JSON string.**
Three to five items in the carousel of the notification.
When decoded, the string contains an array of the following objects:
  • `img` (required) - URI to an image to be shown for the carousel item.
  • `txt` (optional) - Caption to show when the carousel item is visible.
  • `uri` (optional) - URI to be handled when the carousel item is touched by the user. If no `uri` is provided for the item, `adb_uri` will be handled instead.
| | Carousel Layout | ⛔️ | `adb_car_layout` | string | Determines whether the carousel should use the default layout or filmstrip variant.
Valid values are "default" or "filmstrip". | | Carousel Mode | ⛔️ | `adb_car_mode` | string | Determines how the carousel will be operated.
Valid values are "auto" or "manual". | | Icon | ⛔️ | `adb_icon` | string | Name of a small icon to use in the notification.
**Note** - The value referenced by this key is not used if a valid `adb_small_icon` key value pair is present in the payload. | | Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | | Large Icon | ⛔️ | `adb_large_icon` | string | URI or name for a large icon to use in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the large icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no large icon is set on the notification. | -| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "CampaignPushChannel".
If < API 26 (Android O), this value is ignored. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | | Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | -| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26 | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | | Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | | Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | -| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. Prior to API level 21 (Lollipop), sets the text that is displayed in the status bar when the notification first arrives. | -| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00` | -| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00` | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00`. | ## Example +Default Manual Carousel: + + + +Filmstrip Manual Carousel: + + + +Automatic Carousel: + + + Below is a sample of what a payload might look like for a carousel notification: ```json { - "message": { - "android": { - "collapse_key": "new_message", - "priority": "HIGH", - "data": { - "adb_version": "1", - "adb_template_type": "car", - "adb_title": "Check out the new line of shoes!", - "adb_body": "Hot deals on new releases!", - "adb_sound": "sneakerSqueaker", - "adb_small_icon": "chat_bubble", - "adb_large_icon": "https://sneakerland.com/logo.png", - "adb_uri": "https://sneakerland.com/newReleases", - "adb_a_type": "WEBURL", - "adb_body_ex": "We have some new inventory we think you'll like.", - "adb_clr_body": "00EE00", - "adb_clr_title": "AABBCC", - "adb_clr_icon": "123456", - "adb_clr_bg": "000000", - "adb_car_mode": "auto", - "adb_car_layout": "default", - "adb_items": "[{\"img\":\"https://sneakerland.com/products/shoe1/shoe1.png\",\"txt\":\"Shoe 1 by Cool Sneaker Brand\",\"uri\":\"https://sneakerland.com/products/shoe1\"},{\"img\":\"https://sneakerland.com/products/shoe2/shoe2.png\",\"txt\":\"Shoe 2 by Lame Sneaker Brand\",\"uri\":\"https://sneakerland.com/products/shoe2\"},{\"img\":\"https://sneakerland.com/products/shoe3/shoe3.png\",\"txt\":\"Shoe 3 by Average Sneaker Brand\",\"uri\":\"https://sneakerland.com/products/shoe3\"}]", - "customKey": "custom data" - } - } - } + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_template_type": "car", + "adb_title": "Check out the new line of shoes!", + "adb_body": "Hot deals on new releases!", + "adb_sound": "sneakerSqueaker", + "adb_small_icon": "chat_bubble", + "adb_large_icon": "https://sneakerland.com/logo.png", + "adb_uri": "https://sneakerland.com/newReleases", + "adb_a_type": "WEBURL", + "adb_body_ex": "We have some new inventory we think you'll like.", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_car_mode": "auto", + "adb_car_layout": "default", + "adb_items": "[{\"img\":\"https://sneakerland.com/products/shoe1/shoe1.png\",\"txt\":\"Shoe 1 by Cool Sneaker Brand\",\"uri\":\"https://sneakerland.com/products/shoe1\"},{\"img\":\"https://sneakerland.com/products/shoe2/shoe2.png\",\"txt\":\"Shoe 2 by Lame Sneaker Brand\",\"uri\":\"https://sneakerland.com/products/shoe2\"},{\"img\":\"https://sneakerland.com/products/shoe3/shoe3.png\",\"txt\":\"Shoe 3 by Average Sneaker Brand\",\"uri\":\"https://sneakerland.com/products/shoe3\"}]" + } + } } ``` ## Usage recommendations -The tables below contain guidelines for your push notification content. **These recommendations help your text display reliably across multiple devices.** These values are guidelines only - it is still recommended to test a notification prior to sending it. +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. ### Image specifications | **Aspect ratios** | **Image size range** | **Supported file types** | | :-------- | -----------: | ------: | -| 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | +| Carousel - 1:1, 3:2, 5:4, 4:3, 2:1, 16:9
Filmstrip carousel - 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | ### Text guidelines @@ -163,7 +178,7 @@ Below is a sample of what a payload might look like for a notification using a c ## Usage recommendations -The tables below contain guidelines for your push notification content. **These recommendations help your text display reliably across multiple devices.** These values are guidelines only - it is still recommended to test a notification prior to sending it. +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. ### Image specifications diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/catalog.md b/src/pages/resources/reference/push-notifications/templates/tabs/catalog.md new file mode 100644 index 0000000000..194986c260 --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/tabs/catalog.md @@ -0,0 +1,104 @@ +--- +noIndex: true +--- + + + +## Properties + +The properties below define the payload sent to FCM: + +| **Field** | **Required** | **Key** | **Type** | **Description** | +| :-------- | :----------- | :------ | :------- | :-------------- | +| Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | +| Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Product catalog template uses a value of "cat". | +| Title | ✅ | `adb_title` | string | Text shown in the notification's title. | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00`. | +| Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | +| Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00`. | +| Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | +| Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Icon | ⛔️ | `adb_icon` | string | Name of a small icon to use in the notification.
**Note** - The value referenced by this key is not used if a valid `adb_small_icon` key value pair is present in the payload. | +| Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | +| Large Icon | ⛔️ | `adb_large_icon` | string | URI or name for a large icon to use in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the large icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no large icon is set on the notification. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | +| Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | +| Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | +| Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00`. | +| Call to action button text | ✅ | `adb_cta_txt` | string | Text to be shown on the CTA button. | +| Call to action button link | ✅ | `adb_cta_uri` | string | URI to be handled when the user clicks the CTA button. | +| Call to action button color | ✅ | `adb_cta_clr` | string | Color for the CTA button.
Represented as six character hex, e.g. `00FF00`. | +| Call to action button text color | ✅ | `adb_cta_txt_clr` | string | Color for the CTA button text.
Represented as six character hex, e.g. `00FF00`. | +| Display type | ✅ | `adb_display` | string | Determines the layout of the catalog notification.
Value will either be "horizontal" (left-to-right) or "vertical" (top-to-bottom). | +| Catalog Items | ✅ | `adb_items` | string | Three entries describing the items in the product catalog.
**The value is an encoded JSON string.**
When decoded, the string contains an array of the following objects:
  • `title` (required) - Text to use in the title if this product is selected.
  • `body` (required) - Text to use in the body if this product is selected.
  • `img` (required) - URI to an image to use in notification when this product is selected.
  • `price` (required) - Price of this product to display when the notification is selected.
  • `uri` (required) - URI to be handled when the user clicks the large image of the selected item.
| + +## Example + +Vertical Product Catalog: + + + +Horizontal Product Catalog: + + + +Below is a sample of what a payload might look like for a product catalog notification: + +```json +{ + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_title": "Buy some shoes", + "adb_body": "Click a shoe to learn more", + "adb_sound": "squeek", + "adb_uri": "https://sneakerland.com/products/shoe1", + "adb_a_type": "WEBURL", + "adb_icon": "ic_shoe", + "adb_n_count": "1", + "adb_n_priority": "PRIORITY_LOW", + "adb_template_type": "cat", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_display": "vertical", + "adb_cta_txt": "Buy Now", + "adb_cta_txt_clr": "00EE00", + "adb_cta_uri": "https://sneakerland.com/cart&addItem=shoe1", + "adb_items": "[{\"title\":\"Cool Shoe\",\"body\":\"Shoe 1 by Cool Sneaker Brand\",\"img\":\"https://sneakerland.com/products/shoe1/shoe1.png\",\"price\":\"49.97\",\"uri\":\"https://sneakerland.com/products/shoe1\"},{\"title\":\"Lame Shoe\",\"body\":\"Shoe 2 by Lame Sneaker Brand\",\"img\":\"https://sneakerland.com/products/shoe2/shoe2.png\",\"price\":\"99.99\",\"uri\":\"https://sneakerland.com/products/shoe2\"}]" + } + } +} +``` + +## Usage recommendations + +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. + +### Image specifications + +| **Aspect ratios** | **Image size range** | **Supported file types** | +| :-------- | -----------: | ------: | +| Vertical product catalog: 1:1, 3:2, 5:4, 4:3
Horizontal product catalog: 16:9, 2:1 | < 1 MB | PNG, JPG, WebP | + +### Text guidelines + +| **Type** |**Recommended max # of characters** | **Supports multiple lines?** | +| :-------- | ------: | -------: | +| Title | ~35 (depends on screen size and device font setting) | No | +| Body | ~35 (depends on screen size and device font setting) | No | diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/input-box.md b/src/pages/resources/reference/push-notifications/templates/tabs/input-box.md new file mode 100644 index 0000000000..566faa3a8b --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/tabs/input-box.md @@ -0,0 +1,96 @@ +--- +noIndex: true +--- + + + +## Properties + +The properties below define the payload sent to FCM: + +| **Field** | **Required** | **Key** | **Type** | **Description** | +| :-------- | :----------- | :------ | :------- | :-------------- | +| Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | +| Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Input-box template uses a value of "input". | +| Title | ✅ | `adb_title` | string | Text shown in the notification's title. | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00`. | +| Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | +| Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00`. | +| Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | +| Image | ⛔️ | `adb_image` | string | URI of an image to be shown when notification is expanded. | +| Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Icon | ⛔️ | `adb_icon` | string | Name of a small icon to use in the notification.
**Note** - The value referenced by this key is not used if a valid `adb_small_icon` key value pair is present in the payload. | +| Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | +| Large Icon | ⛔️ | `adb_large_icon` | string | URI or name for a large icon to use in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the large icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no large icon is set on the notification. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | +| Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | +| Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | +| Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00`. | +| Input receiver name | ✅ | `adb_input_receiver` | string | Required, name of the `Intent` action to use when broadcasting the user input. | +| Input text | ⛔️ | `adb_input_txt` | string | Placeholder text for the text input field. | +| Feedback text | ⛔️ | `adb_feedback_txt` | string | Once feedback has been submitted, use this text as the notification's body. | +| Feedback image | ⛔️ | `adb_feedback_img` | string | Once feedback has been submitted, use this as the notification's image. | + +## Example + + + +Below is a sample of what a payload might look like for an input box notification: + +```json +{ + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_title": "Check out the new line of shoes!", + "adb_body": "Do you have any favorites?", + "adb_sound": "sneakerSqueaker", + "adb_image": "https://sneakerland.com/products/shoe1/shoe1.png", + "adb_uri": "https://sneakerland.com/newReleases", + "adb_icon": "ic_shoe", + "adb_a_type": "WEBURL", + "adb_template_type": "input", + "adb_body_ex": "What brands are you interested in?", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_input_txt": "Enter your favorite brands", + "adb_feedback_txt": "Thanks for helping us provide you with an experience more catered to your tastes!", + "adb_feedback_img": "https://sneakerland.com/img/thanks.png", + "adb_input_receiver": "developer intent action name" + } + } +} +``` + +## Usage recommendations + +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. + +### Image specifications + +| **Aspect ratios** | **Image size range** | **Supported file types** | +| :-------- | -----------: | ------: | +| 1:1, 3:2, 5:4, 4:3, 2:1, 16:9 | < 1 MB | PNG, JPG, WebP | + +### Text guidelines + +| **Type** |**Recommended max # of characters** | **Supports multiple lines?** | +| :-------- | ------: | -------: | +| Title | ~35 (depends on screen size and device font setting) | No | +| Description | ~110 (depends on screen size and device font setting) | Yes | diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/multi-icon.md b/src/pages/resources/reference/push-notifications/templates/tabs/multi-icon.md new file mode 100644 index 0000000000..0a45101e8b --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/tabs/multi-icon.md @@ -0,0 +1,64 @@ +--- +noIndex: true +--- + + + +## Properties + +The properties below define the payload sent to FCM: + +| **Field** | **Required** | **Key** | **Type** | **Description** | +| :-------- | :----------- | :------ | :------- | :-------------- | +| Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | +| Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Multi-icon template uses a value of "icon". | +| Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | +| Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | +| Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | +| Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00`. | +| Cancel button image | ⛔️ | `adb_cancel_image` | string | URI or bundled image representing the close icon in the right most side.
In case no value is provided, a default bundled "cross" image is shown. | +| Image buttons | ✅ | `adb_items` | string | Three to five icon buttons for the notification.
**The value is an encoded JSON string.**
When decoded, the string contains an array of the following objects:
  • `img` (required) - URI or bundled image representing this rating.
  • `uri` (required) - URI to be handled when the user clicks this rating.
  • `type` (required) - Type of link represented in `uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
| + +## Example + + + +Below is a sample of what a payload might look like for a multi icon notification: + +```json +{ + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_template_type": "icon", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_cancel_image": "delete", + "adb_items": "[{\"img\":\"https://sneakerland.com/products/assets/shoe1.png\",\"uri\":\"myapp://chooseShoeType/shoe1\",\"type\":\"DEEPLINK\"},{\"img\":\"https://sneakerland.com/products/assets/shoe2.png\",\"uri\":\"myapp://chooseShoeType/shoe2\",\"type\":\"DEEPLINK\"},{\"img\":\"https://sneakerland.com/products/assets/shoe3.png\",\"uri\":\"myapp://chooseShoeType/shoe3\",\"type\":\"DEEPLINK\"},{\"img\":\"https://sneakerland.com/products/assets/shoe4.png\",\"uri\":\"myapp://chooseShoeType/shoe4\",\"type\":\"DEEPLINK\"},{\"img\":\"https://sneakerland.com/products/assets/shoe5.png\",\"uri\":\"myapp://chooseShoeType/shoe5\",\"type\":\"DEEPLINK\"}]" + } + } +} +``` + +## Usage recommendations + +The tables below contain guidelines for your push notification content. **These recommendations help your images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. + +### Image specifications + +| **Aspect ratios** | **Image size range** | **Supported file types** | +| :-------- | -----------: | ------: | +| 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/rating.md b/src/pages/resources/reference/push-notifications/templates/tabs/rating.md new file mode 100644 index 0000000000..d625ad49bf --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/tabs/rating.md @@ -0,0 +1,96 @@ +--- +noIndex: true +--- + + + +## Properties + +The properties below define the payload sent to FCM: + +| **Field** | **Required** | **Key** | **Type** | **Description** | +| :-------- | :----------- | :------ | :------- | :-------------- | +| Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | +| Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Rating template uses a value of "rate". | +| Title | ✅ | `adb_title` | string | Text shown in the notification's title. | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00.` | +| Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | +| Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00.` | +| Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | +| Image | ⛔️ | `adb_image` | string | URI of an image to be shown when notification is expanded. | +| Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Icon | ⛔️ | `adb_icon` | string | URI or name for Large icon used in notification. | +| Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | +| Large Icon | ⛔️ | `adb_large_icon` | string | URI or name for a large icon to use in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the large icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no large icon is set on the notification. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | +| Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | +| Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | +| Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00`. | +| Rating icon in unselected state | ✅ | `adb_rate_unselected_icon` | string | URI or name for a rating icon to use when unselected in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the rating icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no notification is constructed. | +| Rating icon in selected state | ✅ | `adb_rate_selected_icon` | string | URI or name for a rating icon to use when selected in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the rating icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no notification is constructed. | +| Rating icon action | ✅ | `adb_rate_act` | string | **The value is an encoded JSON string.**
Three to five values to be used for rating confirmation, each containing a a click-through URI and type.
When decoded, the string contains an array of the following objects:
  • `uri` (optional) - URI to be handled when the user selects this rating and clicks confirm.
  • `type` (required) - Type of link represented in `uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
| + +## Example + + + +Below is a sample of what a payload might look like for a product rating notification: + +```json +{ + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_title": "Thanks for shopping with us!", + "adb_body": "Please take a moment to rate your recent purchase.", + "adb_sound": "chaChing", + "adb_image": "https://sneakerland.com/products/shoe1/shoe.png", + "adb_uri": "https://sneakerland.com/products/rating/shoe1", + "adb_a_type": "WEBURL", + "adb_icon": "ic_shoe", + "adb_n_count": "1", + "adb_n_priority": "PRIORITY_LOW", + "adb_template_type": "rate", + "adb_body_ex": "We hope you are enjoying your new shoes. Please click on a rating below to help us cater to your future footware needs!", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_rate_unselected_icon":"https://cdn-icons-png.freepik.com/256/1077/1077035.png?semt=ais_hybrid", + "adb_rate_selected_icon":"https://cdn-icons-png.freepik.com/256/833/833472.png?semt=ais_hybrid", + "adb_rate_act": "[{\"uri\":\"https://www.adobe.com\", \"type\":\"WEBURL\"}, {\"uri\":\"https://www.adobe.com\", \"type\":\"OPENAPP\"},{\"uri\":\"https://www.adobe.com\", \"type\":\"DISMISS\"},{\"uri\": \"https://www.adobe.com\", \"type\":\"WEBURL\"},{\"uri\":\"instabiz://opensecond\", \"type\":\"DEEPLINK\"}]" + } + } +} +``` + +## Usage recommendations + +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. + +### Image specifications + +| **Aspect ratios** | **Image size range** | **Supported file types** | +| :-------- | -----------: | ------: | +| main notification image: 1:1, 3:2, 5:4, 4:3, 2:1, 16:9
images for rating icons: 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | + +### Text guidelines + +| **Type** |**Recommended max # of characters** | **Supports multiple lines?** | +| :-------- | ------: | -------: | +| Title | ~35 (depends on screen size and device font setting) | No | +| Description | ~110 (depends on screen size and device font setting) | Yes | diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/timer.md b/src/pages/resources/reference/push-notifications/templates/tabs/timer.md index 5e37e8179f..1f395c386c 100644 --- a/src/pages/resources/reference/push-notifications/templates/tabs/timer.md +++ b/src/pages/resources/reference/push-notifications/templates/tabs/timer.md @@ -2,11 +2,105 @@ noIndex: true --- - + + +## Properties + +The properties below define the payload sent to FCM: + +| **Field** | **Required** | **Key** | **Type** | **Description** | +| :---------------------- | :----------- | :------------------ | :------- | :----------------------------------------------------------- | +| Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | +| Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Timer template uses a value of "timer". | +| Title | ✅ | `adb_title` | string | Text shown in the notification's title. | +| Alternate title | ✅ | `adb_title_alt` | string | Alternate text for title of the notification after the timer has expired. | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00`. | +| Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | +| Alternate body | ⛔️ | `adb_body_alt` | String | Alternate text for body of the notification after the timer has expired. | +| Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | +| Alternate expanded body | ⛔️ | `adb_body_ex_alt` | string | Alternate text for body of the notification when the message is expanded after the timer has expired. | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00`. | +| Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | +| Image | ⛔️ | `adb_image` | string | URI of an image to be shown when notification is expanded. | +| Alternate image | ⛔️ | `adb_image_alt` | string | Alternate URI of an image to be shown when notification is expanded after the timer has expired. | +| Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Icon | ⛔️ | `adb_icon` | string | URI or name for Large icon used in notification. | +| Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | +| Large Icon | ⛔️ | `adb_large_icon` | string | URI or name for a large icon to use in the notification. If the URI is valid, the remote image is downloaded and cached on the device to be used as the large icon. If a name is provided, the app's drawable resources are checked for an image file with the same name. If no valid URI or name is provided then no large icon is set on the notification. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | +| Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | +| Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | +| Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Color - Background | ⛔️ | `adb_clr_bg` | string | Color for notification's background.
Represented as six character hex, e.g. `00FF00.` | +| Color - Timer | ⛔️ | `adb_clr_tmr` | string | Color for the text of the timer overlay. | +| Timer duration | ⛔️ | `adb_tmr_dur` | string | If present, the timer on the notification will run for the number of seconds provided here. | +| Timer end timestamp | ⛔️ | `adb_tmr_end` | string | If present, the timer on the notification will count down until this epoch time (in seconds).
Note - both `adb_tmr_end` and `adb_tmr_dur` are present, the duration will be used and `adb_tmr_end` will be ignored. | -## Unavailable +## Example + + + +Below is a sample of what a payload might look like for a timer notification: + +```json +{ + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_title": "Limited time offer!", + "adb_title_alt": "You missed out on the sale.", + "adb_body": "Don't miss out on your chance for deep discounts.", + "adb_body_alt": "Our next flash sale will be sometime next month.", + "adb_sound": "chaChing", + "adb_icon": "ic_dollar", + "adb_n_count": "1", + "adb_n_priority": "PRIORITY_LOW", + "adb_image": "https://bigboxretailer.com/sale.png", + "adb_image_alt": "https://bigboxretailer.com/sale_ended.png", + "adb_uri": "https://bigboxretailer.com/sale", + "adb_a_type": "WEBURL", + "adb_template_type": "timer", + "adb_body_ex": "These discounts won't be around for long, click on the notification to go check out the sale.", + "adb_body_ex_alt": "Sorry you missed us this time. Check back next month for some deep discounts.", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_clr_bg": "000000", + "adb_tmr_end": "1703462400", + "adb_clr_tmr": "FFFFFF" + } + } +} +``` + +## Usage recommendations + +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. + +### Image specifications + +| **Aspect ratios** | **Image size range** | **Supported file types** | +| :---------------------------- | -------------------: | -----------------------: | +| 1:1, 3:2, 5:4, 4:3, 2:1, 16:9 | < 1 MB | PNG, JPG, WebP | + +### Text guidelines -Android support for the timer template is coming soon. +| **Type** | **Recommended max # of characters** | **Supports multiple lines?** | +| :---------- | ----------------------------------------------------: | ---------------------------: | +| Title | ~35 (depends on screen size and device font setting) | No | +| Description | ~110 (depends on screen size and device font setting) | Yes | @@ -77,7 +171,7 @@ Below is a sample of what a payload might look like for a notification using the ## Usage recommendations -The tables below contain guidelines for your push notification content. **These recommendations help your text display reliably across multiple devices.** These values are guidelines only - it is still recommended to test a notification prior to sending it. +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. ### Image specifications diff --git a/src/pages/resources/reference/push-notifications/templates/tabs/zero-bezel.md b/src/pages/resources/reference/push-notifications/templates/tabs/zero-bezel.md new file mode 100644 index 0000000000..e7fad4e465 --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/tabs/zero-bezel.md @@ -0,0 +1,89 @@ +--- +noIndex: true +--- + + + +## Properties + +The properties below define the payload sent to FCM: + +| **Field** | **Required** | **Key** | **Type** | **Description** | +| :-------- | :----------- | :------ | :------- | :-------------- | +| Payload Version | ✅ | `adb_version` | string | Version of the payload assigned by the ACC authoring UI. | +| Template Type | ✅ | `adb_template_type` | string | Informs the reader which properties may exist in the template object.
Zero-bezel template uses a value of "zb". | +| Title | ✅ | `adb_title` | string | Text shown in the notification's title. | +| Color - Title | ⛔️ | `adb_clr_title` | string | Text color for `adb_title`.
Represented as six character hex, e.g. `00FF00`. | +| Body | ✅ | `adb_body` | string | Text shown in message body when notification is collapsed. | +| Expanded Body | ⛔️ | `adb_body_ex` | string | Body of the message when the message is expanded. | +| Color - Body | ⛔️ | `adb_clr_body` | string | Text color for `adb_body`, `adb_body_ex`.
Represented as six character hex, e.g. `00FF00`. | +| Sound | ⛔️ | `adb_sound` | string | Sound played when notification is delivered.
Value should be the name of the sound file without its extension.
Sound file should be located in the `assets/raw` directory of your app. | +| Image | ⛔️ | `adb_image` | string | URI of an image to be shown when notification is expanded. | +| Link URI | ⛔️ | `adb_uri` | string | URI to be handled when user clicks the notification. | +| Link Type | ⛔️ | `adb_a_type` | string | Type of link represented in `adb_uri` - one of "WEBURL", "DEEPLINK", "DISMISS", or "OPENAPP".
Required if `adb_uri` is specified. | +| Icon | ⛔️ | `adb_icon` | string | Name of a small icon to use in the notification.
**Note** - The value referenced by this key is not used if a valid `adb_small_icon` key value pair is present in the payload. | +| Small Icon | ⛔️ | `adb_small_icon` | string | Name of a small icon to use in the notification. The app's drawable resources are checked for an image file with the provided name. | +| Color - Small Icon | ⛔️ | `adb_clr_icon` | string | Color for the notification's small icon.
Represented as six character hex, e.g. `00FF00`. | +| Channel ID | ⛔️ | `adb_channel_id` | string | The [notification's channel id](https://developer.android.com/guide/topics/ui/notifiers/notifications#ManageChannels) (new in Android O). The app must create a channel with this channel ID before any notification with this channel ID is received. If you don't send this channel ID in the request, or if the channel ID provided has not yet been created by the app, FCM uses the channel ID specified in the app manifest.
If not provided in payload, SDK uses a "default" channel ID of value "General Notifications".
If < API 26 (Android O), this value is ignored. | +| Badge Count | ⛔️ | `adb_n_count` | string | Value to be used on app's badge. | +| Priority | ⛔️ | `adb_n_priority` | string | Designates the notification priority for Android - [importance](https://developer.android.com/reference/android/app/NotificationChannel#setImportance(int)) for API >= 26 (Android 8.0) or [priority](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Builder#setPriority(int)) for API < 26. | +| Tag | ⛔️ | `adb_tag` | string | Identifier used to replace existing notifications in the notification drawer. If not specified, each request creates a new notification. If specified and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. | +| Sticky | ⛔️ | `adb_sticky` | string | Boolean value represented as a string "true" or "false".
When set to false or unset, the notification is automatically dismissed when the user clicks it in the panel. When set to true, the notification persists even when the user clicks it. | +| Ticker | ⛔️ | `adb_ticker` | string | Sets the "ticker" text, which is sent to accessibility services. | +| Collapsed notification style | ⛔️ | `adb_col_style` | string | Determines whether the collapsed message should show a zero-bezel image, or text only.
Valid value is either "img" or "txt". Defaults to "txt" if none or invalid value is provided. | + +## Example + + + +Below is a sample of what a payload might look like for a zero bezel notification: + +```json +{ + "message": { + "token": "FCM_TOKEN", + "android": { + "collapse_key": "new message" + }, + "data": { + "adb_version": "1", + "adb_title": "game request", + "adb_body": "shall we play a game?", + "adb_sound": "bingBong", + "adb_icon": "ic_knight", + "adb_n_count": "1", + "adb_n_priority": "PRIORITY_LOW", + "adb_image": "https://pictureofchess.com/board.png", + "adb_uri": "https://chess.com/games", + "adb_a_type": "WEBURL", + "adb_template_type": "zb", + "adb_body_ex": "Bob wants to play a game of chess with you. Click the notification to accept!", + "adb_clr_body": "00EE00", + "adb_clr_title": "AABBCC", + "adb_clr_icon": "123456", + "adb_col_style": "img" + } + } +} +``` + +## Usage recommendations + +The tables below contain guidelines for your push notification content. **These recommendations help your text and images display reliably across multiple devices.** These values are guidelines only - you should still test a notification prior to sending it. + +### Audio specifications + +Custom sound files must be placed within the app's bundle in the `res/raw` directory. Supported formats are `mp3`, `wav`, or `ogg`. + +### Image specifications + +| **Aspect ratios** | **Image size range** | **Supported file types** | +| :-------- | -----------: | ------: | +| 1:1, 3:2, 5:4, 4:3 | < 1 MB | PNG, JPG, WebP | + +### Text guidelines + +| **Type** |**Recommended max # of characters** | **Supports multiple lines?** | +| :-------- | ------: | -------: | +| Title | ~35 (depends on screen size and device font setting) | No | +| Description | ~110 (depends on screen size and device font setting) | Yes | diff --git a/src/pages/resources/reference/push-notifications/templates/timer.md b/src/pages/resources/reference/push-notifications/templates/timer.md index 807d15c863..7c7cf18e05 100644 --- a/src/pages/resources/reference/push-notifications/templates/timer.md +++ b/src/pages/resources/reference/push-notifications/templates/timer.md @@ -12,10 +12,12 @@ import Tabs from './tabs/timer.md' # Push template - timer -Notification containing title, body, image, and timer.
Alternate title, body, and image can be configured to be shown upon expiry of the timer. +Notification containing title, body, image, and timer. + +Alternate title, body, and image can be configured to be shown upon expiry of the timer. Templates below show all available properties in their respective payloads for FCM (Android) and APNS (iOS). -
+ FCM diff --git a/src/pages/resources/reference/push-notifications/templates/zero-bezel.md b/src/pages/resources/reference/push-notifications/templates/zero-bezel.md new file mode 100644 index 0000000000..597aa7381b --- /dev/null +++ b/src/pages/resources/reference/push-notifications/templates/zero-bezel.md @@ -0,0 +1,23 @@ +--- +title: Adobe Experience Platform SDK zero bezel push template +description: Zero bezel push template supported by Adobe Campaign Classic mobile extension. +keywords: +- Adobe Campaign Classic +- Push +- Push Template +- Zero Bezel +--- + +import Tabs from './tabs/zero-bezel.md' + +# Push template - zero bezel + +A notification including a title, subtitle, message body, and an edge-to-edge background image which fills the notification area. + +The table below shows all available properties in the respective payload for FCM (Android). + + + +FCM + +