Skip to main content

Understanding the data flow process between AX and eCommerce

thank you Pete Ward
In a previous post I walked through how to make changes to your online web catalog directly from Dynamics AX 2012 (http://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…

Popular posts from this blog

Mark All for Open Cust Trans and Open Vend Trans

We have situations where there are lots of open transactions that need to be settled against each other. This can be the case if auto settlement is turned off. One solution is to add a "Mark All" button to the custOpenTrans or vendOpenTrans forms. This button "checks" the mark checkbox on every line. The user can then uncheck several lines if needed and Update to settle the lines. The code below is an example of what we used on the open vendor transaction screen. The code is very similar on the AR side. One note: I used vendTable.AccountNum in the code below. That should be generalized to work with any buffer that is passed into the open trans form. void customMarkAll() { VendTransOpen localVendTransOpen; VendTrans localVendTrans; container conSum; int linesProcessed; ; //show wait cursor startLengthyOperation(); element.lock(); //remove all prior markings specOffsetVoucher.deleteSpe...

Print Report in Microsoft Dynamics AX 2009 through X++

I am trying to print sales confirmation report on a button click which I have added on Sales Order Detail form in Microsoft Dynamics AX 2009. On click event of that button, I have written following code: void clicked() {     Args                args;     ReportRun           reportRun;     SalesFormLetter     salesFormLetter;     PrintJobSettings    printJobSettings;     CustConfirmJour     custConfirmJour;     RecordSortedList    list                = new RecordSortedList(55);     SalesTable          salesTableUpdate;     ;     SELEC...

Creating Free Text Invoice through X++ code

Job: Calling class from job to run the class public void freeTextInvoicePostTestJob() { Dialog dialog; DialogField dlgCustAcc; DialogGroup dialogPeriodLengthGroup, dialogPeriodLengthGroup1; DialogField dlgLedgerAcc; ; dialog = new Dialog("Free-Text Invoice"); dialogPeriodLengthGroup1 = dialog.addGroup('Cust Table'); dlgCustAcc = dialog.addField(typeid(CustAccount)); dialogPeriodLengthGroup = dialog.addGroup('Ledger Table'); dlgLedgerAcc = dialog.addField(typeid(LedgerAccount)); if(dialog.run()) { if(dlgCustAcc.value() && dlgLedgerAcc.value() != '') FreeTxtInvoiceCreatePost::main(dlgCustAcc.value(), dlgLedgerAcc.value()); else throw error(strfmt("Either CustAccount or LedgerAccount info is missing.")); } } Class: Which creates the free text invoice class FreeTxtInvoiceCreatePost { } static void main(CustAccount _custAccount, LedgerAccount _ledgerAccount) { CustInvoiceTable custInvoiceTable; ...