Thursday 12 June 2014

Feature pack 6 SEO redirects & Metadata.

For Illustration in this write up,  we assume the seo meta data is going to be sent over in the PIM (product information management) data feed and this needs to be loaded into the respective SEO tables.
To explain how OOB SEO works we will use one sample product - "KitchenCraft Cherry Cutting Board" (partnumber : HKT030_3008).  I have tried and kept the first half of the write up as non-technical as possible and for the techy people, you will find more food for thought towards the bottom.

This is how the product seo tab looks in management center. When the product is first opened , the URL Keyword (which shows up on the URL in the browser) was set as "kitchencraft-cherry-cutting-board"
Then changed the URL keyword to be "kitchencraft-cherry-cutting-board-new". Then updated it multiple times through management center to prove the scenario of multiple redirects. So the subsequent updates were
"kitchencraft-cherry-cutting-board-new-1"
"kitchencraft-cherry-cutting-board-new-2"
"kitchencraft-cherry-cutting-board-new-3"   which is what you see below







When you update through MC, the MC code updates the Redirect tables to create the appropriate redirects. As i updated the above URL 4 times, 4 redirects were set up in the SEO tables which logically were as below
Redirect - FROM
TO
kitchencraft-cherry-cutting-boardkitchencraft-cherry-cutting-board-new-3
kitchencraft-cherry-cutting-board-newkitchencraft-cherry-cutting-board-new-3
kitchencraft-cherry-cutting-board-new-1kitchencraft-cherry-cutting-board-new-3
kitchencraft-cherry-cutting-board-new-2kitchencraft-cherry-cutting-board-new-3

Thats great!! But how do we do this outside of MC?
WCS OOB from feature pack 5 onwards provides capability to dataload SEO stuff. Please find attached CatalogEntrySEO.csv  (similar one is available for category as well on ibm infocenter)
MW(some middle ware system) can create a row in this file for each product, which can then be loaded using the OOB dataload utility. The dataload utiltiy runs on the principle that if the URL keyword has not changed then don't create a new row in the redirect table (have tried this for the same product couple of times, but worth a retry).
So for our illustration, this is what i had in the file (Please take a look at the suffix on each of the element - have added the keyword Dataload so we can differentiate between changes through MC and through Dataload) which was loaded after completing my round of updates through MC.
CatalogEntrySEO,,,,,,
CatalogEntryUniqueId,PartNumber,LanguageId,URLKeyword,PageTitle,MetaDescription,ImageAltText
,HKT030_3008,-1,kitchencraft-cherry-cutting-board-new-throughDataload,kitchencraft-cherry-cutting-board-new-throughDataload-pagetitle | Hot,Stchencraft-cherry-cutting-board-new-throughDataload-metadesc,tchencraft-cherry-cutting-board-new-throughDataload-imagealttesxt
Once the data was loaded for this product through the dataload, this is how the product SEO tab looked in MC

So as you can see the new data is all loaded for the product. Wondering what happens to the redirects, here is how the redirect table would look like
FROM
TO
kitchencraft-cherry-cutting-boardkitchencraft-cherry-cutting-board-new-throughDataload
kitchencraft-cherry-cutting-board-newkitchencraft-cherry-cutting-board-new-throughDataload
kitchencraft-cherry-cutting-board-new-1kitchencraft-cherry-cutting-board-new-throughDataload
kitchencraft-cherry-cutting-board-new-2kitchencraft-cherry-cutting-board-new-throughDataload
kitchencraft-cherry-cutting-board-new-3kitchencraft-cherry-cutting-board-new-throughDataload
Also please take a look at all the other SEO data like meta description etc.

Now the techy bits....!!
The 3 main tables for the redirects are shown below with some comments in line
The lookup starts from SEOURL --> SEOURLKEYWORD --> SEOREDIRECT