In this video I am going to go through how we tried to solve the issue of migrating products from your existing product repositories to Sitecore Content Hub Product Content Management (PCM).
Note: The following is the transcription of the video produced by an automated transcription system.
Hey, guys, this is Akshay Sura. Today we will be talking about PCM, so migrating existing products to content hub, product content management before we get to that. This is a very common question. Hey, you know, is PCM PIM. No, it’s not. PCM is not equal to PIM. PIM typically is a system which aggregates product information from multiple sources and then also is a way to syndicate your main product content to different distribution channels. So, you know, I assume you are a hardware company holds all the true information for a product, and then it’s what is used to syndicate through different distribution channels to, say, Home Depot or other distributors online and offline to their system so that the true representation of your data now PCM product content management lets you enhance or enrich that data. So, you’re adding user friendly content, content which can be displayed on multiple channels like Web, social networks, any other kind of systems where a user is actually seeing this content third party sites. So PCM lets you add on this additional information and enrich the product data.
One of the things which is really interesting, which we’ve been seeing a lot of while dealing with customers, with content hub, the content hub team or other agencies who are dealing with content hub, that may ask the question, hey, you know, by by any chance, is there existing methods available for me to push content from existing systems to DAM, to PCM to CMP? And the answer is always no. So no, it’s typically customers who start this are starting fresh. They are not porting over existing content or they will port over the existing content, but another period of time. So, they start off with a clean slate. So, to me, it doesn’t make that much of a difference. I would want to start with my data up there. I would want my editors modifying things instead of content hub of itself. So my goal has been for the past couple of months is to push this effort we have where we’re writing this Azure function based applications, which are pulling and pushing data in to DAM, pulling and pushing data into PCM and CMP. The next question, again, obvious question is, are there any integrations from PCM into XP, Sitecore XP or Sitecore commerce? The answer is no, but I believe in Sitecore 10 there is a sample project which lets you synchronize, but I haven’t looked it up. But again, content hub provides a really good API so far if I haven’t had any issues manipulating entities instead of content hub at all.
So, I will just continue to use that. So, for DAM one of my previous videos you could check out on our website, Konabos.com or on our YouTube channel. We dealt with M.Asset and M.AssetType. DAM by far is the most complicated of all the different pieces inside of content hub. PCM is a little bit easier and CMP much easier than this so for PCM will be mainly dealing with the M.PCM.Product and M.PCM.ProductFamily. I also deal with taxonomy, which we dealt with our previous video. When we were uploading the DAM content for the asset. We had a taxonomy which created the taxonomy items if they didn’t exist and attached it to the asset itself. One of the other things I am the upcoming video will deal with the CMP, so look out for that. So, with these are the two main things we’ll be dealing with. The process is pretty simple at this moment. I’m not going to tackle this syncing back into another system like XP or XC at this moment, but similar fashion to how we did the DAM. We have a process in Azure functions which drops items in a queue from the external system. It gets picked up, which is a Content hub to wait for the feedback and then closes it out so it creates products and product families if they don’t already exist and also we continue to use as azure functions because it makes a lot of sense, especially dealing with content hub APIs to speed. Things have to wait, especially to do and deal with assets. Obviously, for products we don’t have to. But anything asset related, to have to sit and wait. So as your functions play a good part and also instead of running it from your local machine, it just makes sense to throw it out there. So, let’s stop here.
I will show you a quick demo and then we will wrap up this video shot video today. OK, let’s walk through the PCM. So, if you do have PCM enabled and typically when you buy the DAM product, you PCM is usually with it depending on your needs. But once PCM comes through, it split into three different things. And again, the whole way the Content Hub was built as a product. Can I speak with you? I have connections to assets, obviously, which are in DAM as well as the CMP content hub as well. So, I set up a catalog in here. You could have multiple catalogs, each catalog representing a different part of your business. Each catalog can have products. I haven’t gone through the whole workflow of this one because I just created them. You could have product families and the product families are independent of the catalog and you can actually use it between multiple catalogs. I created a few these two family, one family, two automatically created with the testing we did. And I’ll go through the code a little bit and then products by themselves again. You can create them. They have like typical properties. You can extend them if you need to. You could add one or more product families. If you choose to do this, one only has one. And also, you could tag it to one or more. Would you call catalogs if you choose to, if this product exists and then all the other attributes you can extend, just like any other of as long as you have access to the schema, you can absolutely do that. So, what I’m going to do is I’m going to minimize this for now and then we’ll come back here. And this is a sample application. On the right is the output of me running azure functions locally, but the queues exist on Azure itself. On the left, we have our sample application, which we use to test as well as push data back and forth, especially for DAM and PCM. It built it from an external system.
But I’m going to just push a couple of sample project sample products. So, products are pretty simple. So, you know, it first goes through and checks. If the product family exists, if it does exist, then, you know, it doesn’t it doesn’t create them. It just gets the reference. If the product families don’t exist, then it creates them. So first the messages get dumped into this PCM Queue And then it gets processed and pushes it to the product family. Queue Here we essentially get the we’re using Web SDK, which is one of the best ways to connect the content hub. You could use the API method and call directly. I don’t find a need to because this is a .NET Core app running on Azure function, so I don’t see a need for this. But essentially what I’m doing is based on the message I get back, I’d serialize it go through all the product families find. If I have product families, if I do, I get the id. If I don’t, you know, I create one and then push it to the next stage, which is the create product in here. Essentially, we’re setting a few attributes for the product. And again, this is M.PCM.Product. We add it, we add relationship to the product family and then we add relationship to the product, save it and then the Queues. And this is where we terminate.
So, if we were to look at our products at this moment, I’m going to go back here. We created new products, as you can see. We’ll go into one of them. I added some sample information to in the HTML. We add to the P tag. We have a short description redacted to do. We gave it a number, the name and the label, and then also we tacked it to the one catalog we have. And again, this is just a demonstration of what you could do. You know, what I found is one. To work with the Web SDK and you get used to it now that I’ve done quite a bit of work, it just seems so simple to me. So, tagging things, adding taxonomies, linking to different types seems very easy once you start adding it. And I love using Azure functions.
Again, Thank you so much for watching our video. Here’s some of the information about our company. If you need to get in touch with those. Also, followers on LinkedIn, Twitter and YouTube we will be pushing a lot more content on content. What I find very frustrating, and I’ve said this in the community settings several times, is that I find a lack of information, very frustrating. People who are figuring this out could easily put this out so that it’s easier for the others to come in and not have to go through the same trouble to do so. Please, if you have knowledge, share, don’t withhold. And again, thank you so much for watching this video.
If you have any questions, please get in touch with me. @akshaysura13 on twitter or on Slack.