Condividi tramite


Understanding the data flow process between AX and eCommerce

In a previous post I walked through how to make changes to your online web catalog directly from Dynamics AX 2012 (blogs.msdn.com/b/dynamics-coe/archive/2013/02/04/updating-your-commerce-catalog-directly-from-dynamics-ax.aspx). This powerful feature showcases the truly integrated, omni-channel retail solution that is Dynamics AX. In this post, I'm going to look at what's happening in the background and walk through the data flow of this process.

So to begin, let's have a look at a very simple picture representation of some of the components involved in this process. (and yes there are a number of elements involved that I've left off but this will get us started).

 

 

So let's step through what's happening when we publish our catalog to the web.

 

Step 1: Publishing the catalog from Dynamics AX to the Commerce Run Time database

When you publish the catalog in Dynamics AX and run the A-1075_OC job, the CRT Synch Service takes channel and catalog data from the Dynamics AX database and puts it into our Common Run Time (CRT) database. [In our demonstration image, this database is the AXRetailSP database]. The CRT database is created as part of the Dynamics AX Retail Commerce setup. It can be thought of as another store in the AX for Retail framework, in this case, an online store. It contains data for use by the CRT engine, including products and product hierarchy. For example, in the CRT database, there are the tables ECORESCATEGORY and ECORESPRODUCT (for those who know the Dynamics AX schema they should look familiar). There are also additional tables in there which support other functions such as publishing information, but that's a subject for another day. In short, when you've got data into the CRT DB, you're well on your way.

 

Step 2: Loading (Publishing) the SharePoint Authoring Site

The AX Retail Commerce framework is built using two SharePoint collection sites - one for authoring the content and the other as the external facing published site. This approach is an uptake of Microsoft SharePoint's cross-site publication functionality. Let's first of all look at the authoring site. The authoring site is built to contain the raw product information and attributes as well as the product catalog that we've been looking at. The product master and hierarchy data in this site is contained in lists and the term set and is populated from the CRT DB primarily the 'Retail Publishing Job'. This is a critical job in this process. You can view the status of this job, job history and definition in SharePoint Central Administration - Monitoring. You can see it being scheduled and executed in the below screen: (note: you'll need to be logged in with domain\administrator privileges to run some of the features in here)

 

 

So upon executing this job, what happens is that data is taken from the CRT DB and it's pulled into the product catalog (or authoring) site as lists and the term store. It also does a final status update back to Dynamics AX to keep everyone in the loop as to what's going on. 

Now its SharePoint's turn to take over. ..

 

Step 3: Publish to the SharePoint Publishing Site

Cross-site publishing is a feature of SharePoint. The lists that we've populated in the authoring site are crawled (indexed) by SharePoint Search and as a result the data will exist in the SharePoint search DB. When the online store's web site renders the products it is done by querying the SharePoint search (which is internally accessing the SharePoint search DB).

 

So there you have it. As mentioned above, our truly integrated, omni-channel retail solution enables retailers to control their website data and hierarchy data directly from Dynamics by securely managing data in a controlled, secure framework as described above. 

 

And before I sign off, big thanks to Sergey Pikhulya, who is the Yoda of this young Skywalkers' road to commerce enlightenment…

 

Peter is a Retail Solution Architect for the Centre of Excellence EMEA team

Comments

  • Anonymous
    April 11, 2013
    Hi, if you instead create new tables in AX - how do you know what jobs to run to synch the tables into the CRT database? Where do you find the specific job codes where the synchronization takes place?

  • Anonymous
    May 31, 2013
    If you create new table in AX and you want its content to travel to CRT DB you have an option of modifying one of existing  AX jobs or you could create a new job. If, let's say you want to extend existing job then you will need to add a SubJob where you will specify your newly created table and then you will need to provide a columns' mapping between AX and CRT tables.

  • Anonymous
    July 09, 2013
    Hi Sergey I went to Convergence conference this year and asked the question about wholesale customers and the possibility of having multiple sites for Retail/Wholesale? The difference being that wholesale would be direct to an invoice rather than an ecart solution. Do you know whether this is easily feasible in the current environment or requires heavy coding? Also how does tagging in Sharepoint reflect in AX backend? Are they attributes? Kind regards Wayne

  • Anonymous
    September 05, 2013
    Very useful overview, great blog!

  • Anonymous
    October 31, 2013
    Hi Wayne, regarding your first question - could you please provide more details by expanding the question with some example? I just want to make sure I understood it right. As for 2nd question regarding tagging - please tell me what exactly you meant by "tagging in Sharepoint".

  • Anonymous
    November 01, 2013
    The comment has been removed

  • Anonymous
    March 05, 2014
    Hi Sergey, From this post, i understood the overall flow from AX, CRT and SharePoint. But i exactly want to know how the web service call takes place from Ax to CRT and from CRT to Sharepoint 2013. Where to find code for the default services in AX, CRT and SharePoint. How can i extend it for my own service. Thanks in advance.

  • Anonymous
    March 25, 2014
    Hi Akshaya, There are no web service calls from AX to CRT in ecommerce scenarios, the data is sent from AX to CRT with help of data exchange service, then, at publishing (to SharePoint) time, the SharePoint Publishing Job makes calls to CRT by asking for channel info (categories, attributes) and catalog info (changed products), once the information is published to SharePoint another part of ecommerce is making calls to CRT while C2 user interacts with UI. If you are interested in details on how exactly CRT is called in C2 scenarios you can have a look at the sources which are available in the SDK. Please let me know if you have more specific questions.

  • Anonymous
    May 14, 2015
    The comment has been removed