Create and publish a new message
To create and publish a new message:
-
Click the required topic.
-
Click Publish Message in the menu sidebar.
-
Select the event type. This is sent to the client application as the message type (
data.referenceType), so select the type that the client application expects – for example,PROMOTIONfor a promotion. -
Enter the message title (up to 100 characters).
-
Enter the message body.
-
Set an expiration date for the message.
-
Click Publish to publish the message.
The message is delivered as a popup notification, which is intended to be displayed to the user immediately. The title and body are shown in the notification, and are also passed to the client application.
Message body
The message body can be plain text or a JSON object.
Using a JSON object allows you to include additional fields that instruct the client application to do specific things. For example, you can specify a product to open if the user clicks on the message, so that the user can purchase it:
{"text":"Get the action bundle","productId":"ACTION_MOVIE_BUNDLE"}
Type the JSON object as it is: OpCon converts it into the right form when it sends the message. Note that:
-
Backslashes (
\) are not allowed in any field, so text inside the JSON can't contain double quotes. -
Line breaks in the body are allowed.
-
The notification shows the body exactly as you typed it, so a JSON body also appears as JSON in the notification.
See Message formats for a full list of the available fields.
If you are using ION as your client application, note that it does not yet support these additional fields in the message body.