Launch Your Storefront Next
Launch your new storefront and make it accessible from its official, public web address.
Before running the commands, replace any placeholders with actual values.
-
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.
-
To make requests to the Managed Runtime API, you must include an API key in the HTTP request
Authorizationheader with the value,Bearer $API_KEY. For all the sample requests provided, replace$API_KEYwith 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.
-
Have access to your DNS provider to create and update CNAME records, and access to your third-party CDN provider (as applicable).
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.
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.
You can only export, and therefore import, one storefront at a time. Repeat these steps for each storefront, if necessary.
- Export the storefront and its associated data, such as sites, catalogs, and price books. Follow the steps in Site Import/Export to Copy Instances and Development Testing in B2C Commerce in Salesforce Help.
- In the staging or production instance, import the exported archive file.
After the storefront import process finishes, the
sfcc-post-import-setup-storefrontjob starts. It sets up an Account Manager API client, a SLAS client, a default environment, and an eCDN default domain. Then it deploys an initial bundle. If errors occur for this job, check the job logs in Administration > Operations > Jobs. See Managing Jobs in Salesforce Help. - After import, deploy the storefront bundle to the staging or production environment.
To move your storefront to staging or production, configure eCDN routing only for vanity domains or for new zones.
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.
If you’re using a vanity domain or a new zone:
- Update your eCDN routing rules to route traffic to your Managed Runtime environment. For more information, see Traffic Routing for PIG Instances with eCDN, or configure MRT Routing Rules in Business Manager.
- 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.
Set an environment’s access control header using Runtime Admin’s Access Control Settings or the access_control_header API.
In this example, we use the Managed Runtime API to set an access control header with the header value 25pn5dec7f1c:
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:
Salesforce Customer Success monitors the site’s traffic to confirm that the launch succeeded. After launch, customers with a Signature Success Plan receive proactive site monitoring. To use this monitoring service, mark your environment as production. For more information, see the section on environments in Managed Runtime Overview. Also, monitor the eCDN and MRT metrics in Log Center, in the Metrics Dashboard. See Embedded Content Delivery Network (eCDN) Metrics and Managed Runtime Metrics in Salesforce Help.