Contentful PIM POC
Overview
Following on from the Contentful PIM Proposal this is a document of the POC that was done to prove that we are able to import product data from Hybris and create product entries in Contentful including all of the mandatory fields such an mannequin images. The product and variant product content models were created in a dedicated Product space in Contentful, using the same structure and fields that we have in the Performance space currently. There is a separate repo for this, with CI/CD set up for automated content model migrations should any changes or updates need to be made.
POC architecture
- A request for product data for a base or variant SKU is sent from Contentful to AWS API Gateway.
- An
ImportProductevent is sent to EventBridge, with the SKU that has been requested. - The Product Data Step Function is triggered. The Lambdas that are executed as part of the step function get the product data from Hybris, check whether it is a base SKU or variant SKU, check if product data for that SKU already exists in Contentful and if not creates it. More information about the possible paths for this workflow are detailed below.
Step Function logic
Above is a representation of the possible paths that we need to consider in the Step Function, in order to successfully create a base or variant product in Contentful. For variant product data to be imported into Contentful, the base product data that it is associated with must already exist so if this isn't present we will create it. At the point at which we create base prodct data, we will automatically create the variant product data in Contentful as well.
When product data is imported into Contentful, we assign the relevant data to the text fields e.g. title, short description. On the product content model there is a field that allows us to link variant product entries to the relevant base product. This is done automatically as part of the product creation process in the lambda. On the product variant content model we are using the Cloudinary image plugin to assign mannequin images to the product variant. The mannequin images are automatically added as part of the product creation process in the lambda.
Features not covered by the POC
- POC doesn't include Contentful app to enter a SKU
- POC doesn't include creation of size variants
- POC doesn't have hide and show functionality in the Contentful UI for Guides-related product fields (another app needs to be created to add this field customisation)
- Colour swatch and marketing status are missing from the data returned by the Hybris endpoint. There is a ticket in the Ops Support backlog to add these attributes
- Since we don't have the colour swatch data, the colour content model was not created in Contentful