NOTE: This doc was written with SCpbMD8.0 initial release. There are some changes with the update1 release and I will post a new one for it later.
Here I want talk about how to synchronize catalog from Dynamics to Sitecore Commerce. There are some high level information available on Sitecore Dev portal and also different ways to sync catalog between AX and Sitecore Commerce - such as Sitecore tasks, Windows Services etc.
This post is focusing on use the routing console application (provided as SDK) to do product sync and provide steps you need to follow if you want do by yourself.
Configure Routing Console
Routing console application is the command line based tool which talks to both Dynamics AX and Sitecore Commerce and synchronize catalog data (one way always from AX to Sitecore Commerce)
<add key="Host" value="storefront" />
<add key="UserName" value="sitecore\admin" />
<add key ="Password" value="b" />
<add key="SitecoreDatabase" value="master" />
The “Host” value is the Sitecore instance hostname and it needs to be different than the IIS application name assigned to Sitecore instance or, sometimes, it needs to be a FQDN. Otherwise later steps won't work. A good verification is to see if this URL renders back a JSON response:
<endpoint address="http://localhost:2000/SolutionStorefrontSite_CatalogWebService/CatalogWebService.asmx" binding="basicHttpBinding" bindingConfiguration="CatalogWebServiceSoap" contract="Sitecore.Commerce.Catalog.CatalogWebServiceSoap" name="CatalogWebServiceSoap"/>
Note: windows authentication is required to access Sitecore Commerce catalog web service
Configure Sitecore Commerce
Console app needs to access Sitecore tree to retrieve information about Dynamics AX (server name, ChannelID, ChannelDB etc.), routing information and log locations etc.
Execute Routing console app
Dynamics AX setting
"Organization Unit" value
So I suggest to remove this item from Sitecore tree by doing below:
SQL vs Windows Authentication
I mentioned above the routing console supports either Integrated windows or SQL authentication when it connects to AX channel DB. However, OOB the AX channel DB is only configured to support windows auth. So unless you are going to make changes in AX - likely won't be supported by MSFT- SQL auth will not be working when routing console talks to AX. Therefore it is recommended (and supported) to configure routing console to use windows auth (in Sitecore tree).
One of the requirement to use windows auth is to put routing console machine and AX channel DB in the same domain (otherwise it needs some kind of domain federation mechanism). If your AX and Sitecore machines are on different domains, you can achieve this using AX CDX. In that case, the AX channel DB can be located in different domain, e.g. your Sitecore domain, and CDX is responsible to sync data between AX headquarter and channel DB. The detail configuration on CDX is outside the scope of this blog.
CDX realtime service
It is not obvious but the CDX realtime service needs to be invoked by routing console to update the channel publish status. Therefore,. if you are getting below exception, you may want to check if your RealtimeService is running on AX side:
[Exception] Exception while calling invoke method UpdateChannelPublishingStatus: There was no endpoint listening at https://retail.contoso.com:84/RealTimeService/Service.svc/Common that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.<br/>
RE >> Ensure port is specified (the AX channel database port. eg 57500) Why port 57500, isn't the channel database a standard SQL database and therefore should use port 1433? Or is this port in order to talk to the Async client?
I'm copying Hao Liu's answer from the Sitecore developers support forum: A quick answer on the SQL port number. 1433 normally is the local SQL port while 57500 is the default port for Azure hosted VM (MSFT LCS provides AX VM hosted in Azure) when you connect its SQL remotely. It's really depending how you map your remote/local SQL port for Azure VM, so it can be values different than 57500.