Store-to-site association with WebStoreNetwork
Key Takeaway
To point a web store at a different experience site, update NetworkId on its WebStoreNetwork record, because WebStoreId can be set only on create. The new site must use a template that's compatible with the web store type and can't already be associated with a store.
In B2B Commerce, a web store and the experience site that buyers visit are separate records. A WebStoreNetwork record is the link that ties one web store to one experience site. Admins update this link to point a store at a different site, for example after copying a store from a sandbox to production.
What WebStoreNetwork is
WebStoreNetwork represents the relationship between a web store and an experience site. Think of it as a connector record with a lookup on each side.
| Field | What it holds |
|---|---|
WebStoreId | A lookup to the WebStore |
NetworkId | A lookup to the Network, which is the experience site |
Name | An autonumber that's filled in automatically when the record is created, so you don't name these records yourself |