2. Adding a new Published Entity to Scribe AX-MSCRM Integration

The Scribe Integration Bridge for connecting AX to MSCRM works via two key Publishers capturing events within the two systems and producing XML Messages as a result, the bridge then has various Integration Processes taking the XML Messages and synchronising the content between the two systems.

By default, this Integration Bridge operates for a number of MSCRM and AX entities (notably Customer Accounts, Contacts, Addresses, Sales Orders and Invoices) however this list of synchronised entities will offer vary between different MSCRM and AX solutions. The following post describes how to create and configure a new entity to synchronise from AX to MSCRM.

This works through a simple example of the CustTrans (Customer Transaction) entity in AX and transmitting Creates and Update operations from AX to MSCRM as a one-way synchronisation.

Our first step here is to add a new Publisher to Scribe in the Console.

Scribe Publisher for AX

Scribe Console showing MSAX Publisher to publish XML Messages from AX

Our first step is to add a new Published Entity in Scribe which will act to push out XML Messages in response to events in AX – in this example, we want to attach create a new Published Entity for the CustTrans entity in AX.

Add New Published Entity to AX Publisher

Adding a New Published Entity to the AX Publisher for the CustTrans entity in AX

Here we also need to export the XML Schema (XSD) for our new Published Entity and save this into our Dynamics CRM-AX Collabaration folder, we will need this later to document the DTS Script for migrating the XML Messages produced into MSCRM.

Once the change has been applied to the MSAX Publisher in Scribe, the Console will then inform us that we need to restart any open AX Clients before the new Published Entity starts functioning.

Restarting AX and browsing to the Scribe area then informs us that the CustTrans entity is now included in the list of AX Tables publishing changes out as XML Documents.

Scribe Mapped Tables in AX - Published Entities

Scribe Mapped Tables in AX - showing the list of Published Entities that are posting out XML Documents as result of events (Update/Insert/Delete) in AX

We now then to prompt the Publisher to create the XML Message by creating or changing a Customer Payment in AX – say for example creating a Payment to pay off an outstanding Invoice. We need to capture this XML Message to draft to use as an example input to draft the DTS Script that will integrate such XML Messages to MSCRM, and so we must pause all the Scribe AX-MSCRM Integration processes before doing this to stop the XML Message being processed.

AX Payment

Creating a Customer Payment in AX by paying off an outstanding Invoice

With the Payment created and the Payment Journal involved closed (to prompt the confirmed Customer Transaction in AX) we should then be able to browse back to the Scribe Console and see the Message which has resulted from the CustTrans event being captured by the Published Entity we created in the MSAX Publisher. This Message will appear in the ScribeIn queue for our Integration:

ScribeIn Queue

Scribe Queue for incoming messages - showing the Message generated by our CustTrans Published Entity

With the Message captured in the ScribeIn Queue, we can save a copy of the XML Message to our Dynamics CRM-AX Collabaration folder in the same fashion as we did with the XSD Schema earlier.

With the XSD Schema and an example XML Message, we then need to open Scribe’s Workbench to draft a DTS Script capable of taking the XML Messages that the Published Entity will produce and integrating them into MSCRM.

Scribe Workbench using the XSD and XML files as a Data Source

Scribe Workbench using the produced CustTrans XSD and XML files as a Data Source

We can then connect the Workbench to use MSCRM as the Target to draft a DTS Script which will import the XML data into MSCRM:

Scribe DTS CustTrans to MSCRM

Scribe DTS to take CustTrans XML Messages into MSCRM Custom Entity

DTS Test

Testing the Scribe DTS Script to see how the XML Messages would be integrated into MSCRM

NOTE: At present this DTS is simply looking at the AX CustTrans table and so whilst we can correctly identify a Customer Payment to an Account, we cannot identify a Customer Payment to Invoice or Sales Order. We will address this problem later in the article.

We would then take this DTS and browse back to the Scribe Console, from here we can create a new Integration Process to run the DTS Script against produced CustTrans XML Messages.

New Integration Process in Scribe Console

Creating a new Integration Process to process CustTrans XML Messages via the new DTS Script

Creating New Integration Process in Scribe Console

Specifying which type of XML Messages will be processed by this Integration Process

We can then resume all the various Integration Processes to resume the AX to CRM Integration, now including our new Process and DTS for integrating Customer Payments into MSCRM.

This process will then immediately take our initial XML Message and integrate the contents into MSCRM to give us an initial Payment Transaction record in MSCRM.

Payment Transaction in MSCRM

Customer Transaction from AX synchronised into MSCRM

One Response to 2. Adding a new Published Entity to Scribe AX-MSCRM Integration

  1. Pingback: MSCRM and AX: Leveraging AX Business Logic from MSCRM | CRM Consultancy Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s