К сожалению, эта страница еще не переведена. Уже совсем скоро вся документация будет доступна вам на родном языке.
Contents:
Personalizing push messages
The Mobile Engage personalization feature allows you to personalize push messages for known users with contact-level data and external event data.
You can insert personalization parameters into the Push message editor using {{
and }}
. Between these tags, you can define if the personalization is contact-level or driven by an external event.
Contact-level personalization
Contact-level personalization is added using the convention:
{{ contact.<fieldID> }}
Where fieldID
is the numeric ID of the Emarsys contact database field. You can use any system or custom field for personalization.
Example
Here is an example of a contact-level personalization using the first name of the contacts:
Hey, {{ contact.1 }}! Brace yourself, winter is coming.

Note: The IDs of all contact fields are listed on the left of the table in the Field Editor (Admin menu) .
External event personalization
You can send external events which will trigger Automation Center programs and send out push messages. External event personalization is added using the convention:
{{ event.key }}
Where key
is in the global section of the JSON object.
Example
Here is an example API request for external event personalization:
{ "key_id": "3", "external_id": "t.odinsson@example.com", "data": { "global": { "hero_first_name": "Jessica", "hero_second_name": "Jones" } } }
You must include the keys in the editor to use the values for personalization:
Hey {{ event.hero_first_name }} {{ event.hero_second_name }}! Brace yourself, winter is coming.

Please note that external events can also be tested via the Emarsys API demo. To access the demo environment, please visit https://api.emarsys.net/api-demo.
UI and preview
At the moment, no user interface is present for the personalization feature, and the live preview in Mobile Engage is not showing the personalization parameters either. To see the results, you must test the message with the Test message function, using a contact that already exists in your Emarsys database.
Custom data fields
What are custom data fields?
Custom data fields allow you to attach metadata to push messages and act on this data after a message is delivered. These data fields will be available for every message you send with the Mobile Engage application, and can be personalized.
Mobile Engage custom data fields are merely the tools to deliver the information needed for opening a page, and it is your responsibility to look for the custom data fields in the push message payload and to process the data in the application.
The data is sent in the u
parameter of a push message.
{ aps = { alert = “Check out our new running shoes”; sound = default; }; u = “{“deep_link”:http://lifestyle-labels.com/mobile/deep/link/productpage/234567654,”sid:792_1rwvShB5bxJ5}" }
Creating custom data fields
You can create data fields for every Mobile Engage App in the Apps settings, by clicking the Custom Data Fields icon:
Click Create New, and fill in the fields:

- String ID – The key which will be included in the push message. Do not use spaces in string IDs.
- Name – The name displayed on the Emarsys interface.
- Default value – You can add default values for every field, which will appear in the Custom Data section of the Content Creation page of your push message. If you do not edit them in the message, these values will be sent out.
- Hint – You can add a hint for every field to remind you what it does when you edit the field in the message. This will appear in gray when the value field is empty.
If you do not define a default value for a field and you do not add one manually, the field will be sent out as empty.
Viewing and editing custom data fields
You can see all your custom data fields, and edit their default values, on the Apps tab:

For each push message, you can edit the actual values in the Custom Data section of the Content Creation page.

Using custom fields for deep links and parameters
Deep links are links which point to a certain screen within your application. For example, if you receive a message from a friend, the application will be opened at the message thread, or if you leave something in your cart, the application will be opened at your cart. Without deep links, the applications open at their main pages.
To use a deep link, proceed as follows:
- Create a field called Deep link with a string ID deep_link, and without a default value.
- Create the following fields if you are using Google Analytics:
- utm_source
- utm_medium
- utm_campaign
- Use default values for your push campaign. Change the campaign value only if the defaults do not suite your needs.
- The deep link data is sent in the
u
parameter of the push message.
Mobile Engage segmentation
What is Mobile Engage segmentation?
Mobile Engage segmentation lets you create app-based segments so that you can address your customers in a highly personalized way, based on several device- and behavior-level criteria.
The Segments tab is on the front page of the Mobile Engage feature.
Creating a Mobile Engage segment
To create a new Mobile Engage segment, click Create New on the Mobile Engage Segments overview page and proceed as follows:
1. Add the Mobile Engage segment details

For all segments, an app has to be selected, which means that the criteria for the segment are only valid for the given app.
2. Define the device-level criteria

The following device-level criteria are available:
- Push accepted
- App version
- Timezone
- OS version
- Last mobile activity
- Installation date
- Language
- Platform
3. Define the behavior-level criteria
The following behavior-level criteria are available for analysis and segmentation:
- Opened
- Received
- Custom event
4. Check the results
Click Save & Apply in the Filter results window to save your segment and view the result.

Editing a Mobile Engage segment
Refreshing a Mobile Engage segment
Deleting a Mobile Engage segment
Limitations of Mobile Engage segments
Only Mobile Engage data is used when creating the segments; there is no direct access to any other contact data field in the Emarsys databases.
As a result, Mobile Engage segments are not listed in the Contacts menu, Segments page. However, they can be used to create combined segments for cross-channel engagement.
Notification Inbox
This feature is currently on Pilot release for a limited number of clients only. If you are interested in participating in the pilot phase, please use our pilot features sign-up form.
When it is ready for general release, we will announce this in our regular product release newsletter.
What is this feature?
With Notification Inbox, you can store all the messages you send to your app users in one place, within the app. By enabling this feature, your customers can easily browse past notifications, increasing the reach and time window of your campaigns.
Similarly to the custom data fields, you can have images, icons and other interactive elements in the Notification Inbox.
The Notification Inbox feature is only a tool to deliver these elements to your users through their apps. It is your responsibility to process this data in your app, and the users must activate the inbox themselves.
Advantages
1. More attention to your messages
As your users know that they can view your messages any time, they can wait until they have the time to read them before responding. This helps to increase engagement and conversion.
Unread notifications are indicated by a badge within the app. iOS is already capable of displaying the badge on the icon of the app, and Android is adding this feature in its "O" release.
2. Prioritize your messages
You can choose to send inbox-only messages with low priority, such as up-sell messages or anything which does not require immediate attention, straight to the Notification Inbox. In this way you don't bother you users with irrelevant alerts.
When creating a message, you can select the method of delivery.

Implementation
Please refer to the following chapters when implementing the Notification Inbox.
Fetching notifications from the inbox
In order to receive the contents of the inbox, use the method below. Please make sure to call this method only after you called applogin
with the correct credentials.
Resetting the badge
When a user has opened the app's Notification Inbox, you may want to reset the unread messages count (badge). Use the following method for this.
Tracking message opens in Notification Inbox
To track the message opens in the Notification Inbox, use the following method with the message that's being viewed.
Fetching notifications from the inbox
In order to receive the contents of the inbox, use the method below. Please make sure to call this method only after you called applogin
with the correct credentials.
Resetting the badge
When a user has opened the app's Notification Inbox, you may want to reset the unread messages count (badge). Use the following method for this.
Tracking message opens in Notification Inbox
To track the message opens in the Notification Inbox, use the following method with the message that's being viewed.
Rich notifications
What are rich notifications?
Rich notifications enable you to send images within push messages. It is also possible to have a Title
and a Body
element of your message.
How to implement the rich notifications feature?
When using the Mobile Engage SDK with Android, there is no additional modification needed to use rich notifications.
In case of iOS, the following has to be implemented:
1. Add a new Notification Service Extension target to your project

2. In the Podfile, add the MobileEngageSDK
to the RichNotificationExtension
target.

3. Install the pods with the pod install
command.
4. If your selected language is Swift, create a Bridging-Header
for your new target.

5. Open the NotificationService class in the target, and
- import the
MobileEngageSDK
- extend the class
MENotificationService
instead ofUNNotificationServiceExtension.

The JSON format for rich notifications
In iOS, notification displaying is handled by the system. The payload format is restricted. For example, if you don't want to send a title, you can remove the title entry from the payload so an empty string will be sent. A Body
is always required.
If the title or body entries are missing from the payload, the app will receive the message but it will not be displayed.
The payload has the following format:
{ "aps": { "alert": { "title":"Game Request", "body":"Bob wants to play poker" }, "mutable-content":"1"//if we want image }, "imageUrl":"https://www.xxx.jpg"//if we want an image }
By default, on Lollipop and earlier versions, if the title is missing, the SDK inserts the name of the application into the title. From Marshmellow version onwards, the name of the application is already displayed by default, so nothing is inserted in the title.
If customers do not want the application name as title, they can provide a title in the ems_default_title
custom data field.
The payload has the following format:
{ "title":"Game Request", "body":"Bob wants to play poker", "imageUrl":"https://www.xxx.jpg"//if we want an image }
Please note that in both systems, the title is truncated to one line.
Restrictions and limitations
The service has some limitations in its usage. The following tables contain the details.
iOS | ||
---|---|---|
Mode | Type | |
Text | Image | |
Notification Center collapsed | Title is one line and it is truncated if too long. Body is four lines and it is truncated if too long. |
The small image preview is shown on the right. Title is one line and it is truncated if too long. Body is four lines and it is truncated if too long. |
Lockscreen collapsed | Title is one line and it is truncated if too long. Body is four lines and it is truncated if too long. |
The small image preview is shown on the right. Title is one line and it is truncated if too long. Body is four lines and it is truncated if too long. |
Floating collapsed | Title is one line and it is truncated if too long. Body is two lines and it is truncated if too long. |
The small image preview is shown on the right. Title is one line and it is truncated if too long. Body is two lines and it is truncated if too long. |
Expanded | Title is one line and it is truncated if too long. If the body is long, it becomes scrollable. |
The image is shown at the top. Title is one line and it is truncated if too long. If the body is long, it becomes scrollable. |
Please note that only HTTPS image URLs are supported.
Please note that on iOS 9 image display is not supported, and the body is shown only in four lines.
Android | ||
---|---|---|
Mode | Type | |
Text | Image | |
Notification panel collapsed | Title is one line and it is truncated if too long. Body is one line and it is truncated if too long. Title length varies between 20 and 55 characters, based on screen density. Title and body length varies between 20 and 55 characters, based on screen density. |
The small image preview is shown center-cropped. Title is one line and it is truncated if too long. Body is one line and it is truncated if too long. Title length varies between 20 and 55 characters, based on screen density. Title and body length varies between 20 and 55 characters, based on screen density. |
Notification panel expanded | Expanded notifications are available from API level 16. Title length varies between 20 and 55 characters, based on screen density. Body length varies between 200 and 700 characters, based on screen density. |
Expanded notifications are available from API level 16. The image is shown in larger. The preview image disappears. Title is one line and it is truncated if too long. Body is one line and it is truncated if too long. Title length varies between 20 and 55 characters, based on screen density. Title and body length varies between 20 and 55 characters, based on screen density. |
Lockscreen | Lockscreen notifications are available from API level 21. They look the same as Notification panel - Collapsed/Expanded. |
|
Heads up | Heads-up notifications are not supported. |
Please note that only HTTPS image URLs are supported.
Please note that the SDK does not support setting notification sound, but the user can set notification sounds to notification channels.
With Android Oreo, the user gains full control over displaying notifications. The notification channels have four levels of importance:
- Low:
- When collapsed, only the title is shown in one line with the application name and creation date of the notification.
- Small image previews are not available in collapsed mode.
- When expanded, the notification looks like a regular expanded notification.
- Does not play notification sound.
- The notification's icon is not displayed in the status bar.
- Medium:
- Expanded and collapsed notifications look as usual.
- Does not play notification sound.
- High:
- Plays notification sound.
- Urgent:
- Displays a heads up notification.
On Oreo, heads-up notifications are not set on a per notification basis, rather on a per channel basis. This means that if you post into a channel that has Urgent importance, then that notification will display as a heads up notification on Oreo devices. Keep in mind that the user can lower the importance of channels, so it is not guaranteed that your channel will remain in the Urgent category.