Import SKU via the Integration Bus and Internal Connector

Adam Jackman-Moore asked on October 15, 2014 11:15

Hi All,

So spent most of today trying to get my head around importing a list of SKU details from our ERP into Kentico. Having read the documentation we have decided that we want to use an internal connector within Kentico and expose it via a custom web service. Basically we envisage passing in an XML representation of each SKU into Kentico where it is mapped and imported. We are using standalone SKU's and not pages.

However the example in the sample code is terrible and deals with only exporting changes to a log. Can anyone point me in the direction of a real life example of how this connector is put together to import a SKU.

Cheers Adam.

Recent Answers


Brenden Kehren answered on October 15, 2014 14:14

Ask yourself these questions:

  • What kind of error handling (high level) do you need? Robust? Simple, like a try {} catch {} or if() {} else {} statement?
  • How often does this need to happen? Real-time? Scheduled?

Depending on your answers, you could very well use a scheduled task within Kentico which are much easier to use and get going than an Inbound/Outbound Integration Bus Connector.

Every time I import or export data for a client I always ask myself those 2 simple questions and the answers determine what way I'll code it.

Brenden

0 votesVote for this answer Mark as a Correct answer

Adam Jackman-Moore answered on October 16, 2014 01:55

Forgot all about scheduled tasks. Unfortunately everything has to be in real time. If something is changed in our ERP we want it to reflect this change on the site pretty much instantly. One of the main reasons we chose Kentico was because of the flexibility with real time integration. Just really need a simple example to expand on.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 16, 2014 14:28

I believe the documentation explicitly shows a very generic outbound task if I remember right. Or it did for v7 anyway. Creating the outbound to your ERP is simpler than the inbound from ERP because you need to capture the event within the ERP to trigger a call to Kentico to perform the work. I'm not going to say this is an easy task at all which is most likely why you haven't found an example. There is a good chance companies end up hiring a Kentico Partner or Consultant who knows these items to write the code for them.

With that being said, if you have a valid maintenance agreement, you can email support and ask for additional examples, if they have them. If you have consulting credits you can use those as well to get some work from Kentico.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on October 16, 2014 15:24

Honestly I have done these type of things in many different ways, but the cleanest is to take the software out of the equation. Either create your own syncs or use a commercial sync software. Set-up a middle SQL database between the ERP and Kentico. Use the sync or DB triggers to push changes into the middle DB and out to the Kentico tables.

Why a middle database, because much like business logic code, it abstracts the two systems from one another and prevents having to recreate the entire connection if one side changes some how. Honestly doesn't take anymore effort and overall easier to control the sync process.

3 votesVote for this answer Mark as a Correct answer

Adam Jackman-Moore answered on October 17, 2014 01:59

It all clicked yesterday and I have most of the product import/update done. Still got the order export stuff to do with the subscriptions, but that seems fairly simple now i "get it". Virgil we are actually using a middle SQL database, glad someone else agrees that is a good course of action. I just received an email from our awesome guy at Kentico with an example as well. So time to see if i got it all right yesterday. :)

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 17, 2014 06:37

Nice suggestion Virgil! I've done that before and it does work very well.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on October 21, 2014 23:41

Glad to hear you are already following good practices. Best of luck

0 votesVote for this answer Mark as a Correct answer

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