Setting Up Delivery Routing in 1C-Bitrix: Automate Logistics

Imagine: 60% of orders in your online store are handled manually – managers call customers to confirm the city and choose a carrier. Sounds familiar? We configure flexible delivery routing on 1C-Bitrix: automatic warehouse selection, prioritized delivery services per region, weight and time consider

Our competencies:

Frequently Asked Questions

Imagine: 60% of orders in your online store are handled manually – managers call customers to confirm the city and choose a carrier. Sounds familiar? We configure flexible delivery routing on 1C-Bitrix: automatic warehouse selection, prioritized delivery services per region, weight and time considerations. As a result, order processing time drops by 35% and manual errors fall to 2%. Our engineers are certified 1C-Bitrix specialists with 7+ years of experience and 50+ logistics automation projects.

How to set up warehouse selection by delivery address?

Standard Bitrix cannot automatically assign a shipping warehouse based on the buyer's address. We implement this through custom handlers. We create a bl_store_zones table with location_id -> store_id mapping. When a shipment is created, the region from the delivery address is identified and the warehouse is assigned. Example code:

$locationId = $order->getPropertyCollection()->getItemByOrderPropertyCode('LOCATION')?->getValue(); $storeId = StoreZoneTable::getStoreByLocation($locationId) ?? DEFAULT_STORE_ID; $shipment->setField('DELIVERY_DOC_NUM', $storeId); 

This enables selection of the nearest distribution center, reducing shipping cost for the customer and processing time.

Why is Bitrix's standard functionality insufficient?

Bitrix provides basic delivery zones and service binding via b_sale_delivery_location. But multi-warehouse setups, carrier prioritization by weight and region, and custom warehouse integrations require custom development. We use events, agents, and admin interfaces to flexibly manage logistics without code changes each time.

How we configure routing: a case with 5 warehouses

One of our clients is a retail chain with 5 warehouses across Russia and 10 delivery methods. Before integration, 40% of orders were processed manually. After our upgrade, the system automatically determines the nearest warehouse to the delivery address and suggests the cheapest available service. Order processing time decreased by 30%, errors dropped to 2%.

Key elements we improve:

Delivery zones in Bitrix

Delivery zones are stored in the b_sale_location table – a hierarchical directory of regions. Delivery services (b_sale_delivery_service) are linked to zones via b_sale_delivery_location. When a customer selects a city, Bitrix shows only those services that operate in that zone. Standard binding:

\Bitrix\Sale\Delivery\Services\Manager::save([ 'ID' => $deliveryServiceId, 'ACTIVE' => 'Y', 'RESTRICTED_LOCATION' => [$locationId1, $locationId2], ]); 

But for complex scenarios (multiple warehouses, weight/size restrictions) this is insufficient.

Selecting the shipping warehouse by address

The logic "which warehouse is closest to the delivery address" is absent in standard Bitrix. We implement it via the OnSaleShipmentBeforeSave event or a custom order handler. We create a bl_store_zones table with location_id → store_id mapping. When a shipment is created, we determine the region from the delivery address and assign the warehouse.

Carrier prioritization

When multiple delivery services are active, we can automatically suggest the optimal one by cost or speed. Create prioritization rules in bl_delivery_rules:

Field Description
location_group Region or group of regions
order_weight_from / to Weight range
delivery_service_id Preferred delivery service
priority Order of suggestion

An agent or basket component sorts available services by these rules during delivery calculation.

Comparison: standard setup vs. our custom solution

Criteria Standard Setup Our Development
Warehouse selection by address Not supported Custom handler, bl_store_zones table
Carrier prioritization Manual sorting only Rules by weight, region, cost
1C integration Basic via CommerceML Custom handlers, REST API
Admin interface Standard Extended interface for rules
Warranty None 12 months

Official documentation: Delivery zones in Bitrix

What our work includes

  • Analysis of current delivery scheme and requirements gathering.
  • Configuring delivery zones in b_sale_location and binding services to zones.
  • Developing bl_store_zones table with region-to-warehouse mapping.
  • Implementing warehouse selection logic during shipment creation.
  • Carrier prioritization rules by weight, region, cost.
  • Admin interface for managing routing rules.
  • Documentation and training for your managers.

Timeline and warranty

Timelines depend on complexity: from 3 to 14 business days. We provide a 12-month warranty on all customizations. Our engineers are certified 1C-Bitrix specialists with 7+ years of experience. We'll assess your project free of charge in 1 day – just contact us.

Typical mistakes when doing it yourself

  • Incorrect location binding: regions don't match addresses, delivery doesn't show.
  • Lack of priorities: with multiple carriers, the customer sees all but doesn't know which to choose.
  • Ignoring product weight: lightweight orders aren't offered postal services even when cheaper.

We account for these nuances and configure routing to work seamlessly. Order our setup – and your customers will stop getting confused about delivery. Get a consultation: we'll evaluate your project in one day.