Integration Bus Implement Incoming Syncronization - Mapping related objects

Citro Digital asked on November 12, 2015 16:42

I am using the integration bus to connect Kentico Contacts and Accounts with Microsoft Dynamics Contacts and Accounts. I'm able to successfully pull from Dynamics and pass tasks into the Integration Bus queue and have it update/add/delete contacts/accounts. My problem is how do I relate Contacts with Accounts in Kentico? I first sync Accounts then Contacts, so whenever I happen across a Dynamics Contact that has an Account I can be sure that Account is already inside Kentico to reference to. How do I relate the two without having an Id for the Contact yet while in the integration connectors PrepareInternalObjects method?

Recent Answers


Brenden Kehren answered on November 12, 2015 16:55

When you send your CRM data over ensure you are passing the contact and account IDs as well. Make sure in your account and contact tables in Kentico you also have a CRM related ID (account or contact). Then I'd think you could add all your accounts and add contacts and when adding contacts relate them based on a lookup of the CRM ID you've stored in Kentico. It's a pretty simplistic explanation but should accomplish what you're looking for.

0 votesVote for this answer Mark as a Correct answer

Citro Digital answered on November 12, 2015 17:07

Hey Brenden, thanks for the quick response!

I am currently doing this and storing the Dynamics Contact and Account Ids in the Kentico Contact and Account tables respectively for reference. My problem is when implementing the PrepareInternalObject method which converts the Dynamics CRM Contact into a Kentico Contact, how do I add that reference? Since the task has not been run yet to create the Kentico Contact (it gets queued up), I have no Kentico ContactID to use for creating the AccountContactInfo (which requires an AccountID and ContactID).

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on November 12, 2015 22:08

Ahh yes, I missed that PrepareInternalObject method reference. Let me take a look and see what I can find.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.