Learn how to set up a simple PIM with Contenstack
In this video, @timbenniks shows how to set up a PIM data model in Contentstack. Product Information Management systems tend to be highly flexible, abstract, and complex. The example in this video is simplified for when you do not need an external PIM, and want to do basic product related work inside Contentstack.
Learn more in our academy: https://contentstack.com/academy Talk to us on Discord: https://community.contentstack.com/ Try Contentstack for free: https://www.contentstack.com/try-for-free
Transcript
this is Tim from content stack and in this video I'm going to show you the simplest data model to basically become a Pim using content stack and so a Pim is a product information management system and so pims are generally there for these large brands that have dedicated systems that are called pins to put all their product data in there and then enrich it over time but don't add too much fluff of how stuff looks but it's really the the hard data and so that data can be used used over the years in different formats and in different channels by cms's front ends you know in store all that stuff but some Brands still need a PIN system but not a dedicated pin system so you can do that in your CMS and content stack has a lot of like super mature features to do that so in this video I'm just going to show you like a super basic one and then while I show you and we're editing some things in the interface will'll explain what other things you might do to make this bigger let's go and have a look at the screen here so this is an empty stack called the Pim example stack and um what I've done is when we look at our content models I've added a product model and attribute model and next one is I added a taxonomy for product categories because there can be a wild growth of categories right and this is just a super nice way of saying this belongs there and this works that way stuff like that all right so um let's just add a watch as a product and then while I'm adding it let's go over the fields that I decided to use for the base of course title makes sense right so I am not using Like official product names here because why would I um anyways um the people that know Rolex very well are going to be very upset with me because I'm going to probably get some product at wrong of the image I'm uploading so I apologize beforehand anyways so SKU so basically this is the product identifier across systems and there can also sometimes be variant of these skus right you can have a base SKU and then you can have separated ones I didn't choose to do that in this context so this is just one product with one SKU so let's call it this one right first Rolex um next field description what you can do with those description Fields is can be different right sometimes it's just a short description to explain this is what this product is and it uses the exact right word for your brand however this can also be a description field that might be used on different places so it might need Rich text and you might need to add some links and other fancy things so in this case I decided to keep keep it simple um but definitely there is a a world in which this description field is used for many more things so now we go to the category and I you can see I call it categories there can be more right and this is this taxonomy field I was just quickly showing you so I'm going to put this one in clothing in men's wear of course women can wear this and it I don't think it's Electronics because these are actually mechanical so how about we do this and you can see there are some terms right and so we can also add additional ones if we wanted so we get this lovely hierarchy or taxonomy of our categories then I've added another field called status this one is pretty interesting because status in this case can be an active product or an inactive product or a draft product the CMS itself also has similar statuses right you can actually make something a draft or publish it or put it to a different language or you can add it to a different branch in the system I've also added this because you might want to put something to inactive because it was you still want to have it published but on certain websites you're going to not show the inactive ones and other webss you might so there's this like little extra thing that I thought this might be useful and in my career building you know e-commerce that field was always there um now of course assets I've already uploaded something in a folder called watches and so I have this super lovely Rolex here um the idea is that it's assets it's more right so you might be a able to add like a bunch of different images here and so they're all product shots according to whatever attributes we have they need to align we'll show you attributes in a sec um some more Rich systems or more you know granular ones we could definitely do that here as well could have one main image and five sub images or there are all these different approaches you can take as this is a simple setup let's just stick with this and we could upload another one if we want to show that on a page later on all right so now attributes so attributes are connected to this SKU right so the Rolex one SKU has this image with a certain amount of attributes so how about we create a new attribute for um the size of the watch right and so I'm assuming this is a 33mm one please Rolex fans don't come at me in the comments I apologize profusely if I don't know what this is but other than that this is actually a number and the measurement is millimeters so I've chosen these fields for this and also it's a separated data model right because there will be more watches of this size specifically in millimeters so you will be able to make another watch and attach the same attribute to it and that way you make a lovely you know uh graph of how everything works and it's connected because if you have five watches of which two have this size you can actually filter on size and get the two watches that becomes very interesting that way right and let's also do another one for band and then so this one is the band material is like metal right um and so in this case it's just text there's no unit of measurement and so with this you can do a lot of different types oh and I still have a typo there we go um and that's it for now and as you can see this was really quite simple to set up but this is super flexible so um before talking about how this data is used let's first query so you can see what came out and so for that let's go to our graphql Explorer um so I decided for now to just use the graphql Explorer because then I don't have to code you a front end to query this data we can just do it directly in graphql and we're just going to go to all products and for these products what I want to see is the description SQ I want a status field I want my title I want my taxonomy terms or let me just make that a little bigger um I also want all my attributes and as you can see that's a connection to a reference here so let's get the total count and then let me get all these attribute values here and then images as well so let me just get the count and the URL so now when we have a look at this this is our watch and so this is a lovely bridge to our next um subject here because essentially this data is Standalone about this product there's nothing in there about how the page needs to look for that product and that's actually a pretty important part to this whole thing so you want to keep your PIN very clean because you might use this in four years so if this says this product here has a big hero image and a small description and five columns well maybe next year or maybe on your like your phone it doesn't look like that so you don't want your data to be polluted if you want to keep reusing this so the idea is that you might have a pin with a product and then next to this you make a page product page type and in that entry you add modular blocks you add your Heroes your visual building all the lovely design stuff you want to do and you connect a reference of this product to that so your front end can show it and so that's the basics of a Pim that's what I wanted to show you today and um there you go happy coding cheers
Related videos

Kickstart: Getting started with Contentstack Edge and Nuxt SSR
Tim Benniks, Developer Experience Lead, walks through a Kickstart Nuxt SSR front-end implementation.

Kickstart: Getting started with Contentstack Edge and Nuxt
Tim Benniks, Developer Experience Lead, walks through a Kickstart Nuxt front-end implementation.

Bootstrap a Kickstart in under one minute with the CLI
Contentstack offers a bootstrap cli command to get started with all Kickstarts in under one minut. Get the code running locally, and with environment variables in place.