Launch your new storefront and make it accessible from its official, public web address.
Before running the commands, replace any placeholders with actual values.
Before You Begin
To perform administrative tasks, you must have one of these roles and permissions:
Managed Runtime roles: Managed Runtime User or Managed Runtime Admin. To request access, contact your B2C Commerce administrator and ask them to add one of these roles to your account in Account Manager.
Business Administrator role in Account Manager or a role for the Business Manager Module and Organization context with read-write access to storefronts. See Create a Role in B2C Commerce in Salesforce Help.
Project Developer or Project Admin role on the Managed Runtime project. To request access, contact your B2C Commerce administrator and ask them to add one of these roles to your account for the project in Runtime Admin.
To make requests to the Managed Runtime API, you must include an API key in the HTTP request Authorization header with the value, Bearer $API_KEY. For all the sample requests provided, replace $API_KEY with your actual API key. To find your API key, log in to Runtime Admin and go to the Account Settings page.
Treat your API key like a password because it allows scripts to complete operations on your behalf.
Important
Alternatively, use the B2C CLI to make Managed Runtime API calls without handling the API key directly.
Have access to your DNS provider to create and update CNAME records, and access to your third-party CDN provider (as applicable). If you’re using a vanity domain, see Storefront Zone Creation for how to add an SSL certificate to your zone and configure the CNAME mapping, or eCDN Automatic Certificates to have eCDN manage the certificate for you.
To make requests to the SCAPI CDN Zones API, you must have an API client with the sfcc.cdn-zones and sfcc.cdn-zones.rw OAuth scopes. See Authorization for SCAPI Admin APIs for steps on creating an API client and assigning scopes. Alternatively, use the B2C CLI to make eCDN API calls without constructing requests yourself.
Launching an Environment
The launch process is the same for staging and production. The only difference is the domain name and Managed Runtime environment.
We strongly recommend going through the launch process on a staging environment before running it on production. Complete these steps as soon as you start a Storefront Next project and at least two weeks before your launch date.
Warning
1. Import the Storefront to the Staging or Production Instance
Before you can launch the storefront in another instance, export it from the sandbox or development instance, and then import it to the staging or production instance. The storefront import creates an initial environment that you can deploy a bundle to from the sandbox or development instance.
The storefront itself must always be imported. No replication path exists for storefronts. How you move the storefront’s associated data, such as sites, catalogs, and price books, depends on the target instance:
Staging: Use site import/export to move both the storefront and its associated data.
Production: Use site import/export for the storefront, but use replication to move its associated data.
You can only export, and therefore import, one storefront at a time. Repeat these steps for each storefront, if necessary.
In the staging or production instance, import the exported archive file.
After the storefront import process finishes, the sfcc-post-import-setup-storefront job starts. For this instance, the job sets up an Account Manager API client, a SLAS client, a default environment, and an eCDN default domain. These configurations and environment are separate from the sandbox or development instance that the storefront was exported from. Next, the job deploys an initial bundle to the default environment, which sets up the environment and its environment variables. If an error occurs during the job execution, check the job logs in Administration > Operations > Jobs. See Managing Jobs in Salesforce Help.
If you’re launching to production, replicate the storefront’s associated data, such as sites, catalogs, and price books, from your staging or development instance. See Granular Data Replication in Salesforce Help.
Deploy the storefront bundle to the staging or production environment. Then check whether any custom environment variables your storefront relies on are missing from that environment, and add them. See Environment Variables.
2. Update the SLAS Client Redirect URI
If you’re using a vanity domain, add that domain to the redirectUri array of the SLAS client used by the storefront. Otherwise, shopper login requests that redirect back to your vanity hostname are rejected. See the redirectUri array description in Authorization for Shopper APIs, and update the client using the SLAS Admin API or SLAS Admin UI.
3. Perform the Cutover
To move your storefront to staging or production, configure eCDN routing only for vanity domains or for new zones.
Default Domain
Default domains and default zones don’t require eCDN configuration. Environments created in Storefront Next are preconfigured with eCDN and a default domain, which is routed to the Managed Runtime domain.
Update access control headers to allow only trusted traffic from eCDN to your MRT origin. That way, bots and crawlers can’t access your MRT origin and negatively impact SEO.
Storefront Next environments support up to 4 access control headers, and the header that Salesforce configures for your default domain can’t be deleted. Add a separate header value for each vanity domain instead of reusing or replacing the default one. See Access Control Headers.
Note
Send the Access Control Header from eCDN to the MRT Origin
Use the upsertOriginHeaderModification API in B2C Commerce API (SCAPI) to set the headerValue. This example shows how to call this SCAPI endpoint to set an access control header with the header value 25pn5dec7f1c:
If you’re launching to production, mark the environment as production. Customers with a Signature Success Plan receive proactive site monitoring for environments marked as production. For more information, see the section on environments in Managed Runtime Overview.
Enable any additional eCDN configuration you want for the environment, such as HTTP/2 prioritization or TLS 1.3. See HTTP/2 Prioritization and TLS 1.3 Cipher Suites in the CDN API guides.
After you confirm that the launch succeeded, lock down the production default domain to accept traffic only from your corporate VPN, so that public traffic flows only through your vanity hostname. Use an access control rule in the CDN API to allowlist your VPN’s IP addresses on the zone that fronts the default domain.