CorefinityCorefinityDocs
Open the Control PanelControl Panel
Domains · 8 of 8

corestack_site_magento_store_mapping_update

Change Magento stores on addresses.

Scope writeRuns as a taskNo secrets returned
On this page

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

Prompt
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

defaultobject or null

{code, type} where type is website or store; omitted keeps it, null restores Magento's default.

Fields
codestringRequired

Up to 32 characters.

typestringRequired
websitestore
domains_versionintegerRequired

From the same stores read. At least 0.

hostsobject

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.

nginx_versionintegerRequired

From the stores read. At least 0.

point_base_urlsarray of strings

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.

site_idintegerRequired

At least 1.

Example call

tools/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

ReasonWhat to do
not_magentoThis row is not a Magento 2 site.
staleRead both versions again and send the new values.
busyAnother site change is running; follow it before trying again.
domains_lockedThe site's domains are managed by staff; contact support.
deletedThis site has been deleted.
provisioningWait for the site to finish being created.
removedThe site is no longer available.
managed_elsewhereAnother Control Panel manages this site; use it there.
store_hostsThe site has platform store addresses managed by staff; contact support.
store_requiredChoose a Magento website or store view for every serving alias.
store_unknownhosts.<host> or default identifies the choice. Read the stores again and choose a code Magento lists.
store_inactivehosts.<host> or default identifies the choice. Switch the store view on in Magento or choose another.
store_code_formathosts.<host> or default identifies the choice. Use a Magento code with lower-case letters, digits or underscores, up to 32 characters.
store_host_not_servedFirst add the address as an alias that shows its own store.
store_mapping_foreignThe store rules are managed outside the Control Panel; contact support.
store_mapping_unreadableThe existing store rules cannot be read safely; contact support.
nginx_rules_not_adoptedThe site's rules are not ready for this change; contact support.
nginx_rules_lockedThe site's rules are locked; contact support.
nginx_invalidThe site's existing rules need attention before the store can be changed.
upstream_unavailableMagento's stores could not be read; try again in a moment.
invalid_argumentsThe 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_mismatchThe object does not exist or the token may not see it. Check the id.
scope_requiredThe token lacks a scope this call needs. Open the link in the answer to add it, then call again.
pin_refusedThe 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_limitedToo many calls. Wait for the number of seconds the answer names.
temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.
internal_errorSomething went wrong on our side. Quote the trace id to support.

The same task elsewhere

Was this helpful?
Open in ClaudeOpen in ChatGPT