Author: 
D365 Retail Server Health Check in 7 Steps

D365 Retail Server Health Check in 7 Steps

During one of my project implementations, we faced a challenge of our product “EdgeAX-CommerceLink” not functioning with the retail server of Dynamics 365/AX7. Usually, a retail server does not connect with an application when server health is not normal. In this blog, we will look at how to make a health check of the retail server when all other configurations fail to work.

Here is a URL for retail server health check; you can update the base URL w.r.t your environment.


retail server health check

How to Ensure a Normal Health of Retail Server

Here are some steps applicable to non-production lower environment where you restore the production database .bacpac.

  1. Database Change Tracking

  2. Production database .bacpac change tracking is disabled by default so enable it during production database .bacpac restoration in lower environment.

    Change tracking enablement script:
    ALTER DATABASE AXDB
    SET CHANGE_TRACKING = ON
    (CHANGE_RETENTION = 2 DAYS, AUTO_CLEANUP = ON);

    declare @pkTables as table (name nvarchar(1000));
    insert into @pkTables (name)
    select distinct tc.TABLE_NAME as name
    from INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
    join INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu ON tc.CONSTRAINT_NAME = ccu.Constraint_name
    where tc.CONSTRAINT_TYPE = 'Primary Key'

    -- Keep track of how many tables we are dealing with
    declare @enabled int
    declare @alreadyEnabled int
    set @enabled = 0
    set @alreadyEnabled = 0
    select count(*) as tablesWithPrimaryKeys from @pkTables

    -- For each table name in primary key tables
    declare @tableName nvarchar(1000)
    while exists (select * from @pkTables)
    begin
    -- Set the current table name
    select top 1 @tableName = name from @pkTables order by name asc

    -- Enable change tracking for this table
    if exists(
    select sys.schemas.name as schemaName, sys.tables.name as tableName from sys.change_tracking_tables
    join sys.tables on sys.tables.object_id = sys.change_tracking_tables.object_id
    join sys.schemas on sys.schemas.schema_id = sys.tables.schema_id
    where sys.tables.name = @tableName
    )
    begin
    set @alreadyEnabled = @alreadyEnabled + 1
    end
    else
    begin
    exec('alter table ' + @tableName + ' enable change_tracking')
    set @enabled = @enabled + 1
    end

    -- Delete the current table name
    delete @pkTables where name = @tableName

    end

    -- enabled + alreadyEnabled must equal tablesWithPrimaryKeys
    select @enabled as tablesEnabled, @alreadyEnabled as tablesAlreadyEnabled

  3. Channel Database

  4. Once you restore the database, update the channel database connection string as the database contains an old production connection string. Get user password from LCS and update connection string accordingly.

    • DataSource=VMAX-DEV-0;InitialCatalog=AxDB;UserID=axretaildatasyncuser;Password=********
    • Current batch status must be waiting but not in failed/error.

    • Normal Health of Retail Server


  5. Channel Profiles

  6. Update channel profiles URL’s prefix with your environment base URL prefix (vwaxsit01).
    Menu navigation, base URL prefix & URL to update:
    Normal Health of Retail Server


  7. Real Time Services Profiles
    • Language must be “En-Us” or any other used in your configurations.
    • Service host address must be updated with base URL prefix (vwaxsit01).

    • Normal Health of Retail Server


  8. Online Channel

  9. Online channel must be configured properly 100%.
    • Language must be ‘En-US’.

    • Normal Health of Retail Server


    • Online channel should be in “published status” instead of “in progress”.

    • Normal Health of Retail Server


      Complete the missing configurations and click “configuration status” which must be completed and in “approved” status. Mark all tasks as “approved” and press “update”

      Normal Health of Retail Server


      Since there is no option available for online channel publishing, I customized that feature. Refer to the script below for the “PUBLISH” button.

      Update [AXDB].[dbo].[RETAILONLINECHANNELPUBLISHSTATUS]
      Set [PUBLISHSTATUS] = 3,
      [PUBLISHSTATUSMESSAGE] = 'Published Successfully'
      Where [ONLINECHANNEL] = 5637145328

    Normal Health of Retail Server


  10. Retail Store

  11. Configure at least one retail store with complete configurations to ensure a normal server health.
    • Retail store language must be “En-US”.

    • Normal Health of Retail Server


    • Update your retail store hardware station URLs as per your base URL/prefix.

    • Normal Health of Retail Server


      Once done, retail store configuration status must be “completed and approved”. Select all tasks as approved and click update.
    Normal Health of Retail Server


  12. Retail Service Account
    • Refer to section 4. Real time service profiles, connection – you can see “user identifier” here.
    • This account must exist with D365/AX7 users with
      • Status – Enabled
      • Company –Legal entity that you have configured. (VWO in this case).

      Normal Health of Retail Server


  13. Retail Server Health Check (Ping Smoke Test Result Summary)

  14. To verify retail server health after completing steps above, enter this URL in browser. (Update the base URL as per your environment)
    Normal Health of Retail Server


Categories: 
Kashif Yasin's picture
Technical architect at Systems limited with almost 10 years of experience in different tools and technologies including Dynamics AX, CRM & D365 Finance for Operations implementations. I am based in Kasur.

Disclaimer: The views expressed here are solely those of the author in his private capacity and do not in any way represent the views of Systems Limited, or any other entity related to Systems Limited.

Add new comment