Create JSON Assets for In-App Mini Notifications on Mobile
Create JSON assets to display in-app mini notifications on your mobile Touchpoints. Be aware of the following requirements and best practices when creating those assets.
Mandatory Content for Mini Notification Assets
The following parameters are mandatory when creating your markup for mini notification assets:
- type. The value passed into this parameter can be “mini-bottom”, “mini-top”, or "mini-inline" depending on where on screen you want the asset to display.
- message
- text. If using the default message object properties, we recommend the following:
- Maximum of 72 characters with an image icon (80 x 80px).
- Maximum of 92 characters with no image icon.
- Use optimized images to ensure optimizations are displayed immediately.
- text. If using the default message object properties, we recommend the following:
Example - Text only
{
"type":"mini-bottom",
"message":{
"text":"Your mini notification message"
}
}
Example - Text and Image Icon
{
"type":"mini-bottom",
"message":{
"text":"Your mini notification message"
},
"image":{
"image-url":"Your icon image url, which will appear in the bottom left"
},
}
Optional Content for Mini Notification Assets
The following parameters are optional when creating your markup for mini notification assets:
- presentation-time. Overrides the default 6000 milliseconds presentation time.
- Specify -1 to keep the notification on screen until the user navigates to another interaction or dismisses it.
- Specify in milliseconds.
- background-color. Overrides the default notification background color.
- Specify as a hex color.
- message
- text-size. Overrides the default notification text size.
- Specify as an integer.
- text-color. Overrides the default notification text color.
- Specify as a hex color.
- text-size. Overrides the default notification text size.
- image
- image-url. Adds an image on the left side of the mini notification view
- Specify as a secure link.
- Aspect-fit by height (80px).
- An image with a width greater than 80px will constrain the text view width.
- Use optimized images to ensure optimizations are displayed immediately.
- image-url. Adds an image on the left side of the mini notification view
Example
{
"type":"mini-bottom",
"presentation-time":-1,
"message":{
"text":"Your mini notification message",
"text-size":12,
"text-color":"#FF0000"
},
"image":{
"image-url":"Your icon image url, which will appear in the bottom left"
},
"background-color":"#FF0000"
}
Response Rules for Mini Notification Assets
ONE provides the ability to track customer responses to optimizations on a per-asset basis. When configuring customer responses, be aware of the following:
Be aware of the following rules when creating responses for mini-notification assets:
- The mini notification is not displayed until the icon image is downloaded.
- If a message is provided, without an icon image, the message fills the view within the paddings provided.
- Tapping on the notification opens a link that loads in a web view, either inside the app or externally, depending on the target response configured in MXO.
- If you do not provide a target url, the notification is dismissed when tapped and a positive response sent to MXO.
- The notification is hidden either when navigating to another view within the application, or when 6 seconds have lapsed.
- The customer can hide the notification by swiping down.
- If the customer taps a notification the response code for the target url presented is sent to MXO.
- The mini notification can only handle a single response.
- Eligibility rules handle whether or not a notification is shown and, if configured, how many times the notification is shown to a customer.
Supported target URLs for Responses
The following target URLs are supported for both mini and full screen notifications:
- Browser Links
- Mail Links - mailto:frank@wwdcdemo.example.com
- Phone Links - tel:1-408-555-5555
- FaceTime Links - facetime://user@example.com
- SMS Links - sms:1-408-555-1212
- Map Links - http://maps.apple.com/?q=cupertino
- iTunes Links
- YouTube Links
- Other app links or in-app links