notifications.sendMass

Sends a message with a notification to all application users whose profiles match the specified criteria

NameRequiredTypeDescription
text true String

A message that will be sent as a notification to the user. The maximum text length is 200 characters

expires true String

The date and time of expiry of this notification. Format: yyyy.MM.dd HH:mm

Note: the expiry date must be less than 14 days from the current date. Time zone used: MSK(UTC+03:00)

status false String

One of the values:

  • PUBLIC or P – the notification is shown to app users (used as the default value if the parameter is omitted)
  • ADMINS_ONLY or A – the notification is only shown to app developers
gender false String

One of the values:

  • MALE or M
  • FEMALE or F
age_range false String

Age range (inclusive). Format:

birthday_range false String

Birthday range (inclusive). Format: MM.dd–MM.dd

country false String

Country code in user profile

city false String

The city code returned in the “location.city” parameter of the users.getInfo method

first_access_range false String

The date range of the first launch of the application by the user (inclusive). Format: yyyy.MM.dd–yyyy.MM.dd

last_access_range false String

The date range of the last launch of the application by the user (inclusive). Format: yyyy.MM.dd–yyyy.MM.dd

has_email false Boolean

If the parameter is set, it restricts users as follows:

  • true – users who have specified their e-mail address in their profile
  • false – users who have not specified an e-mail address in their profile
mask false Long

The mask is 32 bits in size. It is given as a decimal number. The notification will arrive if the result of the bit AND compare operation with the user mask is not 0. (user.mask & notification.mask > 0)

maskExactMatch false Boolean

Use strict bit matching in the mask and user mask. (user.mask == notification.mask)

mark false String

The tag that will be passed to the application in the custom_args parameter on transition by notification

qualifier false String

Identifier for carrying out the A/B experiment (see below). Available values:

  • game1;
  • game2;
  • game3;
  • game4;
  • game5
test_group false Integer

The sequence number of the test group in the A/B experiment. Can take value 0 as the baseline group of the experiment and 1 as the experimental group

test_groups false Integer

Number of test groups in the A/B experiment. There should be exactly 2

custom_button_key false String

If set, it allows replacement of the default test value on the button in the notification. For example, if “button_save” is specified, the button will say “Save” instead of “Start playing”

Authorization

Session is prohibited

Required permissions

  • VALUABLE_ACCESS

It is permitted to specify no more than 5 special characters or emojis in the notification text

This type of notification has the following restrictions:

  • notifications are only sent to users who launched the game not more than 7 days ago;
  • each user can have no more than one active mass notification from the game. If there are several mass notifications, the latest one is shown to the user.

If multiple filter criteria are specified, they are combined using logical AND. For example, if gender=MALE&age_range=20-25 is sent, the notification will be shown to users who meet both conditions: male users aged 20–25. The start and end values of the range are inclusive, so the notification from the previous example will be shown to male users whose age is equal to any of the following values: 20, 21, 22, 23, 24, 25. A maximum of 30 mailings per day is permitted.

The notification text can contain the following placeholders, which will be replaced with user data before the notification is displayed. The following placeholders are supported:

PlaceholderDescription
${user.first-name}User name. Example: Ivan
${user.last-name}User’s last name. Example: Petrov
${user.full-name}Full user name. Example: Ivan Petrov
${user.age}User’s age. Example: 25

A/B experiments for notifications

This method allows you to conduct A/B experiments among users. For example, you can conduct an experiment to test the most effective text in a notification, or issue different bonuses to different groups of users with notifications.

When conducting experiments, we completely take care of the task of dividing users into independent and non-overlapping experimental groups. All you have to do is determine how many test groups you will have in your experiment and send out the necessary notifications to those groups.

You can perform up to 5 different experiments at the same time. The unique identifier of the experiment is the qualifier parameter. That is, if you run 2 experiments, then for the first experiment this parameter should be equal game1 (or whatever you like), and for the second experiment it should be any of the remaining parameters, but not equal to the qualifier of the first experiment (in our example, not game1).

In each experiment, there are 2 groups of users whose metrics can be compared. These are defined by the test_group parameter:

  • 0 is the baseline group of the experiment;
  • 1 is the experimental group of the experiment.

These user groups will not overlap. We are responsible for this – you do not need to segregate users yourself.

A/B experiment statistics

To make it easier to analyze your A/B experiments, we have prepared tools to obtain basic statistics on notifications.

Statistics available:

Type

"String"

Application paramters

User session data

Method

List of paramters

Используем для подписи secret_key = session_secret_key
Используем для подписи secret_key = application_secret_key
Используем для подписи secret_key = MD5(access_token + application_secret_key)
secret_key =
Сортируем и склеиваем параметры запроса и secret_key
Рассчитываем MD5 от полученной строки и получаем параметр sig