HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


This topic describes a simple onboarding deployment scenario to create a new Customized Commerce website and deploy the application, database and content to the _Integration_ environment in [Optimizely Digital Experience Platform](🔗).

When is this applicable?

This is an onboarding scenario for a **first-time deployment** when you want to set up a site and run development in a cloud environment from the beginning. Through Visual Studio you can deploy an empty database. A new site like this does not require database restore, and the database schema will be created during initial deployment.

## Before you start

This topic uses Visual Studio with the Optimizely extensions and publish profiles. However, you can also use [other deployment methods](🔗).

  • See [DXP Requirements](🔗) for recommended versions of software, tools and services to use when deploying.

  • See [Getting Started with DXP](🔗) for information needed to deploy.

Note

If not already done, remember to **change the default login credentials** (admin/store) provided in the Customized Commerce installation, before deploying. See [Installing Optimizely](🔗).

## Deployment steps

This section describes how to create a new website with CMS, Customized Commerce and Azure, and deploy the code and database with content to the Integration environment in DXP. The deployment is done from Visual Studio, using the publishing profiles provided with your DXP setup. 

Note

A Commerce solution consists of **two sites**, a front-end site and the back-end Commerce Manager site, and two databases: one for CMS and one for Commerce. So, you need to repeat some deployment steps for each site.

### 1. Create a front-end website with Azure

  1. Follow the substeps under the **STEP 1 and STEP 2** sections in [Create and deploy a CMS site](🔗) to create a site and configure it for Azure, but select **Empty** project (instead of the Alloy templates).

  2. Add the **EPiServer.Commerce** package and the **EPiServer.Commerce.Azure** package. You also need to add **EPiServer.Commerce.UI.ManagerIntegration** to the front-end site, if you want the UI integration between the front-end and back-end of Customized Commerce.

    

    

### 2. Publish code and database for the front-end site

  1. Right-click on the project in Visual Studio and select **Publish.** Browse and select the publish profile for the Customized Commerce front-end site.

  2. Click **Import** to import the settings from the publish profile and click **Next**.

  3. The **Connection** tab should display the imported publish profile settings; no changes are required here. Click **Next** (not Publish).

    

  4. In the **Settings** step, enter the remote connection string to SQL Database by selecting it under the **EPiServerDB** section (CMS database).

  5. Enable **Update database.**

  6. Click **Configure database updates**. a. Clear the **\[Auto schema update\]** option. 

    

    b. Click **Add SQL Script**. c. Browse to the _EPiServer.CMS.Core NuGet_ packages (located in _\[SolutionDir\]\\packages\\EPServer.CMS.Core.N.N.N\\tools\\_ and select **EPiServer.Cms.Core.sql**

    

    d. Click **Close** when done.

  7. In the **Settings** step, enter the remote connection string to SQL Database by selecting it under the **EcfSqlConnection** section (Customized Commerce database).

    

    a. Enable **Update database**. b. Click **Configure database updates**. c. Clear the **\[Auto schema update\]** option. d. Click **Add SQL Script**. e. Browse to the _EPiServer.Commerce.Core_ NuGet packages (located in _\[SolutionDir\]\\packages\\EPServer.Commerce.Core.N.N.N\\tools\\_, and select **EPiServer.Commerce.Core.sql**.

    

    f. Click **Close** when done.

    

    The **Settings** section looks like the following image, before publishing with the added SQL Database connection strings.

    

  8. Click **Publish** to publish the website and databases. The site should open in a browser when finalized, otherwise you can access it with the default URL for the Integration environment. Verify that the (empty) front-end site is working.

### 3. Add Commerce Manager (back-end) to the solution and publish the code

  1. Follow **steps 5-8 under Install Customized Commerce** in [Install Optimizely](🔗), to add Commerce Manager to your solution.

  2. Add the _EPiServer.CommerceManager.Azure_ package to the **Commerce Manager** **site**.

  3. Compile the solution, follow the instructions to update the database.

  4. Repeat **sub-steps 1-4 under STEP 2 Publish code...** above, this time using the **publish profile for the** **Commerce Manager site**. You only need to publish the code since the database was already published with the front-end site.

    

  5. Click **Publish** to publish the back-end site, which will open in a browser when finalized.

### 5. Verify the website

  1. Go to the default access URL; for example, `http://\[projectNNNNinte\].dxcloud.episerver.net`.

  2. Log in to the website using the administrator user provided.

  3. Verify that all parts of the site are working.

Note

When starting the site, there might be remaining migration steps. When logged in, navigate to _<site-url>/<ui-path>/Commerce/Migrate_ (if not automatically redirected there), and verify that all migration steps are completed. If there are any issues, correct them and run the incomplete migration steps again.

Note

When the site is started after the publishing has finalized, you might receive a temporary missing license notification before the cloud license is retrieved. Also note that **it may take up to one hour before the CDN is available for usage**. The site may display an error message during this time.

### 6. Add Optimizely Search & Navigation 

See [Create and deploy a CMS site](🔗) and [Deploy an existing CMS site](🔗) to add Optimizely Search & Navigation to your solution (not required).