> For the complete documentation index, see [llms.txt](https://docs.hotwax.co/documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hotwax.co/documents/retail-operations/orders/order-routing/apply-routing-strategies/template/cross-border-shipping.md).

# Route orders across Canada and the United States

Use this template for a Canada-based retailer that ships Canadian orders from a warehouse or stores but restricts United States orders to the central warehouse.

This example uses shipping methods to identify the destination market:

* `US Standard` for United States orders
* `Canada Standard` for Canadian orders

Replace these names with the shipping methods configured in your HotWax Commerce Omnichannel Order Management System (OMS).

## Prepare the configuration

1. [Map the Shopify shipping methods](https://github.com/hotwax/oms-documentation/tree/user-guides-pub/documents/system-admin/administration/company/product-store-onboarding.md#5-review-shopify-mappings) to distinct United States and Canadian methods.
2. [Create facility groups](https://github.com/hotwax/oms-documentation/tree/user-guides-pub/documents/system-admin/administration/facilities/manage-groups.md) for the central warehouse and eligible Canadian stores.
3. Confirm the queues used for new, rejected, and unfillable order items.
4. Decide whether the business permits partial allocation in each market.

## Create the routing group

1. Click `New routing group`.
2. Name the group `North America standard routing`.
3. Add a description that records the country and facility restrictions.
4. Set the schedule to every 15 minutes, or choose an interval that matches your order volume.
5. Keep the group in `Draft` while you configure its routings.

## Add the United States routing

Place this routing first because United States orders have the narrower facility choice.

1. Click `New` in the `Routings` column.
2. Name the routing `United States standard orders`.
3. Add a `Queue` filter and select the queues that should be evaluated.
4. Add a `Shipping method` filter and select `US Standard`.
5. Sort by `Order date`.

Add one routing rule:

| Setting                    | Value                                             |
| -------------------------- | ------------------------------------------------- |
| `Group`                    | Central warehouse                                 |
| `Sort`                     | `Proximity`                                       |
| `Allow partial allocation` | Use the retailer policy for United States orders. |
| `Unavailable items`        | Select `Queue`, then choose the unfillable queue. |

The group filter prevents retail stores from receiving United States orders.

## Add the Canada routing

1. Add a second routing named `Canada standard orders`.
2. Add the same `Queue` filters used for eligible Canadian order items.
3. Add a `Shipping method` filter and select `Canada Standard`.
4. Sort by `Order date`.

Add the following routing rules in order:

| Sequence       | `Group`           | Sort        | `Allow partial allocation` | Unavailable items |
| -------------- | ----------------- | ----------- | -------------------------- | ----------------- |
| Routing rule 1 | Central warehouse | `Proximity` | Off                        | `Next rule`       |
| Routing rule 2 | Canadian stores   | `Proximity` | Off                        | `Next rule`       |
| Routing rule 3 | Central warehouse | `Proximity` | On                         | `Next rule`       |
| Routing rule 4 | Canadian stores   | `Proximity` | On                         | `Queue`           |

Select the unfillable queue in the last routing rule. This sequence tries a single warehouse shipment, then a single store shipment, before it permits split allocation.

## Activate and validate the group

1. Review both routing filters to confirm that an order cannot match the wrong market.
2. Confirm that the United States routing appears before the Canada routing.
3. Confirm the four-rule fallback sequence in the Canada routing.
4. Change the routings and routing rules to `Active`.
5. Click `Save`.
6. Change the saved routing group to `Active`.
7. Run representative United States and Canadian orders through [Test drive](/documents/retail-operations/orders/order-routing/test-and-optimize/test-drive.md), if the feature is available.
8. Open `History` after the first execution and review the result.

{% hint style="warning" %}
This routing configuration controls facility selection. Carrier service, transit time, and customs processing still determine whether an order meets its delivery promise.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hotwax.co/documents/retail-operations/orders/order-routing/apply-routing-strategies/template/cross-border-shipping.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
