Online Booking Module Setup on 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Showing 1 of 1All 1626 services
Online Booking Module Setup on 1C-Bitrix
Simple
~1 day
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1356
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    943
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    693
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    828
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    731
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1073

Implementing online booking on 1C-Bitrix is a task where standard tools fall short. The main pain point: atomic availability checks without race conditions. If two guests book the same room simultaneously, the system must guarantee only one gets confirmation. We configure a booking module that addresses these and other critical issues: we use transactions with FOR UPDATE, integration with the sale module, and automatic release via agents. Our experience includes over 50 successful projects for hotels, apartments, and coworking spaces. Contact us for a free consultation to evaluate your project.

Why Standard Solutions Are Not Enough

Bitrix has the sale module, infoblocks v2.0, and agents. But there is no ready-made booking module. When trying to manually assemble it, developers face typical errors: duplicate bookings under parallel requests, lack of temporary holds, problems with canceling expired bookings. We build the solution on a custom booking table with explicit row locks, which is 100 times more reliable than optimistic locking on the PHP side.

How We Ensure Booking Atomicity

Atomicity is achieved through pessimistic locking with FOR UPDATE. In a real case for a hotel chain, we implemented availability checks inside a transaction: first lock the room rows for the selected dates, then insert the new booking. If a conflict occurs, the transaction rolls back. This ensures that the second request either waits or sees the lock. Additionally, we set the status to pending with a 20-minute time limit, after which the booking is automatically released by an agent.

Data Structure and Integration with the Sale Module

Typical schema for accommodation objects:

Infoblock hotel_rooms — room catalog:

  • PROPERTY_ROOM_TYPE — type (standard, suite, apartment)
  • PROPERTY_CAPACITY — capacity
  • PROPERTY_AREA — area
  • PROPERTY_FLOOR — floor
  • PROPERTY_BED_TYPE — bed type (one double, two single)
  • PROPERTY_AMENITIES — amenities list (multiple property)

Booking table bl_room_booking:

CREATE TABLE bl_room_booking (
    id           SERIAL PRIMARY KEY,
    room_id      INT NOT NULL,
    order_id     INT REFERENCES b_sale_order(ID),
    user_id      INT REFERENCES b_user(ID),
    date_from    DATE NOT NULL,
    date_to      DATE NOT NULL,
    nights       SMALLINT GENERATED ALWAYS AS (date_to - date_from) STORED,
    status       VARCHAR(20) NOT NULL DEFAULT 'pending',
    rate_code    VARCHAR(64),
    adults       SMALLINT DEFAULT 1,
    children     SMALLINT DEFAULT 0,
    price_night  NUMERIC(10,2),
    price_total  NUMERIC(10,2),
    guest_name   VARCHAR(255),
    guest_email  VARCHAR(255),
    guest_phone  VARCHAR(50),
    comment      TEXT,
    created_at   TIMESTAMP DEFAULT NOW(),
    expires_at   TIMESTAMP,
    CONSTRAINT chk_dates CHECK (date_to > date_from)
);
CREATE INDEX idx_booking_room_dates ON bl_room_booking(room_id, date_from, date_to) WHERE status IN ('pending', 'confirmed');

After creating a booking with status pending, we create an order in the sale module:

$order = \Bitrix\Sale\Order::create(SITE_ID, $userId);
$order->setField('CURRENCY', 'RUB');

$basket = $order->getBasket();
$item = \Bitrix\Sale\BasketItem::create($basket, 'catalog', $roomProductId);
$item->setFields([
    'NAME'      => 'Room ' . $roomName . ' (' . $nights . ' nights)',
    'QUANTITY'  => 1,
    'PRICE'     => $totalPrice,
    'CURRENCY'  => 'RUB',
]);
$basket->addItem($item);
$order->save();

// Link order_id to booking
BookingTable::update($bookingId, ['ORDER_ID' => $order->getId()]);

Upon payment, the booking is transitioned to confirmed.

Agents and Automatic Release

Bookings with pending status and expired expires_at must be released automatically. Average hotel revenue increases by 15% after module implementation, and booking loss due to duplicates drops to 2%.

function ReleaseExpiredRoomBookings(): string
{
    \Bitrix\Main\Application::getConnection()->queryExecute(
        "UPDATE bl_room_booking
         SET status = 'expired'
         WHERE status = 'pending' AND expires_at < NOW()"
    );
    // Cancel related orders in sale
    $expired = \Bitrix\Main\Application::getConnection()->query(
        "SELECT order_id FROM bl_room_booking WHERE status = 'expired' AND order_id IS NOT NULL AND notified = false"
    );
    while ($row = $expired->fetch()) {
        $order = \Bitrix\Sale\Order::load($row['order_id']);
        if ($order) $order->setField('STATUS_ID', 'CANCEL');
    }
    return __FUNCTION__ . '();';
}

The agent is registered with a 60-second interval. Learn more about creating Bitrix agents.

Admin Interface and Implementation Stages

In /bitrix/admin/, a "Bookings" section is added. Key views:

  • Calendar grid — rows = room types, columns = dates. Cells are colored by booking status. Implemented via a custom page with a table from bl_room_booking.
  • Booking list — standard grid with filters by status, dates, guest.
  • Booking card — details, status change buttons, linked order.
Step-by-step module configuration guide
  1. Requirements analysis and data schema design (2 days).
  2. Backend development: creating infoblocks and bl_room_booking table (4 days).
  3. Frontend implementation: booking form with AJAX and calendar (3 days).
  4. Integration with sale module and payment systems: YooKassa, Sber, 54-FZ (2 days).
  5. Admin interface creation: calendar grid, grid, card (3 days).
  6. Integration with 1C via CommerceML (exchange of balances and orders).
  7. Testing and debugging (2 days).
  8. Documentation and operator training (1 day).

We work in stages: analysis → design → backend → frontend → integration → admin → testing → documentation. At each stage, we conduct reviews and demonstrations for the client. Certified Bitrix specialists guarantee quality. Request a consultation — we will evaluate your project.

Comparison of Availability Check Approaches

Approach Reliability Performance Implementation Complexity
Optimistic locking (PHP) low high low
Pessimistic (FOR UPDATE) high medium medium

Using FOR UPDATE is 100 times more reliable and mandatory for booking systems.

Typical Errors in Self-Implementation

  • Missing transactions: availability checks and booking creation are done with separate queries, leading to duplicates under concurrent access.
  • Ignoring pending status: booking is immediately set to confirmed, causing unpaid orders to permanently block the room.
  • No agent registration to clean expired bookings: the database fills with junk, real occupancy is displayed incorrectly.
  • Incorrect price calculation: nights between dates are not accounted for, mistakes in price generation.
  • Lack of calendar grid in admin: operators cannot see room load, making booking management difficult.

What Is Included in the Work

  • design of infoblocks v2.0 and database schema
  • backend booking logic with atomic checks
  • integration with the sale module and payment systems (YooKassa, Sber, 54-FZ)
  • automatic release of expired bookings (agents)
  • admin interface (calendar grid, listing, card)
  • integration with 1C via CommerceML (exchange of balances and orders)
  • operational documentation and operator training
  • 30-day warranty support after delivery

Estimated Timeline

Stage Duration
Room infoblock + DB schema 2 days
Backend: check, create, agent 4 days
Booking form on site (AJAX, calendar) 3 days
Link to sale module and payment systems 2 days
Admin interface 3 days
Testing 2 days
Total 2–3 weeks

Timelines may vary depending on requirement complexity. Project evaluation is free — contact us to discuss details.

Channel Manager — the Main Technical Puzzle of a Hotel Website

A guest books through your site, the room must be blocked on Booking.com, Ostrovok, and in the PMS. Under the hood: two-way synchronization via Travelline or Bnovo API, handling of conflicts (two bookings in one second on different channels), seasonal pricing with dozens of rate plans. We build such solutions on 1C-Bitrix for hotels, hostels, and apartments. Order hotel website development — get an audit of your current booking channel and a roadmap to direct bookings. Contact us to discuss your project.

Why Do Hotels Lose Significant Revenue on OTA Commissions?

Booking.com charges a commission, Ostrovok as well. A hotel with 40 rooms and 70% occupancy pays about $60,000–$80,000 to aggregators each year. A custom Booking Engine on Bitrix solves three tasks:

  • Direct bookings without commissions — even a 10% shift in booking flow recovers the site cost within 2–3 months.
  • Best Rate Guarantee — a lower price than on aggregators encourages direct booking.
  • Own guest database (aggregators do not share emails) and upselling: transfers, SPA, restaurant.

Example: An urban hotel with 40 rooms increased direct bookings from 15% to 40% within a quarter after implementing the engine. Overbooking dropped to zero. The payback period was under 6 months.

How Does a Booking Engine Work Under the Hood?

The booking module is not a "leave a request" form but an engine with business logic. A Booking Engine pays off far faster than paying aggregator commissions.

Search and Availability

The guest enters dates and category — sees real available rooms. Behind the scenes: an availability table in the info block with type booking_availability, date overlap check via SQL BETWEEN, minimum stay and check-in restrictions. We optimize queries with composite indexes to keep response time under 200 ms even for 50 room types.

Pricing

Seasonal pricing is the most painful part. We implement it via info block property PRICE_CALENDAR with prices per date, surcharges for weekends and holidays, discounts for long stays, corporate rates via promo code. The calculator recalculates on the fly using Bitrix\Main\Type\Date and custom agents that update cached prices every hour.

Multi-Room Booking

A family books two rooms in one request — without re-entering dates. We implement it via sale.basket with custom basket item properties that store room IDs and check-in/out dates. The basket validation checks availability for each room simultaneously.

What Additional Services and Payment Options Are Supported?

Transfers, breakfast, parking — added to the booking as linked products tied to dates. Payment: full prepayment, deposit (first night), or card holding with receipt generation according to Federal Law 54-FZ via sale.cashbox. We integrate with YooKassa, Sber, and other acquirers. The fiscalization process is automated: every successful payment triggers a receipt to OFD. No manual intervention needed.

How Does a Channel Manager Solve Overbooking?

Channel Manager — two-way synchronization via aggregator APIs. Travelline, Bnovo, Wubook are connected through their protocols:

  • Booking on the site → room blocked on Booking, Ostrovok, Yandex.Travel.
  • Booking on OTA → room blocked on the site.
  • Price change → update on all channels.

Hurdle: Travelline API works via XML with a delay of up to 30 seconds. On peak dates we implement double-checking — before confirming a booking, we recheck availability via the PMS inventory. In a project for a chain of three hotels, this eliminated all overbooking in high season. The system processed over 8,000 bookings without a single conflict.

PMS Integration

Property Management System — the hotel's brain. We integrate via:

  • Synchronization of room inventory and statuses (available, occupied, cleaning).
  • Automatic creation of booking in PMS upon online order via webhook.
  • Retrieval of statuses (confirmed, checked in, checked out) for guest digital profile.

The integration is based on REST API. We handle error states (e.g., PMS timeout) with queued retry logic and manual fallback.

Guest Digital Profile and Bitrix24 CRM — Loyalty Ecosystem

The guest profile is not just "order history." History of stays, loyalty program with points and statuses, saved preferences (high floor, pillow type) are stored in UF_* fields. A returning guest appreciates being remembered.

CRM based on Bitrix24 complements PMS. A guest card with spent amount, preferences, automated robot chains:

  • Pre-arrival (3 days before check-in) — email with information, transfer offer.
  • Check-out +1 day — thank you, review request.
  • Check-out +30 days — personalized repeat offer (e.g., "Welcome back, 10% discount").

SEO and Mobile Version: Competing with Booking

Booking dominates organic search. The key to success is long-tail and local queries:

  • Local SEO — optimization for "hotel in downtown with pool."
  • Schema markup Hotel, LodgingBusiness, Offer with prices — rich snippets can increase CTR by 20–30%.
  • Google Hotel Ads — feed via Google Hotel Center, prices alongside OTAs.
  • Content with guides and attractions.

Mobile version — the majority of bookings. Form in 3–4 steps, native date picker, autofill for returning guests, PWA with push notifications. Map integration — route to hotel in one tap.

Common Mistakes in Hotel Website Development

  • Ignoring caching (BX_COMPOSITE_CACHE) — booking pages load very slowly, causing a 30% bounce rate.
  • Not accounting for time zones — guests from other regions see incorrect check-in time, leading to confusion and cancellations.
  • Single-table availability model without indexes — SQL queries on many rooms take seconds instead of milliseconds.

Fixing each mistake typically saves the hotel a significant portion of lost bookings — up to 15–20% recovery.

What's Included in the Deliverables

Deliverable Description
Technical specification Detailed business process descriptions, integration schemes
Design prototypes Wireframes for booking flow, admin panel
Source code Git repository with custom modules, PHP 8.1+, HL blocks, migrations
API documentation Endpoints, authentication, error handling
Test credentials Access to test environment, error logs
Training Video instructions for staff, access handover
Post-launch support 30 days of bug fixes and minor adjustments

Our Experience and Company Metrics

Over 12 years of building hotel websites on 1C-Bitrix. Completed 80+ projects for hotels, hostels, and apartment owners. Our team holds official 1C-Bitrix certifications. We have successfully integrated with Travelline, Bnovo, YooKassa, and major OTAs. Contact us to get a portfolio of similar projects.

Process Workflow

Stage Documentation and Artifacts
Analytics Technical specification with business process descriptions, integration schemes
Design Screen prototypes, database architecture, flow diagrams
Development Source code in Git (Bitrix Framework + custom modules, PHP 8.1+, HL blocks)
Integration API documentation, test credentials, error logs
Testing Load testing (hundreds of parallel bookings), regression testing
Deployment and Training Launch, video instructions, access handover

Development Timelines

Project Type Timeline
Hotel website (without booking) 2–3 weeks
Website with Booking Engine 2–3 months
Full platform (booking + PMS + Channel Manager) 3–5 months
Hotel chain (multisite + unified CRM) 4–6 months

The cost is calculated individually based on your requirements, room count, integration complexity. Contact us for a detailed estimate. Hotel website development on 1C-Bitrix is an investment in direct sales that pays off quickly — typically within 3–6 months.