---
title: Multi-site orders
slug: commerce-connect-15/docs/multi-site-orders
docTags: 
createdAt: 2026-07-30T20:34:41.000Z
---

When upgrading sites with historical orders to the multi-site functionality, set the site ID on each existing order. Use the following scripts as a starting point. Implement your own logic to determine which orders belong to which sites.

```sql
--Update orders
  Update OrderGroup set SiteId = ''
  where OrderGroupId in (Select ObjectId from OrderGroup_PurchaseOrder) 

  --Update subscriptions
  Update OrderGroup set SiteId = ''
  where OrderGroupId in (Select ObjectId from OrderGroup_PaymentPlan) 
```
