corestack_ site_ magento_ store_ mapping_ update
Change Magento stores on addresses.
When to use it
Change which Magento website or store view an existing serving address shows. Read corestack_site_magento_stores_list
first for both versions. To add a new address use corestack_domains_update, or corestack_site_attach_domain before the
site is live. The task follows the whole store change, including the store addresses. Nothing changed answers
operation: null and stores, without a task. A failed task answers work_failed with the store step and its reason
in details.magento_stores. The site remains busy until its store work ends.
After the store change completes and before changing DNS:
Request / with corestack_site_smoke_test, setting host to the store domain. The final URL must be on that
store's base_url host from corestack_site_magento_stores_list (the domain itself, or its bare or www form
when the base URL uses it), and the title must be that store's. Magento redirects to the store's base URL; a
redirect to any other host means its base URL points elsewhere.
GraphQL picks its store from the Store header, so it cannot prove a domain's store.
Ask for it
Using the Corefinity MCP server, call corestack_site_magento_store_mapping_update with site_id 4211, nginx_version 4, domains_version 3, hosts {"guns.example.co.uk":{"code":"guns","type":"website"}}. (Change Magento stores on addresses.) Tell me what it returned.Inputs
{code, type} where type is website or store; omitted keeps it, null restores Magento's default.
Fields
Up to 32 characters.
websitestoreFrom the same stores read. At least 0.
A partial map host: {code, type}, or host: null to remove a mapping. Omitted hosts stay as they were. Only addresses already serving this site may be changed.
From the stores read. At least 0.
Explicitly point these stores' base URLs here, including addresses currently elsewhere. Ask the person before moving another address. With no explicit choice only the site's own addresses move automatically. Up to 10 items.
At least 1.
Example call
{"name":"corestack_site_magento_store_mapping_update","arguments":{"site_id":4211,"nginx_version":4,"domains_version":3,"hosts":{"guns.example.co.uk":{"code":"guns","type":"website"}}}}If it is refused
| Reason | What to do |
|---|---|
not_magento | This row is not a Magento 2 site. |
stale | Read both versions again and send the new values. |
busy | Another site change is running; follow it before trying again. |
domains_locked | The site's domains are managed by staff; contact support. |
deleted | This site has been deleted. |
provisioning | Wait for the site to finish being created. |
removed | The site is no longer available. |
managed_elsewhere | Another Control Panel manages this site; use it there. |
store_hosts | The site has platform store addresses managed by staff; contact support. |
store_required | Choose a Magento website or store view for every serving alias. |
store_unknown | hosts.<host> or default identifies the choice. Read the stores again and choose a code Magento lists. |
store_inactive | hosts.<host> or default identifies the choice. Switch the store view on in Magento or choose another. |
store_code_format | hosts.<host> or default identifies the choice. Use a Magento code with lower-case letters, digits or underscores, up to 32 characters. |
store_host_not_served | First add the address as an alias that shows its own store. |
store_mapping_foreign | The store rules are managed outside the Control Panel; contact support. |
store_mapping_unreadable | The existing store rules cannot be read safely; contact support. |
nginx_rules_not_adopted | The site's rules are not ready for this change; contact support. |
nginx_rules_locked | The site's rules are locked; contact support. |
nginx_invalid | The site's existing rules need attention before the store can be changed. |
upstream_unavailable | Magento's stores could not be read; try again in a moment. |
invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |