Setting Up Push Notifications for the 1C-Bitrix Mobile App
The mobile app built on the 1C-Bitrix platform (Bitrix Mobile) has a built-in push notification mechanism, but it requires proper configuration: obtaining Firebase Cloud Messaging (FCM) keys for Android and APNs keys for iOS, registering them in the 1C-Bitrix control panel, and configuring notification templates. Without this, the app builds fine but notifications are never delivered. Beyond standard notifications, custom ones are also needed — for example, "Your order has been shipped" with a tracking number, or "Price drop on a wishlist item".
Standard setup: FCM and APNs
Firebase Cloud Messaging (Android):
- In Firebase Console, create a project and add the Android app with its bundle ID
- Download
google-services.jsonand place it in the Bitrix Mobile project - Copy the Server Key from Firebase Console → Cloud Messaging
In the 1C-Bitrix control panel: Settings → Product Settings → Mobile Apps → Push and Pull — paste the Firebase Server Key.
APNs (iOS):
- In Apple Developer: create an APNs Key (.p8 file), note the Key ID and Team ID
- In 1C-Bitrix: paste the contents of the .p8 file, Key ID, Team ID, Bundle ID
After this, standard 1C-Bitrix push notifications (new order, status change via standard events) will begin working.
Custom push notifications via API
For sending non-standard notifications (outside standard functionality), use the 1C-Bitrix pull module:
use Bitrix\Pull\MobileNotify;
// Order status notification
public function sendOrderStatusPush(int $userId, array $order): void
{
if (!\Bitrix\Main\Loader::includeModule('pull')) return;
$message = [
'module_id' => 'local.shop',
'command' => 'orderStatusChanged',
'expiry' => 3600, // seconds
'user_list' => [$userId],
'message' => "Order #{$order['ID']}: status changed to \"{$order['STATUS']}\"",
'params' => [
'orderId' => $order['ID'],
'status' => $order['STATUS'],
'trackCode' => $order['TRACK_CODE'] ?? '',
],
'push' => [
'sound' => 'default',
'badge' => 1,
],
];
MobileNotify::send($message);
}
In the mobile app (if it is a custom React Native app) — the module.local.shop.orderStatusChanged event handler updates the order screen.
Price drop notifications (wishlist)
The trigger is a handler for the catalog price update event:
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
'catalog', 'OnPriceUpdate',
function (\Bitrix\Main\Event $event) {
$priceData = $event->getParameter('fields');
$productId = $priceData['PRODUCT_ID'];
$newPrice = $priceData['PRICE'];
// Find users who have this product in their wishlist
$wishlistUsers = WishlistTable::getUsersByProduct($productId);
foreach ($wishlistUsers as $userId) {
$oldPrice = $this->getLastNotifiedPrice($userId, $productId);
if ($newPrice < $oldPrice * 0.95) { // discount greater than 5%
$this->sendPricePush($userId, $productId, $oldPrice, $newPrice);
}
}
}
);
Segmentation and frequency capping
Bulk push sending in 1C-Bitrix is done by iterating over users with frequency limits applied. Important: users can disable specific notification types in the app settings. 1C-Bitrix stores device_token in the b_pull_client table; permission states are in b_pull_push_settings.
Rate limiting: no more than 1 push of a specific type within N hours per user — implemented in PHP, checked before each send.
if ($this->canSendPush($userId, 'price_drop', 24)) { // no more than once per day
MobileNotify::send($message);
$this->recordPushSent($userId, 'price_drop');
}
Delivery monitoring
FCM and APNs return delivery statuses. Tokens for undelivered notifications (app uninstalled, device replaced) must be deactivated — otherwise the token table becomes polluted. 1C-Bitrix handles FCM responses automatically when configured correctly. For APNs when using custom sending logic — check for status 410 (token invalid) and remove the token from b_pull_client.
Scope of work
- Creating Firebase and Apple Developer projects, obtaining keys
- Configuring FCM and APNs in the 1C-Bitrix control panel
- Testing standard notifications (orders, statuses)
- Developing custom push scenarios: price drops, new promotions, reminders
- Segmentation: sending to user groups
- Frequency capping, deactivating stale tokens
Timeline: standard notifications — 1–2 days. Custom scenarios with segmentation — 1–2 weeks.







