---
title: Multi-site orders
slug: commerce-connect-14/docs/multi-site-for-orders
docTags: 
createdAt: 2026-07-23T10:25:32.641Z
---

For customers upgrading their sites to use the new site functionality with historical orders, old orders must have the site ID properly set.  Use the following scripts as a starting point. You must implement your 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) 
```
