Local Routing
Local routing is a configuration option for sales channels that determines how orders from that channel should be routed for fulfillment.
What is Local Routing?
- When
local_routing
is set totrue
(default), Endless will manage the routing strategy for orders from that sales channel internally. - When
local_routing
is set tofalse
, the routing strategy will be managed by the external system that's integrated with Endless.
How it Works
For local routing (local_routing = true
):
- Endless uses its own routing strategy defined for the sales channel
- The routing strategy is a list of rules that are applied in order
- Available routing strategies include:
- SINGLE_SHIPPING (SS)
- SHORTEST_DISTANCE (SD)
- BUILDING_PREFERENCE (BP)
- The default routing strategy is "SS:SD:BP" (Single Shipping: Shortest Distance: Building Preference)
Integration with External Systems
When local_routing
is set to false
:
- The system will use routing information received from external order sources
- This is useful when you have an external system that already has its own routing logic
- The external system must support order routing (checked via
supports?(:orders_routing)
)
Default Behavior
- By default,
local_routing
is set totrue
- This means Endless will handle the routing unless explicitly configured otherwise
Use Cases
- Use local routing when you want Endless Commerce to handle the order routing logic
- Disable local routing when you have an external system that should control the routing strategy
This configuration is particularly important when integrating with external systems or when you want to maintain consistent routing logic across different sales channels. The choice between local and external routing depends on your business needs and whether you want to leverage Endless Commerce's routing capabilities or rely on an external system's routing logic.