Configure Storefront 365
For Partners
Storefront 365 configurations are managed with configuration files stored in the web application root folder. Configuration files are shared between the components in the solution. Some configuration files are explicit for Episerver and are never updated by an administrator.
The configuration files that a Storefront partner will use during the development, test and production phases are
Episerver Find Configuration
Episerver Find uses an Index that is available as a service. The development environment may use a demo index or any other type of license for the search engine. If no Find Index is available, then create a demo search index using Episerver index site at https://find.episerver.com/.
Log in or create an account and add a demo service. Enter a name and select the languages that will be used for indexing. Using Contoso Demo Data requires that English and French are selected.
The demo service will be available immediately.
Configuration information is needed for Storefront 365. The configuration information required is displayed on the demo service page when the service has been created.
The configuration information must be added to the episerverFind.config file in the Storefront 365 Starter Site project in Microsoft Visual Studio, or in the web application root folder. Make sure that all solution configuration depending configuration files, such as debug files, are updated with the configuration.
- ServiceURL. The URL to the index as described by Episerver Find web page.
- DefaultIndex. The name of the Episerver Find index as described by Episerver Find web page.
All services used for Episerver Find are available in the My Services page. Useful if the configuration has to be fetched again.
Storefront Configuration
Storefront 365 Integration Framework and Storefront 365 Starter Site are configured using two configuration files.
Storefront.Config
The configuration file is an XML file with elements and attributes.
Modules
A module is a pipeline executed by a service. There are four modules defined in the default implementation of Storefront Integration Framework.
- Staging. The staging module is used by the Storefront Staging Job to read product catalogue information from Dynamics 365 for Finance and Operations to the staging database.
- Catalog. The catalogue module is used to read product catalogue information from the staging database into Episerver Commerce Catalog.
- PmcImport. A module used to read product catalogue information from the staging database into InRiver PMC for enrichment. This module is used if and only if InRiver PMC is part of the solution.
- PmcStaging. A module used to read enriched information from InRiver PMC written to the staging database into Episerver Commerce Catalog.
In a solution that don’t use InRiver PMC are the PMC-modules removed from the configuration file. If any partner creates additional modules, then they are configured as module-elements.
Attribute |
Description |
group |
Grouping of data used by modules. Elements sharing a group read the information that another module with the same group name has written. Two pre-defined groups are used by Storefront Integration Framework: · ax. The staging job reads product catalogue information from Dynamics 365 for Finance and Operations and writes it to the staging database. Any module using the information must use the ax-group. · pmc. The integration framework uses the pmc-group to read and write information that has been enriched by InRiver PMC. |
mediaPath |
The attribute is used by the administrator to define where images and other media source is stored, and what media reader that Storefront Integration Framework shall use to copy the media into Episerver Asset Management. The attribute is not used for modules by the integration framework. |
name |
Unique name of the module. Four names are pre-defined in the default implementation of Storefront Integration Framework:
|
storeId |
The Operating Unit Number as defined by the Retail Online Channel in Dynamics 365 for Finance and Operations. The attribute defines what channel the module is reading and writing information for. |
Sample configuration file
The sample configuration of modules below defines a solution where the product catalog is created in Dynamics 365 for Finance and Operations, imported into InRiver PMC to be enriched and then written back to the Storefront Integration Framework Staging database before it’s imported into Episerver.
Note that the PmcImport-module uses the ax-group since it reads information from Dynamics 365 for Finance and Operations. The PmcStaging-module then writes the enriched information into group “pmc” that the Catalog-module uses to read enriched information and write it into Episerver.
- Staging – The Storefront Staging job.
- PmcImport – The Storefront InRiver PMC Import job.
- PmcStaging – The Storefront InRiver PMC Export job.
- Catalog. The Storefront Catalog Import job.
<storefront>
<modules>
<add group="ax" name="Staging">
<channels>
<add storeId="102">
<languages>
<add name="en-US"/>
</languages>
</add>
</channels>
</add>
<add group="ax" name="PmcImport">
<channels>
<add storeId="102">
<languages>
<add name="en-US"/>
</languages>
</add>
</channels>
</add>
<add group="pmc" name="PmcStaging">
<channels>
<add storeId="102">
<languages>
<add name="en-US"/>
</languages>
</add>
</channels>
</add>
<add group="pmc" name="Catalog">
<channels>
<add storeId="102">
<languages>
<add name="en-US"/>
</languages>
</add>
</channels>
</add>
</modules>
...
</storefront>
In a solution only using Dynamics 365 for Finance and Operations and Episerver, the Pmc-modules are removed from the configuration file and the group “ax” is used.
<storefront>
<modules>
<add group="ax" name="Staging">
<channels>
<add storeId="102">
<languages>
<add name="en-US"/>
</languages>
</add>
</channels>
</add>
<add group="ax" name="Catalog">
<channels>
<add storeId="102">
<languages>
<add name="en-US"/>
</languages>
</add>
</channels>
</add>
</modules>
...
</storefront>
Media Downloaders
Media downloaders are used by the Storefront Integration Framework to download media for images, movies and similar. The Storefront Integration Framework reads the media using the downloader and writes the media into Episerver Asset Management to be used by the web editor in the CMS editor.
There are two types of media downloaders in the default implementation of Storefront Integration Framework:
- File System Media Downloader. Reads media from a file system.
- HTTP Media Downloader. Reads media from an https-service, such as the Dynamics Media Server.
The Storefront Integration Framework uses a media downloader based on the path or URL used for the media as read from the staging database JSON-document. The path or URL may be absolute or relative. If the type cannot be determined based on the resource name, the Storefront Integration Framework tries with all media downloaders until successful or out of options. This is a very time-consuming scenario that should be avoided by using media that describes the type.
Attribute |
Description |
mediaPath |
The attribute is used to define the base address where images and media source is stored. The Storefront Integration Framework adds the media JSON-resource to the media path to copy into Episerver Asset Management. |
name |
Unique name of the media downloader. Using multiple downloaders requires a unique name of each downloader. |
storeId |
The Operating Unit Number as defined by the Retail Online Channel in Dynamics 365 for Finance and Operations. The attribute defines what channel the media downloader is reading and writing information for. |
Sample configuration file
The following sample configuration is used to configure a file media downloader and a http media downloader for two retail online channels in a multi-channel setup.
<fileSystemMediaDownloader>
<add name="FileSystemMediaDownloader_068" mediaPath="C:\Contoso" storeId="068" />
<add name="FileSystemMediaDownloader_077" mediaPath="C:\Contoso" storeId="077" />
</fileSystemMediaDownloader>
<httpMediaDownloader>
<add name="Http_068" baseUrl="https://...ret.cloudax.dynamics.com/MediaServer" storeId="068" />
<add name="Http_077" baseUrl="https://...ret.cloudax.dynamics.com/MediaServer" storeId="077" />
</httpMediaDownloader>
Loggers
Loggers define the logging of Storefront Integration Framework.
There are two logs active in the Storefront Integration Framework that must be configured in the configuration file. Any additional loggers may be added by a partner.
- ProfilingReport. The log that is displayed in Episerver CMS Admin interface when one of the Storefront jobs are completed.
- Progress. The progress log is used during the process of the Catalog Import job. The log describes the progress of the job.
Attribute |
Description |
filePath |
A full file path describing where log files shall be created by the Storefront Integration Framework. |
level |
Used by the administrator to define the level of logging. Values depends on the logging framework used. The default implementation of the Storefront Integration Framework uses Log4Net. · ALL · DEBUG · INFO · WARN · ERROR · FATAL · OFF |
rollingMode |
Used for logging configuration where log files are rolling between time periods to create one log file per day, or similar period. Periods supported by Log4Net are. · Once · Size · Date · Composite |
Sample configuration file
<storefront>
…
<loggers>
<add filePath="App_Data\StorefrontReportLog.log" level="info" name="ProfilingReport"
rollingMode="date"/>
<add filePath="App_Data\StorefrontProgressLog.log" level="info" name="Progress"
rollingMode="date"/>
</loggers>
…
</storefront>
File System Storage
File system storage defines a path to a folder where images are temporary stored during the asset import step of the Storefront Catalog Import job.
Attribute |
Description |
temporaryFilePath |
A full file path describing the folder where images are stored during the import process. |
Sample Configuration File
<storefront>
…
<fileSystemStorage temporaryFilePath="C:\temp\media"/>
…
</storefront>
Pipeline Settings
Defines the page size to use during reading operations. A small page requires more calls to Dynamics 365 for Finance and Operations and a large page size requires long read operations.
Attribute |
Description |
pagingSize |
The paging size as an integer value higher than zero. |
Sample Configuration File
<storefront>
…
<pipelineSettings pagingSize="100"/>
…
</storefront>
Database Staging
The configuration defines the database used for staging, and how to connect to it.
Attribute |
Description |
commandTimeout |
Time in milliseconds before a call is timed out. |
connectionString |
The connection string to the Microsoft SQL Server, or Azure SQL Service, that is hosting the staging database. |
readingChunkSize |
The page size of the chunks read from the data source. |
stagingWritingChunkSize |
The size of the page written to the staging database. |
Sample Configuration File
<storefront>
…
<databaseStaging commandTimeout="100"
connectionString="Data Source=localhost;Initial Catalog=Avensia.Storefront.Starter.Staging.Uca2;Integrated Security=False;User ID=StorefrontStarterUca2;Password=Store#front2019;Connect Timeout=10"
readingChunkSize="100" stagingWritingChunkSize="1000"/>
…
</storefront>
Retail Server
The configuration defines what instance of Dynamics Retail Server that is used by Storefront Integration Framework.
Attribute |
Description |
authority |
The B2C authority used for authentication of the Storefront Integration Framework. |
clientId |
The unique identification of the Azure Enterprise App used for service-to-service trust between Storefront Integration Framework and retail server. |
clientSecret |
The secret defined by Azure Active Directory B2C when the enterprise app is created. |
categoriesPageSize |
The page size used when reading categories from the retail server. |
productListingPageSize |
The page size used by Storefront Integration Framework for products read from Dynamics 365 for Finance and Operations. |
deletedListingsPageSize |
The page size used by Storefront Integration Framework for deleted events read from Dynamics 365 for Finance and Operations. |
retailServerUri |
The full URI to the Dynamics Retail Server that is used by Storefront Integration Framework. |
Sample Configuration File
<storefront>
…
<retailServer authority="https://sts.windows.net/.../"
clientId=".…-….-….-….-…." clientSecret="…"
categoriesPageSize="1000"
deletedListingsPageSize="1000"
productListingPageSize="1000"
retailServerUri="https://...ret.cloudax.dynamics.com/Commerce"/>
…
</storefront>
Appsettings.config File
The configuration file is used by the Storefront Integration Framework and the Storefront 365 Starter Site with its extensions. The root element <appSettings> contains one or more add-elements where attributes describe the configuration created as a key-value-pair. The key value must be unique through the configuration file.
Multi-site Configuration
In a multi-site solution, there are configurations that are specific for each channel. The appsettings-file uses prefixes for channel specific configuration. Any configuration that is channel specific shall have a prefix of the Operating Unit Number for the retail channel. All configurations without prefix are used for all channels.
The following example configures the service account used with Stripe for two channels. The channel with operating unit number 077 uses account id 002. All other sites share the account id 0001.
<appSettings>
…
<add key="Payment.PayPal.ServiceAccountId" value="….-….-….-….-001" />
<add key="[077].Payment.PayPal.ServiceAccountId" value="….-….-….-002" />
…
</appSettings>
Episerver configuration
The configuration of Episerver components is managed with the following attributes. For detailed information about Episerver configuration, please visit Episerver Developer Community.
Key |
Description |
CommerceManagerApplicationName |
The name of the Episerver Commerce Manager Application Pool Name as defined in Internet Information Services. |
CommerceManagerLink |
The URL to the Episerver Commerce Manager start page. |
ProductListPageType |
The Episerver Commerce Manager product list page type. |
ProductDetailPageType |
The Episerver Commerce Manager product details page type. |
UseLegacyAssetSystem |
Episerver uses the Episerver asset system by default. To enable the legacy asset management system, set the configuration setting to true. |
LibraryHandlerExtension |
Defines the file extension used for asset management resource loaders. |
Mediachase.StoreEmail |
Defines the store (sender) of e-mail notifications. |
ClientValidationEnabled |
Configures client-side validation for form editing. |
UnobtrusiveJavaScriptEnabled |
Configures client-side validation for form editing. |
PasswordResetValidMinutes |
Determines how many seconds a password reset of Episerver is valid. |
Images_Location |
|
aspnet:UseTaskFriendlySynchronizationContext |
Use ASP.NET 4.5 for asynchronous operations. |
ValidationSettings:UnobtrusiveValidationMode |
Enables Unobtrusive Validation Mode in ASP.NET 4.5 |
Microsoft.ServiceBus.ConnectionString |
Connection string to Microsoft Azure Service Bus used by Episerver Digital Experience Cloud Service. |
episerver:findcommerce.IgnoreWebExceptionOnInitialization |
Improved error handling when Episerver Find is unavailable at initialization. |
episerver:FindIndexCatalogContent |
Enables or disables Episerver Find to index catalog content. |
episerver:FindListenOnCommerceRemoteEvents |
Enables or disables Episerver Find to listen to commerce events. |
episerver:tracking.Enabled |
Enables or disables tracking for Episerver Profile Store. |
episerver:tracking.IgnoreDNT |
Enables or disables tracking for Episerver Profile Store. |
episerver:personalization.BaseApiUrl |
The URL of the Episerver Perform service to use. |
episerver:personalization.Site |
The site name used to identify requests to the tracking server. |
episerver:personalization.ClientToken |
The token used to authenticate tracking requests to the REST API. |
episerver:personalization.AdminToken |
The token used to authenticate admin requests to the REST API. |
episerver:personalization.RequestTimeout |
Timeout for the REST calls. The default value is 30 seconds. |
episerver:personalization.TrackingMode |
The tracking mode to use. Acceptable values are ServerSide and ClientSide. |
episerver:personalization.CatalogFeedBatchSize |
The number of products processed in one batch when the product feed is generated. A higher value can be faster but puts more pressure on the memory. The default value for the Storefront Integration Framework is 100. |
episerver:personalization.CatalogNameForFeed |
Select the catalog used to generate the product feed if you have multiple catalogs. If this value is not set, the first catalog is used. |
Technical Resources
Azure Configuration
The Azure configuration defines the usage of Azure resources and the authentication using Azure Active Directory B2C.
Key |
Description |
Azure.ApplicationInsights.InstrumentationKey |
Identifies the Insights resource used by the sites. |
Azure.ApplicationInsights.Enabled |
Sets the Insights logging, and tracing enabled or disabled. The instrumentation key is used in a site if the instrumentation is enabled. |
Azure.AD.B2C.Tenant |
The name of the Azure Active Directory B2C tenant in the format <myB2Ctenant\>.b2clogin.com. |
Azure.AD.B2C.Host |
Name of the host of the tenant used for authentication. |
Azure.AD.B2C.Policy |
The name of the Resource Owner Policy (ROPC) policy created with the B2C Native client. |
Azure.AD.B2C.ClientId |
The Azure Active Directory B2C application ID. |
Azure.AD.B2C.ServiceUriPattern |
A string format describing how the B2C authority is called. The place holder is replaced by Storefront Integration Framework with the host name and then tenant name. |
Azure.AD.GraphAPI.ClientId |
The Azure AD Graph API application ID. |
Azure.AD.GraphAPI.ClientSecret |
The secret rendered by Azure when creating the Azure AD Graph API application. |
Azure.AD.GraphAPI.AuthorityUriPattern |
A string format describing how the GraphAPI authority is called. The place holder is replaced by Storefront Integration Framework with the tenant name. |
Azure.AD.GraphAPI.ServiceUriPattern |
A string format used by Storefront Integration Framework to create a service URI to use. Place holders are replaced with the tenant name and parameters in a call. |
Azure.AD.GraphAPI.PasswordResetTokenAttribute |
The name of the user AD profile attribute used to store password reset token. |
Technical References
- https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant
- https://docs.microsoft.com/en-us/azure/active-directory-b2c/configure-ropc
- https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet
- https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/quickstart-configure-named-locations
- https://docs.microsoft.com/en-us/azure/active-directory-b2c/active-directory-b2c-devquickstarts-graph-dotnet#use-custom-attributes
Sample Configuration File
<appSettings>
…
<add key=”Azure.ApplicationInsights.InstrumentationKey” value=”dc8-….-….-….-……” />
<add key=”Azure.ApplicationInsights.Enabled” value=”false” />
<add key=”Azure.AD.B2C.Tenant” value=”xxxxx.onmicrosoft.com” />
<add key=”Azure.AD.B2C.Host” value=”xxxx.b2clogin.com” />
<add key=”Azure.AD.B2C.Policy” value=”NAME_OF_Policy” />
<add key=”Azure.AD.B2C.ClientId” value=”…..-….-….-….-……….” />
<add key=”Azure.AD.B2C.ServiceUriPattern” value=”https://{0}/{1}/oauth2/v2.0/token?p={2}” />
<add key=”Azure.AD.GraphAPI.ClientId” value=”……-….-….-….-…….” />
<add key=”Azure.AD.GraphAPI.ClientSecret” value=”……..” />
<add key=”Azure.AD.GraphAPI.AuthorityUriPattern”
value=”https://login.microsoftonline.com/{0}/oauth2/token” />
<add key=”Azure.AD.GraphAPI.ServiceUriPattern”
value=”https://graph.windows.net/{0}/users/{1}?api-version=1.6” />
<add key=”Azure.AD.GraphAPI.PasswordResetTokenAttribute”
value=”extension_xxxxxx_PasswordResetToken” />…
</appSettings>
Payment
Payment configuration in Storefront 365 defines how the Dynamics Payment connectors are used with their Payment Service Providers. The default implementation of Storefront 365 includes payment connectors for Stripe and PayPal. Payment using Dynamics 365 for Finance and Operations loyalty card and the gift card is mastered from Dynamics 365 for Finance and Operations but still, have some configuration for the Storefront 365 Starter Site.
Key |
Description |
Payment.Stripe.Active |
Enables or disables the Stripe payment connector on the web site, even though it is assigned to the retail online channel. |
Payment.Stripe.PublishableKey |
The key assigned to the account by Stripe. |
Payment.Stripe.TenderTypeId |
The identifier of the payment method defined in Dynamics 365 for Finance and Operations for the retail online channel that corresponds to the Stripe payment. |
Payment.Stripe.ServiceAccountId |
The service account ID assigned to the company by Stripe. |
Payment.LoyaltyCard.Active |
Enables or disables loyalty payment on the web site, even though it is assigned to the retail online channel. |
Payment.LoyaltyCard.TenderTypeId |
The identifier of the payment method defined in Dynamics 365 for Finance and Operations for the retail online channel that corresponds to the loyalty payment method. |
Payment.GiftCard.Active |
Enables or disables Dynamics 365 for Finance and Operations gift card payment on the web site, even though it is assigned to the retail online channel. |
Payment.GiftCard.TenderTypeId |
The identifier of the payment method defined in Dynamics 365 for Finance and Operations for the retail online channel that corresponds to the gift card payment method. |
Dynamics 365 for Finance and Operations Settings
There is a configuration of the Storefront Integration Framework and the Storefront 365 Starter Site where Dynamics specific information is defined. The information is not available to receive from the Dynamics Retail Server and has to be configured using the configuration file.
Key |
Description |
D365.PriceGroup |
Defines a Dynamics 365 for Finance and Operations price group that is shared between the retail online channel and all discounts that shall be visible on the product card on the web site. |
D365.OperatingUnitNumber |
The operating unit number that is assigned to the retail online channel. |
D365.RetailServerRoot |
The URL to Dynamics Retail Server that is used as a base URL in calls to the service. The URL shall be entered with the commerce folder. https://…ret.cloudax.dynamics.com/Commerce |
D365.Locale |
The language setting used in the retail online channel. Storefront Integration Framework uses the settings in the staging process reading product properties. It is also used in the calls to Dynamics Retail Server. |
D365.DefaultShippingAddress |
A JSON string defining the default shipping address that is used by Storefront 365 Starter Site as default values on the checkout page. The JSON string is entered with fields for Country, State, ZipCode and City. {Country:'USA', State:'CA', ZipCode: '90001', City: 'Los Angeles'} |
365.CustomerLink.SendEmailFromSite |
If true, then an order confirmation mail is sent by the web site to the customer. If false, no mail is sent. |
D365.CustomerLink.D365EmailTemplateId |
The email template id used by Dynamics 365 for Finance and Operations for customer link initiation. If no customer link email is to be sent from Dynamics 365 for Finance and Operations, set this to a value not corresponding any mail template. If the value is empty Dynamics 365 for Finance and Operations will throw an exception. |
D365.StorePickupDeliveryModeId |
The ID of the delivery method in Dynamics 365 for Finance and Operations that is a pick-up-in-store delivery method. |
D365.ReturnOrder.AddressRecId |
The RECID of the address that is used when a return order is created. The address must exist in Dynamics 365 for Finance and Operations where the open return order is created. The address defines the delivery address that the customer shall use when returning the items. |
D365.CustomerAttribute.CustomerNotes D365.CustomerAttribute.HouseholdSize D365.CustomerAttribute.MarketingOptIn |
Three pre-defined Customer Attributes that are included on the My Page/Profile page. The configuration records define the attribute names as defined in Dynamics 365 for Finance and Operations. |
D365.CustomerAttribute.CustomerNotesRecordId D365.CustomerAttribute.HouseholdSizeRecordId D365.CustomerAttribute.MarketingOptIRecordId |
The RECID of the three customer attributes used on the My page/Profile page. The RECID references the customer attribute records. |
D365.Wishlist.DefaultName |
The name to use when a wish list is created for a logged in customer. The name is also displayed in POS when the customer is fetched. |
Mail Settings
If the record 365.CustomerLink.SendEmailFromSite is true, mail is sent from the web site when a sales transaction has been created and the conformation web page is displayed.
Key |
Description |
Mail.Host.Ur |
URL to the SMTP mailing host used for mail. |
Mail.Host.Port |
Port number to use with the URL. |
Mail.Host.EnableSsl |
True if SSL is used in the call. |
Mail.Host.Username |
Username to use with the mail service to send a mail. |
Mail.Host.Password |
The password to use with the mail service username. |
Mail.From |
The mail address to use as the sender mail address. |
Various Settings
There is configuration not categorized into the above chapters.
Key |
Description |
Swagger.EnableUI |
If true then there is a swagger UI page rendered to use with Microsoft Flow. The swagger page is available using the URL Fel! Ogiltig hyperlänkreferens.. There are three endpoints available in the default implementation of Storefront 365 Starter Site: · Bot · CustomerLink · WebHookRegistration |
FlowAPI.Username FlowAPI.Password |
Username and password that is used when calling a MS Flow endpoint. |
PriceCache.CacheExpirationInMinutes |
The time in minutes when a price cache is invalidated and will be refreshed. |
PriceCache.UseCacheForAuthenticatedCustomers |
If true then the price cache is used for logged in customers. If false, or if the visitor is anonymous, price is fetched from Dynamics Retail Server. |
aspnet:MaxJsonDeserializerMembers |
The maximum number of JSON members. Microsoft security bulletin MS11-100 states that ASP.NET will accept max 1,000 members to address the Denial of Service vulnerability. |
OfflineMode.EnableAlways |
If true then the off-line-mode is active. If Dynamics 365 for Finance and Operations or Dynamics AX 2012 R3 connection is broken, the site will still be working in offline mode. |
OfflineMode.EnableWhenRetailServerDown |
If true then the offline mode is activated the first time Dynamics 365 for Finance and Operations or Dynamics AX 2012 R3 connection is broken. |
OfflineMode.RetriesBeforeGoingOffline |
The number of retries made before the site enters offline mode. Only used if the EnableWhenRetailServerDown is true. |
OfflineMode.RetryConnectionAfterMinutes |
The time in minutes before a retry to connect is made. |
Setup.Episerver.Languages |
Sets the languages to use in the CMS base migration used by Storefront 365 Migration Tool in Storefront Integration Framework. |
Setup.Episerver.SiteUrl |
The URL used for first migration when a Storefront 365 Starter Site is executed for the first time. |
Technical Resources
ConnectionStrings.config File
The file is used by Episerver to access its Microsoft SQL databases used for CMS and Commerce content. The configuration file is a XML file with elements and attributes.
Attribute |
Description |
name |
The name of the connection string. There are two mandatory connections that must be configured in the file. · EPiServerDB. The connection string to the Episerver CMS database used. · EcfSqlConnection. The connection string used by the Episerver Commerce Manager. |
connectionString |
The Microsoft SQL connection string. |
Sample Configuration File
<connectionStrings>
<clear />
<add name="EPiServerDB" connectionString="Data Source=.;Initial Catalog=Avensia.Storefront.Starter.Cms;Integrated Security=False;User ID=…;Password=xxx;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
<add name="EcfSqlConnection" connectionString="Data Source=.;Initial Catalog=Avensia.Storefront.Starter.Manager;Integrated Security=False;User ID=…;Password=xxx;Connect Timeout=10;Application Name=ECApplication" providerName="System.Data.SqlClient" />
</connectionStrings>
Storefront PMC Configuration File
The configuration file is used when InRiver PMC is part of the solution. The XML file uses two elements with attributes. The PMC configuration can be setup in a separate config-file, which then needs to be referenced in the web.config file:
<configSections>
...
<section name="storefront.pmc"
type="Avensia.Storefront.Connector.InriverPmc.Configuration.PmcConfigurationSection, Avensia.Storefront.Connector.InriverPmc.Configuration, Version=1.0.0, Culture=neutral" />
...
</configSections>
<storefront.pmc configSource="<filename.config>" />
Attribute |
Description |
XML-element outbound |
|
username |
The username that Storefront Integration Framework uses to access InRiver PMC. Defined in InRiver PMC. |
password |
The password that Storefront Integration Framework uses to access InRiver PMC. Defined in InRiver PMC. |
url |
The URL to the InRiver PMC service instance. |
environment |
The name of the existing environment in the InRiver PMC service to use. |
XML-element inbound |
|
enablePop |
Specifies whether data read from InRiver PMC should be considered consumed after staging it. Should be set to true in a production environment but can be set to false during development to be able to repeat staging with the same source data multiple times. |
apikey |
API Key defined by InRiver PMC used in calls to the service. |
endpoint |
URL to the Storefront 365 InRiver PMC Inbound API used by the Storefront Integration Framework. https://partner.inbound.productmarketingcloud.com/api/inbounddata/avensiastorefront/sandbox1/InboundAPI |
httpClientBatchSize |
The maximum number of entities to fetch from PMC on each request. |
channelNodeEntityTypeId |
The InRiver PMC entity type id for a channel node. |
productRecordIdField |
The InRiver PMC field name for a product unique record id. |
itemRecordIdField |
The InRiver PMC field name for a variation unique record id. |
resourceFilenameField |
The InRiver PMC field name for a resource filename. |
productKitLinkEntityTypeId |
The InRiver PMC link entity type id for product kits. |
productKitLinkTypeIds |
The InRiver PMC link type ids for links from product kits. |
productKitGroupEntityTypeId |
The InRiver PMC field name for a product kit group name. |
productKitUniqueIdEntityTypeId |
The InRiver PMC field name for a product kit unique record id. |
productRelationLinkTypeIds |
A comma-separated list of InRiver PMC link type ids for product relations. |
Sample Configuration File
<storefront.pmc>
<outbound username="xxx@gmail.com" password="…"
url="https://.... productmarketingcloud.com/" environment="sandbox1" />
<inbound enablePop="true" apikey="j4x2eYYf7SFjxXCA"
endpoint="https://.../api/inbounddata/avensiastorefront/sandbox1/InboundAPI"
httpClientBatchSize="10000" channelEntityTypeId="Channel"
channelNodeEntityTypeId="ChannelNode" productEntityTypeId="Product"
productRecordIdField="ProductUniqueId" itemEntityTypeId="Item"
itemRecordIdField="ItemUniqueId" resourceEntityTypeId="Resource"
resourceFilenameField="ResourceFilename" productKitEntityTypeId="ProductKit"
productKitLinkEntityTypeId="ProductKitGroup"
productKitLinkTypeIds="ProductKitProduct,ProductKitItem"
productKitGroupEntityTypeId="ProductKitGroupGroupName"
productKitUniqueIdEntityTypeId="ProductKitUniqueId"
productRelationLinkTypeIds="RelatedProduct" />
</storefront.pmc>
ImageResizer.config File
The starter site uses the free (Essential edition) of [ImageResizer] and some basic plugins. The resizer is included as a NuGet-package in the starter site and configured using the imageresizer.config-file. The configuration file is an XML-file.
Attribute |
Description |
pipeline |
|
fakeExtensions |
Unless you (a) use Integrated mode, or (b) map all requests to ASP.NET, you'll need to add .ashx to your image URLs. |
diagnostics |
|
enableFor |
Enables diagnostics for a given host. Use an URL like http://site.url/resizer.debug.ashx. |
clientcache |
|
minutes |
The time that the image should be cached in the client browser. |
plugins |
|
name |
Plugins used by ImgaeResizing. The default plugins used by Storefront 365 Starter Site are: · Presets · ClientCache · MvcRoutingShim · Avensia.Storefront.Starter.Infrastructure.ImageResizer.BlobReaderPlugin The Avensia plugin is available as source code in the Storefront 365 Starter Site. |
presets |
|
onlyAllowPresets |
True if only presets are allowed to be used by the site. |
name |
Name of a preset. |
settings |
The settings of a preset. |
Sample Configuration File
<?xml version="1.0" encoding="utf-8"?>
<resizer>
<pipeline fakeExtensions=".ashx" />
<diagnostics enableFor="localhost" />
<clientcache minutes="1440" />
<plugins>
<add name="Presets" />
<add name="ClientCache" />
<add name="MvcRoutingShim" />
<add name="Avensia.Storefront.Starter.Infrastructure.ImageResizer.BlobReaderPlugin" />
</plugins>
<presets onlyAllowPresets="false">
<!-- PRODUCT IMAGES -->
<preset name="pL" settings="width=680;height=680" />
<preset name="pM" settings="width=420;height=420" />
<preset name="pS" settings="width=180;height=180" />
<preset name="pXS" settings="width=100;height=100" />
</presets>
</resizer>
Technical Resources