HCL Commerce Version 9.1.4.0 or later

Integrating HCL Digital Experience with HCL Commerce

If you are integrating HCL Digital Experience and HCL Commerce, configurations are required when you install and deploy the applications for a functioning integrated solution.

Deploying Digital Experience

Follow the instructions in the HCL Digital Experience documentation to deploy the two HCL Digital Experience environments. For more information on deploying HCL Digital Experience, see Digital Experience on containerized platforms in the HCL Digital Experience documentation.

It is recommended to use the Digital Experience Helm Chart solution to deploy HCL Digital Experience. For more information on using this method, see details could be found here: Helm-based deployment in the Digital Experience documentation.

If you are using this method, then the following configurations are required in order to integrate Digital Experience with HCL Commerce:
  • Digital Experience should be accessed using the same domain name as HCL Commerce.
    To achieve this, in the networking section in the values.yaml configuration file of the DX Helm Chart:
    • For the auth DX environment, set the host of DX Core and the host of any other add-on applications must be set to the auth HCL Commerce React-based store host name.
    • Similarly, for the live DX environment, the host of DX Core and the host of other add-on applications must be set to the live HCL Commerce React-based store host name.
    Tip: You might notice that there is a section to set add-on applications host names. This can be kept to be empty and it will automatically use the same host name that is set for the DX Core.
  • OpenLDAP must be disabled. This can be done under applications section in the values.yaml configuration file of the DX Helm Chart.
  • From the Integration architecture overview, you can see that the DX auth and the DX live environments are sharing the same digital asset management from the live environment. When you deploy the DX live environment, set the values of corsOrigin of the contentComposer, designStudio, digitalAssetManagement, imageProcessor and ringApi to be https://AUTH_COMMERCE_REACT_STORE_HOST_NAME under the networking/addon section in the values.yaml configuration file of the DX Helm Chart.
Deprecated featureFor previous methods of integration with HCL Commerce, the following configurations in the dxctl properties file are required deploy HCL Digital Experience:
  • Set openldap.enabled to false when deploying both auth and live DX environments. This is required so that DX can be accessed using the same domain name as the HCL Commerce React-based store.
  • Ensure that the Host Override configurations are enabled in the properties file so that DX can be accessed using the same domain name as HCL Commerce. For the auth DX environment, set the value to the auth HCL Commerce React-based store hostname. For the live DX environment, set the value to the live HCL Commerce React-based store hostname.
    • dx.deploy.host.override: COMMERCE_REACT_STORE_HOST_NAME
    • dx.deploy.host.override.force: true
  • In the properties file for the live DX environment, set the CORS variable. This variable is not required for the auth DX environment. The value should be set to the domain name for the auth DX environment, which would be the same as that of the auth HCL Commerce React-based store. In order for DX to recognise the values, you must add either https or http at the beginning.
    • dx.config.cors: https://AUTH_COMMERCE_REACT_STORE_HOST_NAME
  • Patch the DX Digital Asset Management ConfigMap with the following parameter after the ConfigMap has been created:
    • dam.config.cors: https://AUTH_COMMERCE_REACT_STORE_HOST_NAME
      For example:
      kubectl patch cm dx-deployment-dam -n LIVE_DX_NAMESPACE --type merge -p "{\"data\":{\"dam.config.cors\":\"https://AUTH_COMMERCE_REACT_STORE_HOST_NAME \"}}"

Deploying HCL Commerce

See Deploying HCL Commerce on a Kubernetes cluster to deploy HCL Commerce.

Specific configurations are required for the integration between HCL Commerce and HCL Digital Experience within HCL Commerce:
  • Configure your HCL Commerce deployment Helm Chart, by modifying your custom values.yaml configuration file, to include the namespace information for both the auth and live DX environments.
  • In order to support different DX versions, include the routing service name for the auth and live DX environments within values.yaml.

    The DX routing service name can be HAProxy or Ambassador based on the specific DX version. You can obtain the service name with the kubectl get service command.

  • The HCL Commerce Transaction server must be configured with the DX hostname, DX port, and DX scheme in order to communicate with Digital Experience. This value should be the same as the COMMERCE_REACT_STORE_HOST_NAME. Ensure that you have those values set within Vault. For more information, see Environment data structure in Consul/Vault.
  • HCL Commerce Version 9.1.5.0 or laterTo enable single sign on between HCL Commerce and Digital Experience, you must set up an LDAP server, and use a customized Transaction server for your deployment. For more information, review the prerequisites of the Configuring single sign-on task before deploying HCL Commerce.
Important: The Digital Experience namespace must be in the same cluster as the HCL Commerce namespace.

Transferring your HCL Digital Experience database

See Database transfer for HCL Digital Experience to complete the database transfer.

The recommended method is to transfer Digital Experience databases to the same database that is used for HCL Commerce. If you choose this method, then use the HCL Commerce database host name for all database host name related configurations.

After the database transfer is complete, both Digital Experience and HCL Commerce databases will be available on the same database server.

You can now access the Digital Experience Configuration Wizard by using the HCL Commerce host name. For more information about the HCL Digital Experience Configuration Wizard, see Accessing the Configuration Wizard in the HCL Digital Experience documentation.
HCL Commerce Version 9.1.7.0 or laterNote: Both IBM Db2 Database and Oracle Database are supported for the integration between HCL Digital Experience and HCL Commerce. Only IBM Db2 is supported for versions of HCL Commerce prior to 9.1.7.0.

Configuring the integration between HCL Commerce and HCL Digital Experience

  1. Enable samesite=none on both auth and live Digital Experience environments.
    1. Use the kubectl exec -i -t command to go inside the Digital Experience core container.
      For example:
      kubectl exec -i -t dx-deployment-0 -n namespace --container dx-deployment -- /bin/bash
    2. Run the following command from the top level directory.
      ./opt/HCL/wp_profile/ConfigEngine/ConfigEngine.sh set-samesite-cookie-attributes -DWasPassword=WAS_PASSWORD -DPortalAdminPwd=PORTAL_ADMIN_PASSWORD
  2. Enable multiple languages on both auth and live Digital Experience environments.
    1. Use the kubectl exec -i -t command to open a command prompt within the Digital Experience core container.
      For example:
      kubectl exec -i -t dx-deployment-0 -n namespace --container dx-deployment -- /bin/bash
    2. Run the following commands from the top level directory.
      ./opt/HCL/wp_profile/ConfigEngine/ConfigEngine.sh register-wcm-mls -DWasPassword=WAS_PASSWORD -DPortalAdminPwd=PORTAL_ADMIN_PASSWORD
      ./opt/HCL/wp_profile/ConfigEngine/ConfigEngine.sh deploy-wcm-mls -DWasPassword=WAS_PASSWORD -DPortalAdminPwd=PORTAL_ADMIN_PASSWORD
    3. Run the following commands to restart the Digital Experience Portal Server:
      cd /opt/HCL/wp_profile/bin
      ./stopServer.sh WebSphere_Portal -username PORTAL_USERNAME -password PORTAL_PASSWORD
      ./startServer.sh WebSphere_Portal

Setting up the HCL Digital Experience auth and live environments

Complete the following steps to set up the Digital Experience auth and live environments.
  1. Enable single sign-on and update the auth React DAM portlet with the host name of the live environment (LIVE_COMMERCE_REACT_STORE_HOST_NAME).
    1. Go to Administration > Site Management > Context Root > Practitioner Studio.
    2. Click the Edit Digital Assets (pencil icon).
    3. Click Edit Share Settings to make the changes.

    For more information, seeManaging Staging to Production operations using HCL Digital Asset Management in the HCL Digital Experience documentation.

    HCL Commerce Version 9.1.5.0 or laterNote: Single Sign On between HCL Commerce and HCL Digital Experience is now supported. For more information, see Configuring single sign-on.
  2. Import the SSL certificate for the auth host name (AUTH_COMMERCE_REACT_STORE_HOST_NAME) into the live HCL Digital Experience WebSphere Application Server trust store. To access WebSphere Application Server, use the external IP address for HCL Digital Experience instead of the HCL Commerce host name.
  3. Import the SSL certificate for the live host name (LIVE_COMMERCE_REACT_STORE_HOST_NAME) into the auth Digital Experience WebSphere Application Server trust store.
  4. Follow the instructions in the HCL Digital Experience documentation to set up syndication. For more information, see Creating a syndication relationship by using the Administration view in the HCL Digital Experience documentation.
    Note:
    • The Syndicator is the auth Digital Experience environment.
    • The Subscriber is the live Digital Experience environment.

Setting up HCL Digital Experience for the Reference Store applications

The two Reference Store applications, EmeraldPlus and SapphirePlus, use digital assets from HCL Digital Experience in both auth and live environments. For the Reference Store applications to access the Digital Experience content, you must first load the Reference Store application permissions and HCL Commerce contents to the Digital Experience auth environment by using the script in the HCL Commerce Utility Container.

  1. Copy CommerceDXIntegration.zip from /opt/WebSphere/CommerceServer90/samples/integration/dx in HCL Commerce Utility Container to the Digital Experience Core Container by using the kubectl cp command for both auth and live Digital Experience environments.
  2. Extract CommerceDXIntegration.zip.
  3. Grant executable permission to commerce-setup-in-dx.sh.
  4. Run the script to load HCL Commerce permissions and contents.
    ./commerce-setup-in-dx.sh WAS_USER WAS_PASSWORD PORTAL_ADMIN_PASSWORD

Building the search index for the Reference Store applications

Ensure that the search index is built for the Reference Store applications.

Then, load the Reference Store application (EmeraldPlus and SapphirePlus) data by using the dataload command. If you have configured the auth and live DX environments as described in Setting up the HCL Digital Experience auth and live environments, then the auth and live DX environments are syndicated, and sharing the same DX asset management. Therefore, you only need to load data into the live DX environment.

  1. Optional: If you do not have a public certificate that matches with the domain name that is used to access DX, add the auth and live HCL Commerce environments certificates to the JVM trust store inside the ts-utils container to avoid certificate exception issues.
    Note: The certificate domain should match the one used to access HCL Digital Experience.

    For example:

    /opt/WebSphere/AppServer/java/8.0/bin/keytool -import -trustcacerts -alias auth-commerce-cert -file /auth-commerce.crt -keystore /opt/WebSphere/AppServer/java/8.0/jre/lib/security/cacerts
  2. Use the dataload utility to upload the following digital assets:
    • EmeraldCAS.zip
    • EmeraldPlusSAS.zip
    • ExtendedSitesCatalogAssetStore.zip
    • SapphirePlusSAS.zip
    1. Prepare to load the data.
      • If configured as instructed, the DX_LIVE_HOSTNAME used in the data load should be the same as the HCL Commerce store domain name.
      • Generate the encrypted password used to data load remotely using the wcs_encrypt utility in the Utility server Docker container. For more information, see Generating encrypted data with the wcs_encrypt utility.
    2. Load the data.
      ./dataload.sh ../samples/DataLoad/Content/DX/wc-dataload.xml -DdxURL=https://DX_LIVE_HOSTNAME -DcollectionName=EmeraldCAS -Dinfile=/opt/WebSphere/CommerceServer90/samples/integration/dx/EmeraldCAS.zip -DdxUserId=WPS_Admin_ID -DdxPassword=Encrypted_Password
      ./dataload.sh ../samples/DataLoad/Content/DX/wc-dataload.xml -DdxURL=https://DX_LIVE_HOSTNAME -DcollectionName=EmeraldPlusSAS -Dinfile=/opt/WebSphere/CommerceServer90/samples/integration/dx/EmeraldPlusSAS.zip -DdxUserId=WPS_Admin_ID -DdxPassword=Encrypted_Password
      ./dataload.sh ../samples/DataLoad/Content/DX/wc-dataload.xml -DdxURL=https://DX_LIVE_HOSTNAME -DcollectionName=ExtendedSitesCatalogAssetStore -Dinfile=/opt/WebSphere/CommerceServer90/samples/integration/dx/ExtendedSitesCatalogAssetStore.zip -DdxUserId=WPS_Admin_ID -DdxPassword=Encrypted_Password
      ./dataload.sh ../samples/DataLoad/Content/DX/wc-dataload.xml -DdxURL=https://DX_LIVE_HOSTNAME -DcollectionName=SapphirePlusSAS -Dinfile=/opt/WebSphere/CommerceServer90/samples/integration/dx/SapphirePlusSAS.zip -DdxUserId=WPS_Admin_ID -DdxPassword=Encrypted_Password
      HCL Commerce Version 9.1.6.0 or laterNote: When you attempt to data load remotely, data load will first attempt to login to DX. There are two methods available for data load to authenticate. By default, authentication is attempted via portal login.

      If you have login issues running data load, you can disable the portal login configuration by changing the portalLogin property in the wc-dataload.xml configuration file to false. This configuration file is located within the Utility server Docker container in the /opt/WebSphere/CommerceServer90/samples/DataLoad/Content/DX/ directory.

      For more information, see Using the Asset File Upload tool to upload digital assets.

Deploying the stores

To verify that your deployment of both auth and live environments is complete, you can launch the HCL Commerce Reference Store applications that use Digital Experience for images and assets.
  • Use the following URL to launch the EmeraldPlus store:
    https://AUTH_COMMERCE_REACT_STORE_HOST_NAME/Emerald?storeId=21
  • Use the following URL to launch the SapphirePlus store:
    https://LIVE_COMMERCE_REACT_STORE_HOST_NAME/Sapphire?storeId=22