Flexible Order Status Customization in 1C-Bitrix

Flexible Order Status Customization in 1C-Bitrix With a standard 1C-Bitrix installation, you get a basic set of order statuses: N (accepted), F (completed), P (paid), and so on. Real business processes are usually more complex: you need statuses like 'Pending approval', 'Awaiting prepayment', 'Ma

Our competencies:

Frequently Asked Questions

Flexible Order Status Customization in 1C-Bitrix

With a standard 1C-Bitrix installation, you get a basic set of order statuses: N (accepted), F (completed), P (paid), and so on. Real business processes are usually more complex: you need statuses like 'Pending approval', 'Awaiting prepayment', 'Manager review', 'Reservation confirmed'. Manually changing statuses in the admin panel risks errors and wastes time. In one project with 12,000 orders per month, 30% of managers' time went into manual status switching. Automation reduced this cost by 80%. We configure statuses to match your production, logistics, and communication stages. Below is the technical implementation and typical solutions.

Bitrix documentation

Why Proper Status Configuration Is Critical

Each order status is not just a label. It affects product reservation, sending notifications to the customer, integration with 1C, and the logic of managers' work. A status error can lead to double sales or shipping delays. A business-process-tailored status chain automates routines and reduces errors. According to our data, proper configuration reduces order processing time by up to 40%. Correct status configuration saves resources by reducing manual labor.

Status Structure (Technical Part)

Statuses are stored in the b_sale_status table. Key attributes:

  • ID — code (Latin + digits), used in code and integrations
  • Type — O (order) or D (delivery/shipment)
  • Color — for visual highlighting in the order list
  • 'Is a cancellation status' — automatically releases product reservations
  • 'Order completed' — marks the order as finished, blocks some operations

Shipment statuses (D) are a separate entity for the multi-shipment model. They allow managing partial shipments, critical for B2B with multiple warehouses.

Comparison of Typical Status Sets

Scenario Statuses
B2C (retail) New → Confirmed → Collecting → Handed to delivery → Delivered / Canceled
B2B with approval New → Pending approval → Awaiting prepayment → Confirmed → In production → Ready for shipment → Shipped → Closed
With returns Main chain + Return initiated → Goods received → Return completed

Step-by-Step Status Configuration Guide

  1. Create a new status via OrderStatus::add().
  2. Set the localized name via StatusLangTable::add().
  3. Configure the transition matrix in the OnSaleOrderBeforeSaved handler.
  4. Test on a test environment.
  5. Deploy to the production site.

How to Add a New Status via API?

use Bitrix\Sale\OrderStatus; $result = OrderStatus::add([ 'ID' => 'WAIT_PREPAY', 'TYPE' => 'O', 'NOTIFY_BUYER' => 'Y', 'COLOR' => '#f0a500', 'SORT' => 25, ]); \Bitrix\Sale\Internals\StatusLangTable::add([ 'STATUS_ID' => 'WAIT_PREPAY', 'LID' => 'ru', 'NAME' => 'Awaiting prepayment', 'DESCRIPTION' => 'Order confirmed, awaiting payment', ]); 

The NOTIFY_BUYER field sends an email to the customer when the status changes. If the status is final (e.g., 'Canceled'), set the CANCEL = Y flag for automatic reservation release.

Allowed Transitions Matrix

Restrict status transitions via the event handler:

AddEventHandler('sale', 'OnSaleOrderBeforeSaved', function(\Bitrix\Main\Event $event) { $order = $event->getParameter('ENTITY'); if ($order->isNew()) return; $oldStatus = $order->getField('STATUS_ID'); // Get new status via changedFields $changedFields = $order->getFields()->getChangedValues(); $newStatus = $changedFields['STATUS_ID'] ?? $oldStatus; $allowedTransitions = [ 'N' => ['F', 'WAIT_PREPAY', 'CANCEL'], 'F' => ['PROCESSING', 'CANCEL'], 'WAIT_PREPAY' => ['F', 'CANCEL'], 'PROCESSING' => ['DELIVERING', 'CANCEL'], 'DELIVERING' => ['D', 'RETURN_INIT'], ]; if (isset($allowedTransitions[$oldStatus]) && $newStatus !== $oldStatus && !in_array($newStatus, $allowedTransitions[$oldStatus])) { return new \Bitrix\Main\EventResult( \Bitrix\Main\EventResult::ERROR, new \Bitrix\Sale\ResultError("Transition from {$oldStatus} to {$newStatus} is forbidden"), 'sale' ); } }); 

The transition matrix is a key element that prevents illogical status changes. We configure it for your business process to eliminate errors.

Implementation Examples

Standard B2C: New → Confirmed → Collecting → Handed to delivery → Delivered / Canceled

B2B with approval: New → Pending approval → Awaiting prepayment → Confirmed → In production → Ready for shipment → Shipped → Closed

With returns: Main chain + Return initiated → Goods received → Return completed

Changing Shipment Status

$shipmentCollection = $order->getShipmentCollection(); foreach ($shipmentCollection as $shipment) { if (!$shipment->isSystem()) { $shipment->setField('STATUS_ID', 'DELIVERING'); } } $order->save(); 

Automatic Status Change

Automation via agents or events. For example, upon receiving a shipment status from 1C, automatically change the order status. Compared to the standard implementation, our integration with 1C processes statuses much faster, reducing response time. One client reduced return costs thanks to this setup.

How Does Integration with 1C Affect Statuses?

During exchange with 1C via CommerceML, statuses are synchronized automatically. For example, when 1C confirms a shipment, the order receives the 'Shipped' status. Without proper configuration, discrepancies can occur: the order is completed in Bitrix but in progress in 1C. To avoid this, we create event handlers that change the order status upon receiving a shipment status from 1C. This saves managers' working time.

Status Functionality Comparison

Status Notification Cancellation Reservation
N (accepted) Yes (optional) No No
F (completed) Yes No Release
CANCEL No Yes Release
WAIT_PREPAY Yes No No

If the status does not change, check if the order is blocked by a 'Completed' or 'Canceled' status. Ensure the transition matrix allows the change. Also check the user permissions of the person trying to change the status.

What Is Included in the Work

  • Audit of current statuses and business processes
  • Design of the status scheme (transition matrix, notifications)
  • Implementation: adding statuses, configuring transitions, integration with 1C and fiscal data operators
  • Testing on a test environment
  • Deployment to the production server
  • Documentation on statuses and manager training
  • 1 month of support after launch

Contact Us

We are a team with years of experience in 1C-Bitrix development. We have implemented many projects for order process configuration. We work with PHP 8.1+, MySQL/MariaDB, integrations via REST API. We guarantee quality and documentation. Our status schemes significantly reduce reservation error rates. Contact us for an audit of your statuses and get a consultation on business process optimization.

Timeframes

Configuring 5–8 statuses with names and colors — from 2 to 4 hours. Configuration with transition matrix, 1C integration, and custom notifications — from 1 to 2 business days. Specific timelines are discussed after analyzing your task. For complex projects with multiple warehouses and returns, the timeline may increase to 3–4 days, but we always meet agreed deadlines.