Configure optional features for a Dynamics 365 Commerce sandbox environment

This article explains how to configure optional features for a Microsoft Dynamics 365 Commerce sandbox environment.

Prerequisites

If you want to demo the transactional email features, the following prerequisites must be met:

  • You have an available email server (Simple Mail Transfer Protocol [SMTP] server) that can be used from the Microsoft Azure subscription where you provisioned the sandbox environment.
  • You have the server's fully qualified domain name (FQDN)/IP address, SMTP port number, and authentication details available.

Configure the image back end

Find your media base URL

Note

Before you can complete this procedure, you must complete the steps in Set up your site in Commerce.

  1. Sign in to the Commerce site builder by using the URL you made a note of when you initialized e-Commerce during provisioning (see Initialize e-Commerce).

  2. Open the Fabrikam, Adventure Works, or Adventure Works Business site that you want to work with.

  3. On the menu on the left, select Media Library.

  4. Select any single image asset.

  5. In the property inspector on the right, find the Public URL property. The value is a URL. Here is an example:

    https://images-us-sb.cms.commerce.dynamics.com/cms/api/fabrikam/imageFileData/MA1nQC.

  6. Replace the last identifier in the URL (MA1nQC in the preceding example) with the string search?fileName=. Here is what the example URL looks like after this change is made:

    https://images-us-sb.cms.commerce.dynamics.com/cms/api/fabrikam/imageFileData/search?fileName=

    This URL is your media base URL. Make a note of it.

Update the media base URL

  1. Sign in to Commerce headquarters.
  2. Use the menu on the left to go to Modules > Retail and commerce > Channel setup > Channel profiles.
  3. Select Edit.
  4. Under Profile properties, replace the value for the Media Server Base URL property with the media base URL that you created earlier.
  5. Select the channel that is named scXXXXXXXXX.
  6. Under Profile properties, select Add.
  7. For the property that was added, select Media Server Base URL as the property key. As the property value, enter the media base URL that you created earlier.
  8. Select Save.

Configure and test the email server

Note

The SMTP server or email service that you enter here must be accessible from the Azure subscription that you're using for the environment.

  1. Sign in to Commerce headquarters.
  2. Use the menu on the left to go to Modules > Retail and Commerce > Headquarters setup > Parameters > Email parameters.
  3. On the SMTP settings tab, in the Outgoing mail server field, enter the FQDN or IP address of your SMTP server or email service.
  4. In the SMTP port number field, enter the port number. (If you aren't using Secure Sockets Layer [SSL], the default port number is 25.)
  5. If authentication is required, enter values in the User name and Password fields.
  6. Select Save.
  7. Select Refresh.
  8. On the Test email tab, in the Email provider field, select SMTP.
  9. In the Send to field, enter the email address that the test email should be delivered to.
  10. Select Send test email.

Configure email templates

For each transactional event that you want to send emails for, you must update the email template with a valid sender email address.

  1. Sign in to Commerce headquarters.

  2. Use the menu on the left to go to Modules > Retail and Commerce > Headquarters setup > Parameters > Organization email templates.

  3. Select Show list.

  4. For each template in the list, follow these steps:

    1. In the Sender email field, enter the sender email address.
    2. Optional: In the Sender name field, enter the name that should be used as the sender name.
  5. Select Save.

Customize email templates

You might want to customize the email templates so that they use different images. Or you might want to update the links in the templates so that they go to your sandbox environment. This procedure explains how to download the default templates, customize them, and update the templates in the system.

  1. In a web browser, download the Microsoft Dynamics 365 Commerce demo default email templates zip file to your local computer. This file contains the following HTML documents:

    • Order confirmation template
    • Issue gift card template
    • New order template
    • Pack order template
    • Pick order template
  2. Customize the templates by using a text or HTML editor. See the list of supported tokens later in this article.

  3. Sign in to Commerce.

  4. Use the menu on the left to go to Modules > Organization administration > Setup > Organization email templates.

  5. Expand the list on the left to see all the templates.

  6. For each template that you want to customize, follow these steps:

    1. Select the template in the list.
    2. Under Email message content, select the appropriate language version in the list. (The default language is en-us.)
    3. Under Email message content, select Edit. The Upload email template pane appears.
    4. Select Browse, and find the HTML file that has the customized content.
    5. Select Upload. The template is uploaded into the system, and a preview is shown.
    6. Select OK.
    7. Optional: Customize the Subject property of the template.
    8. Select Save.

Supported tokens in the email template

When the email is rendered, these tokens are replaced with actual values that apply to the customer and the customer's order.

Sales order

The following tokens apply to the overall sales order.

Name of the token Token
Order number %salesid%
Customer's name %customername%
Delivery address %deliveryaddress%
Billing address %customeraddress%
Order date %shipdate%
Delivery mode %modeofdelivery%
Discount %discount%
Sales tax %tax%
Order total %total%

Sales line

The following tokens are replaced with values for each product in the order.

Note

Put the Product list - start token at the beginning of the HTML block that is repeated for every product, and put the Product list - end token at the end of the block.

Name of the token Token
Product list - start <!--%tablebegin.salesline% -->
Product list - end <!--%tableend.salesline%-->
Product name %lineproductname%
Description %lineproductdescription%
Quantity %linequantity%
Line unit price %lineprice% (verify)
line item total %linenetamount%
line discount %linediscount%
Ship date %lineshipdate%
Procurement method %linedeliverymode%
delivery address %linedeliveryaddress%
Sales unit of the line %lineunit%

Additional resources

Provision a Dynamics 365 Commerce sandbox environment

Configure a Dynamics 365 Commerce sandbox environment

Configure BOPIS in a Dynamics 365 Commerce sandbox environment

Microsoft Lifecycle Services (LCS)

Retail Cloud Scale Unit (RCSU)

Microsoft Azure portal

Dynamics 365 Commerce website