Configuring Order Ready for Pickup Notifications in 1C-Bitrix
An order is assembled at the warehouse, but the customer doesn't know. They arrive too early — the item isn't ready yet. Or too late — the manager has already released the reservation. The "Your order is ready for pickup" notification must be sent at the exact moment a warehouse employee changes the order status, via SMS, Telegram, or email.
Order Status as a Trigger
1C-Bitrix has no dedicated "Ready for Pickup" status out of the box. Create a custom status:
Store → Settings → Order Statuses → Add:
- Symbolic code:
RC(Ready for Collect) - Name: "Ready for Pickup"
- Color: green
After creating the status — attach a handler for status changes:
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
'sale',
'OnSaleOrderStatusChange',
function (\Bitrix\Main\Event $event) {
$order = $event->getParameter('ENTITY');
$newStatus = $order->getField('STATUS_ID');
if ($newStatus !== 'RC') {
return; // We only care about the "Ready for Pickup" status
}
// Get the pickup location from the order property
$pickupStoreProp = $order->getPropertyCollection()
->getItemByOrderPropertyCode('PICKUP_STORE_ID');
$storeId = $pickupStoreProp ? $pickupStoreProp->getValue() : null;
$storeInfo = null;
if ($storeId) {
$storeInfo = \Bitrix\Catalog\StoreTable::getById($storeId)->fetch();
}
// Build and send the notification
\Local\Notifications\ReadyForPickupNotifier::notify($order, $storeInfo);
}
);
Readiness Notification Class
// /local/lib/Notifications/ReadyForPickupNotifier.php
namespace Local\Notifications;
use Bitrix\Sale\Order;
class ReadyForPickupNotifier
{
public static function notify(Order $order, ?array $storeInfo): void
{
$userId = $order->getUserId();
$user = \Bitrix\Main\UserTable::getById($userId)->fetch();
$storeName = $storeInfo['TITLE'] ?? 'the store';
$storeAddress = $storeInfo['ADDRESS'] ?? '';
$orderId = $order->getId();
// Storage period — from settings (default 5 days)
$holdDays = (int)\Bitrix\Main\Config\Option::get(
'local.pickup', 'hold_days', 5
);
$holdUntil = date('d.m.Y', strtotime("+{$holdDays} days"));
$message = "Order #{$orderId} is ready for pickup at {$storeName}.\n";
if ($storeAddress) {
$message .= "Address: {$storeAddress}\n";
}
$message .= "Held until: {$holdUntil}.";
// Telegram
if (!empty($user['UF_TELEGRAM_CHAT_ID'])) {
\Local\Telegram\BotService::sendMessage(
$user['UF_TELEGRAM_CHAT_ID'],
$message
);
}
// SMS via service
$phone = $order->getPropertyCollection()
->getPhone()
?->getValue();
if ($phone) {
\Local\Sms\SmsService::send($phone, $message);
}
// Email — standard 1C-Bitrix mechanism
// Create an event for the email template
\CEvent::Send('ORDER_READY_FOR_PICKUP', SITE_ID, [
'ORDER_ID' => $orderId,
'STORE_NAME' => $storeName,
'STORE_ADDRESS' => $storeAddress,
'HOLD_UNTIL' => $holdUntil,
'USER_EMAIL' => $user['EMAIL'],
'USER_NAME' => $user['NAME'],
]);
}
}
The email notification template is created in Settings → Mail Events → Templates → Add with event type ORDER_READY_FOR_PICKUP.
Automatic Transition on Stock Arrival
For Click & Collect with reservation — when an out-of-stock item arrives at the pickup point's warehouse, the order should automatically transition to "Ready for Pickup":
\Bitrix\Main\EventManager::getInstance()->addEventHandler(
'catalog',
'OnProductUpdate',
function (\Bitrix\Main\Event $event) {
$productId = $event->getParameter('ID');
$fields = $event->getParameter('FIELDS');
if (!isset($fields['QUANTITY']) || $fields['QUANTITY'] <= 0) {
return;
}
// Find pending orders for this product with pickup delivery
$waitingOrders = \Local\Orders\PickupOrderFinder::getWaiting($productId);
foreach ($waitingOrders as $waitingOrderId) {
$order = \Bitrix\Sale\Order::load($waitingOrderId);
if ($order && $order->getField('STATUS_ID') === 'N') {
$order->setField('STATUS_ID', 'RC');
$order->save();
}
}
}
);
Implementation Timeline
Custom "Ready for Pickup" status, event handler, multi-channel notification (Telegram + SMS + email template) — 4–8 hours. Plus automatic transition on stock arrival — an additional 4–6 hours.







