Author: Vikas chauhan

Sitecore Boxever CDP Series -1

As you all know Sitecore acquire the Boxever CDP. Sitecore Boxever is a Customer Data Platform (CDP) which collects the data from any system or channels (Web,Mobile APP and Kiosk and POS). Sitecore CDP is having the capability of Data Management, A/B testing, Decisioning and Personalization.

Sitecore provide the Sandbox environment. Now question is how we will get the access. So to get the access, please complete the Sitecore CDP training from Sitecore eLearning portal. (https://learning.sitecore.com/pathway/boxever-training). After completion of this training you will get the completion certification.

Now send the mail to this email id “PartnerEnablement@sitecore.com” with your attached certification to get the access on Boxever sandbox environment.

In a week’s time, you will probably have a access to the Sitecore CDP “https://app.boxever.com/” sandbox environment . After logging in to this portal, we can access the portal and view the dashboard given below.

Sitecore CDP provides the following features /functionalities.

  • Data Collection
  • Personalization
  • A/B Testing
  • Decisioning

In this article we will cover where this CDP product fit in the Sitecore landscape and JavaScript based integration of CDP with Web Channel. In the next article we will cover the all the touchpoints of data collection and provide the integration sample code.

Sitecore Content Hub/Ordercloud/ Experience Manager Integration Diagram.

Sitecore CDP provide following way to integrate the CDP system with all channel to collect the data.

  • JavaScript Library : t is a lightweight JavaScript library that interacts with target channels to collect data and provides multiple JavaScript functions with multiple touch points to collect data, which we will introduce in the next article.
  • Integration with Google Tag Manager
  • Stream API
  • Rest API
  • Batch API

Lets start with JavaScript Library integration to capture the Website data. Please follow the following Steps to make the connection between website channel and CDP.

  1. To capture the visitor behavior data from site and pushed to Sitecore CDP , we need to paste a small JavaScript code into our site’s pages. We have to paste this code in head section of page (as example Sitecore website -Layout and Angular site index.html).
  2. To run this code we required the client_key which we will get from Sandbox environment (please see the screen shot below)
CDP JavaScript code 
Collect CDP Client Key

How it work you will find the details CDP documentation. Please find the dataflow diagram.

Reference Documents:

Sitecore CDP documentation url’s are given below.

Overview (boxever.com)

https://developer.boxever.com/

https://doc.sitecore.com/cdp

Note: In next part will cover the the integration of CDP with multiple channel for data collection.

Please connect if you have any query or issue:

Email: chauhan.vikas@rediffmail.com

Linkedin:https://www.linkedin.com/in/vikas-chauhan-72694917/

Sitecore OrderCloud Commerce Headstart – Part 1

Sitecore OrderCloud Commerce Headstart Setup

As we know Sitecore Acquire the Four51 Ordercloud Headless Commerce to fulfilled the B2B space of Sitecore experience commerce. OrderCloud is an API First Headless truly Cloud Native B2B eCommerce Platform. To get more detail please go through the OrderCloud documentation https://ordercloud.io/discover/platform-overview.

Sitecore Ordercloud provide the JavaScript /.Net SDK to built the custom storefront as per our requirement. Sitecore Ordercloud also providing the Headstart ecommerce solution (storefront and Admin websites) which is built in Angular & .NET Core and backend as OrderCloud API .

Architecture and Component detail you can find here.

In this article we will cover , How we will setup the Ordercloud Headstart Demo.

Step 1. Register to https://portal.ordercloud.io/register

Step 2. Create the new Market place on Ordercloud to enable your ecommerce solution

No alt text provided for this image
No alt text provided for this image

Step 3 Now download/checkout the Headstart ecommerce solution code from here

Headstart ecommerce Solution is have three application as given below.

  1. Middleware – The backend written in ASP.NET Core. Extends and enhances the capabilities of OrderCloud by integrating with best-of-breed services.
  2. Buyer – The frontend buyer application written in Angular. This includes the entire shopping experience from the perspective of a buyer user.
  3. Seller – The frontend admin application written in Angular. This includes everything needed to manage the data in your buyer application(s).

Headstart Repo has given the enough information to setup the solution you can find the details here . I want to share our knowledge to setup the solution which may be help you.

We have deployed the Buyer/Seller and Middleware on Azure VDI not on Azure Azure PaaS but It is up to you where you want to host the solution. Lets start the setup the code.

Middleware / Buyer and Seller Application setup

Post Code checkout first we have to setup the middleware .NetCore application.

Step 1. Build the Solution and publish to IIS configured application and configure the application hostname and it will start working. Now we have to configure some parameter in Json configuration file . We have to fill all the required parameter as per definition given here .

You will find the “AppSettingConfigTemplate.json” sample template under root directory. change the file name to “appSettings.json” in application root folder.

. Please find the prefilled configuration file screen shot.

No alt text provided for this image

Please create account storage and enable cosmos DB app service on AZURE. Fill the parameter accordingly.

Step 2 To connect the Middleware application with Ordercloud, we have to configure the Middleware client Id and ClientSecret parameter value. To get these value we have to call the Middleware Seed API using postman. T

Here are the detail given to configure the seed API request parameter . In postman you have to call your Seed Api with this url : {http:// Hostname/seed}

In body section set the following parameters. .

{  "PortalUsername": "User name use for Ordercloud portal"

  "PortalPassword": "password use for Ordercloud portal ",

  "InitialAdminUsername": "admin",

  "InitialAdminPassword": "Admin@2021",

  "MiddlewareBaseUrl": "Replace with Middleware host name",

  "SellerOrgID" : "Use Marketplace Unique Identifier value",

  "SellerOrgName" : "Market place name",

  "OrderCloudSettings": {

    "Environment": "sandbox",

    "WebhookHashKey": "Password@123"

  },  "BlobSettings" : {

    "ConnectionString" : " use Azure account storage key",

    "ContainerNameTranslations" : "ngx-translate"  }},
No alt text provided for this image

Now login to the portal and click on market place, after executing this Seed API following are are the section are updated/added with the items in OrderCloud commerce portal

  1. Security profile
  2. Clients API Keys
  3. Default catalog
  4. Default buyer
  5. Buyer Address

Now copy the Middleware client id and secret key from Ordercloud portal and added to Middleware appconfig file.

No alt text provided for this image
No alt text provided for this image

Now your Middleware application is up and running and default Buyer/catalog has been created. Now we have to setup the Seller admin first and then Buyer.

To Setup the Seller and Buyer Angular app please follow the Headstart guideline. I will only share what parameter we need to configure to connect the Middleware and Ordercloud.

Seller App

Step 1 Open Seller app code root directory and navigate to this file “\src\UI\Seller\src\assets\appConfigs\defaultadmin-test.ts” and fill these parameters which marked as bold.

 "hostedApp": false,

 "sellerID": "Market place unique identifier",

 "sellerName": "Default Admin",

 "appname": "Default Admin",

 "clientID": " check API client section on Ordercloud and select the keys of Default HeadStart Admin UI",

 "middlewareUrl": "Your Middleware url",

  "cmsUrl": "https://ordercloud-cms-test.azurewebsites.net",

 "translateBlobUrl": "https://localheadstartstorage.blob.core.windows.net/ngx-translate/i18n/",

 "blobStorageUrl": "https://localheadstartstorage.blob.core.windows.net",

 "orderCloudApiUrl": "https://sandboxapi.ordercloud.io"}{

Step 2 Open Seller app code root directory and navigate to this file “src\UI\Seller\src\environments\environment.local.ts.” and fill this parameter which marked as bold

  • Add your middleware application url to parameter “localMiddlewareURL

Buyer App

Step 1 Open Buyer app code root directory and navigate to this file “\src\UI\Buyer\src\assets\appConfigs\defaultadmin-test.ts” and fill these parameters which marked as bold. 

  "hostedApp": false,
  "appname": "Replace with App name",
  "appID": "Add app id",
  "clientID": "check API client section on Ordercloud and select the keys of Default Buyer Storefront",
  "incrementorPrefix": "HS_TEST",
  "baseUrl": "",
  "middlewareUrl": "Replace with Middleware url",
  "cmsUrl": "https://ordercloud-cms-test.azurewebsites.net",
  "creditCardIframeUrl": "https://fts-uat.cardconnect.com/itoke/ajax-tokenizer.html",
  "translateBlobUrl": "https://localheadstartstorage.blob.core.windows.net/ngx-translate/i18n/",
  "sellerID": "Seller unique Identifier",
  "sellerName": "Replace with Market place anme",
  "orderCloudApiUrl": "https://sandboxapi.ordercloud.io",
  "theme": { "logoSrc": "Set logo imgae of storefront portal" },
  "instrumentationKey": null
}{

Step 2 Open Seller app code root directory and navigate to this file “src\UI\Buyer\src\environments\environment.local.ts.” and fill these parameter which marked as bold

  • Add your middleware application url to parameter “localMiddlewareURL

Finally follow all the above steps Headstart apps will up and running but to run storefront we needs to setup products and other features like Avalara – for tax calculation. I will try to cover these topics in next post. Please share your feedback if I have missing something

Acknowledgment

I want to thanks my Team Vidhi and Bhaskar who help me setup and explore the Order cloud ecommerce. Also want to thanks to Himadri to publish the descriptive article on Ordercloud and it was very helpful for me, when I have started the Ordercloud setup.

References

  • Find documents here
  • Headstart Repo here
Sitecore XP and XC Un-install Tip

Sitecore XP and XC Un-install Tip

In this blogs we will get the information how to uninstall the existing Sitecore XP and Commerce instance.

# How to uninstall the Sitecore Commerce or Sitecore XP.

Sitecore Commerce

To uninstall the Sitecore Commerce we have to change this below line in “Deploy-Sitecore-Commerce.ps1” .

Change the Install-SitecoreConfiguration cmdlet to Uninstall-SitecoreConfiguration. For example,
Change: Install-SitecoreConfiguration @deployCommerceParams -Verbose *>&1 | Tee-Object
“$XCSIFInstallRoot\XC-Install.log
To:
Uninstall-SitecoreConfiguration @deployCommerceParams -Verbose *>&1 | Tee-Object
“$XCSIFInstallRoot\XC-Uninstall.log

Sitecore XP

To uninstall the Sitecore 9-10 we have to change only single line in Powershell script.

comment the installation line and uncomment the Uninstall line in XP0-SingleDeveloper file.

Sitecore 9.3 Commerce Installation Nuts and Bolts

I have got a chance to explore the Sitecore commerce 9.3 installation and configuration for one of our client demo. Sitecore has given the straight forward installation steps but some time we will face some issues. So we will discuss the steps of installation and details of issues with solution.


Step 1. Download the required software from Sitecore portal (https://dev.sitecore.net/)
• Sitecore 9.3 experience platform
• Sitecore Experience Accelerator (SXA) 9.3
• Sitecore PowerShell Extensions 6.0 for Sitecore 9.3
• Sitecore Experience commerce 9.3 initial version
• Sitecore_XC-9.3_Installation_Guide_for_On-Prem.pdf
Step 2. Install the all the Prerequisite before Sitecore 9.3 commerce installation start.
• NET Core 2.1.7 Windows Hosting module
• MSBuild Microsoft Visual Studio Web targets (available from Nuget)
• First install the Sitecore 9.3 experience platform using Sitecore UI based installer with Solr search.
Step 3 . Create Deploy folder in C drive and copied the SXA, PowerShell extension and unzip folder of Commerce installation package.

Copy the “Microsoft.Web.XmlTransform.dll” to deploy folder and unzip the “SIF.Sitecore.Commerce.3.0.28” folder marked as yellow in above screen shot.
Step 4 Expand the “SIF.Sitecore.Commerce.3.0.28” under “C:\deploy\SIF.Sitecore.Commerce.3.0.28” folder and open the sitecore commerce PowerShell installer file “Deploy-Sitecore-Commerce.ps1” .
Configure the following parameters
$MergeToolFullPath – This is the path to the location where you downloaded the Microsoft.Web.XmlTransform.dll file. Example $XCInstallRoot\Microsoft.Web.XmlTransform.dll.
$SiteNamePrefix – This parameter needs to match the prefix used in the Sitecore XP 9.3 base installation where Sitecore Commerce is going to be installed on.
$SiteName – This is the name of the already installed Sitecore XP 9.3 instance. Its default value was “$SiteNamePrefix.sc
$IdentityServerSiteName – Same as for the $SiteName parameter, the default value (“$SiteNamePrefix.IdentityServer”) of the name of the Identity Server application of the Sitecore instance .
$CommerceEngineConnectClientSecret – This parameter is the Commerce Engine Connect Client Secret for the Sitecore Identity Server, that you have generated in one of the prerequisites steps described in the Sitecore Commerce installation guide.
$SiteHostHeaderName – This parameter is the domain of the Storefront site. If you change it with a different domain, remember to update its value in the Hostname field of the Storefront SiteGrouping item (/sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront) after the installation is finished.
$XConnectInstallDir – This is the path to the xConnect application of your Sitecore instance..
$SitecoreDbServer – This is the name of SQL database server where the Sitecore XP databases are hosted. As its descriptive comment calls out, if you have a named instance, you will need to escape the back slash character (\).
$SqlUser && $SqlPass – These are the credentials for a sys admin user of the SQL database server where the Sitecore XP databases are installed.
$SearchIndexPrefix – This parameter is the prefix used in the search indexes of the Sitecore XP instance. Its default value is blank, but it should be “$SiteNamePrefix” instead.
$SolrUrl – This is the url of the Solr 8.1.1 instance.
$SolrRoot – This is the path where the solr application is installed.
• $SolrService – This is the name of the Solr service.
$CommerceServicesDbServer – This is the SQL database server where the commerce databases will be installed.
$CommerceServicesDbName – This is the name of the shared commerce database.
$CommerceServicesGlobalDbName – This is the name of the global commerce database
$CommerceServicesPostfix – This is the suffix that is added to the name of the commerce engine applications.
• $CommerceServicesHostPostfix – This is the suffix that is added to the hostname of the commerce engine applications in their IIS bindings.
$BizFxSiteName – This parameter is used on both the application name and the hostname for the Business Tools application.
$UserPassword – This parameter is the password used to create a local machine account user to run the commerce applications in IIS and to access the commerce databases.
$BraintreeMerchantId, $BraintreePublicKey, $BraintreePrivateKey, $BraintreeEnvironment – These parameters are needed if you are configuring the Braintree payment policy. Their values can be found in your Braintree sandbox account. The $BraintreeEnvironment should be set to sandbox value.
Run the deployment script “ .\My-Deploy-S”itecore-Commerce.ps1”


Solution to error occurred in Installation

  1. The remote server returned an error : (400) Bad Request – Identity Server token issue
    Solution: check the $IdentityServerSiteName parameter have correct Instance details.
  2. The MERGE statement attempted to UPDATE or DELETE the same row more than once
    Solution : Please remove all prior modules completed + Module-HabitatImages task itself from Install folder \SIF\Configuration\Commerce\Master_SingleServer.json and re-run installation script
  3. The remote server returned an error: (500) internal server error Solution: $SitecoreDbServer parameter value should use the double back slash and changed the ApplicationPoolIdentity built-in account for Ops commerce engine application on IIS.