Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Insert or update products using the Integration Bus View modes: 
User avatar
Member
Member
robert-pulldigital - 6/25/2013 5:19:34 AM
   
Insert or update products using the Integration Bus
This is coming along nicely and products are being imported however they do not show up in the CMS.

Is there a guide for importing ecommerce products?

The product row does exist in the database in COM_SKU.

Any guidelines would help at the moment i'm just guessing most of what we are trying :)

Thanks

User avatar
Member
Member
Swainy - 6/25/2013 5:21:52 AM
   
RE:Insert or update products using the Integration Bus
Hi Robert,

How are you adding the products into Kentico? Are you using the integration bus (process external task), the API, or inserting straight into the database?

Thanks,

Matt

User avatar
Member
Member
robert-pulldigital - 6/25/2013 5:59:31 AM
   
RE:Insert or update products using the Integration Bus
I'm trying to utilize the integration bus so currently we are passing a SKU to ProcessExternalTask and it's create a row in the database every time, even if you specify tasktype.updateobject.

However I may have code riddled with anomalies as this is all a bit trial and error at the moment.

User avatar
Member
Member
robert-pulldigital - 6/25/2013 6:25:02 AM
   
RE:Insert or update products using the Integration Bus
Even more, the processexternaltask takes a tasktype enum and all but 2 of those enum values cause an exception.

I'm sure the tool is a powerful one but when I can't find details on uploading products to an ecommerce site alarm bells ring :)

User avatar
Member
Member
robert-pulldigital - 6/25/2013 8:52:39 AM
   
RE:Insert or update products using the Integration Bus
We have managed to get a product in and showing in the CMS, however the task type update or create always creates a new product.

I could probably write into the web service the logic for updates vs inserts but then there would be no need for the integration bus. I'm relying on the bus to perform the update or insert correctly on my behalf.

Is there any documentation on importing products via the bus ?

User avatar
Member
Member
Swainy - 6/25/2013 10:10:38 AM
   
RE:Insert or update products using the Integration Bus
I haven't specifically tried inserting SKU's via the integration bus but every other object I have tried has worked correctly (Order, Customer, Address, User).

Reason for update vs insert - are you sure your SKUID is exactly the same as the one you are trying to update? If you are passing in the SKU to the integration bus if you debug at the point you are passing in is the SKUID correct?

Can you also ensure you are passing in the Site Name as the last parameter (I did have an issue where it couldn't find the item unless I passed in a site name).

Thanks,

Matt

User avatar
Member
Member
robert-pulldigital - 6/25/2013 10:41:43 AM
   
RE:Insert or update products using the Integration Bus
Ok we have managed to progress a little further.

The bus seems to ignore SKUID however if I set the SKUGUID to a database item, an update occurs regardless of tasktype and if the GUID is empty then an insert occurs, regardless of SKUID that is set and regardless of tasktype passed along so it makes coding quite confusing since it simply doesn't behave the way the method suggests.

So forget all of above.

In code how can I access custom fields added to the ecommerce sku table.

Then we will simply store the 3rd party ID for the object and perform a look up of the GUID with that ID.

So also how to use SKUInfoProvider.GetSKUs("skuid = " + salesforceid, null); but with customer fields instead would be useful.

All the rest is a learning exercise for me. Hopefully I can move away from Kentico development after this project :)

User avatar
Member
Member
robert-pulldigital - 6/25/2013 11:03:55 AM
   
RE:Insert or update products using the Integration Bus
I think i've answered above. It's slowly coming together, thanks for your help so far, we are passing the site name across.

To get products to show in the CMS we had to tick 'allow global products' in the e commerce settings.

Thanks no more questions at the moment.

User avatar
Member
Member
Swainy - 6/25/2013 11:08:22 AM
   
RE:Insert or update products using the Integration Bus
No worries :)

If you need anything else just let me know.

Thanks,

Matt

User avatar
Member
Member
Accepted solutionAccepted solution
Swainy - 6/25/2013 11:07:08 AM
   
RE:Insert or update products using the Integration Bus
I wouldn't encourage you to move away from Kentico I think it's a really strong product with some great features :)

To access custom fields added to the ecommerce sku table just use Object.GetValue("ColumnName")

e.g.
 SKUInfo si = new SKUInfo();
si.GetValue("ColumnName");

To get the SKU Info which has the one you want use the GetSKus method like this:
SKUInfoProvider.GetSKUs(string.Format("ColumnName = '{0}'", GUIDHERE), "");

which returns any SKU's with the 3rd party ID that matches the GUID you are passing in.

Thanks,
Matt

User avatar
Member
Member
robert-pulldigital - 6/26/2013 8:38:40 AM
   
RE:Insert or update products using the Integration Bus
Thanks, it's getting there, very slowly. But so far everything has been integrated with Salesforce via the integration bus.

Hopefully the outbound queues are simpler as we can just subscribe and send an object to the salesforce api. Fire and Forget as far as i'm concerned.