Custom data fields
What are custom data fields?
Please note that we do not recommend adding custom data fields to push messages anymore. This feature will be deprecated soon.
You can add links to push messages on the Tap Actions tab.
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://bestrun.com/mobile/deep/link/productpage/234567654,”sid:792_1rwvShB5bxJ5}"
}
Creating custom data fields
Click Create Custom Data Field, 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
The custom data fields for that app are now listed on the Apps tab and you can open them and edit their values.
For each push message, you can also edit the field values in the Custom Data tab of the Content Creation step.
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.