Shopify to Oracle Content Management Migration Guide

Shopify to Oracle Content Management Migration Guide

First off; why would you need to migrate or duplicate content from Shopify to another CMS? Marketing, Marketing and marketing.. Shopify is a great eCommerce platform but it lacks all the bells and whistles marketeers need and want when finding and promoting products, goods and services across multiple channels web, print, video and email.

Often these commerce platform like Shopify or big commerce are integrated with ERP systems ie Oracle Netsuite that help - with inventory management, automate order management and simplify finance & accounting etc. This can be then used as a centralised platform to sync content updates across OCM and Shopify.

Oracle Content Management makes life easy for marketeers giving them access to a centralised repository that enables them to -

  • Easily locate assets using
      - Collection groupings
      - Enhanced metadata mappings
      - Taxonomy classifications
      - Content Smart tagging and dynamic references
  • Enabling reuse of assets for other campaigns & channels
  • Work closely with the digital teams

On the creative side Designers and digital artists can enhance or create new assets using their native application such as creative suite and auto pull/push and update the native asset on OCM with the added safety of version control - in turn this gives them greater power and allows them to see and share content structure and mappings as well as the ability to quickly change artwork, or create new content renditions without the need of leaving their design tools. - There is also the ability for marketeers to make comments against assets to streamline the flow of content creation and basic workflow to review approve and publish assets once ready.

Oracle Content Management can also be used for Hi-Res print ie flyers, banners or re-use with the OOTB rendition creation for the web and soon with a new addon the ability to create emails templates for campaigns that can be deployed on platforms such as Responsys and Eloqua.

Content Migration Setup + Code

With that said lets jump into the code and get content copied across from Shopify to OCM. I've created a quick rough git repository here if you want to dig in right away and see how I've done it..

GitHub - JohnRSim/Shopify-OCM-Product-Migration: Demo code providing a sample on how to quickly copy and map Product content from Shopify to OCM
Demo code providing a sample on how to quickly copy and map Product content from Shopify to OCM - GitHub - JohnRSim/Shopify-OCM-Product-Migration: Demo code providing a sample on how to quickly cop...

OCM Setup Guide

Create Digital Asset Type

For the product image and gallery - we could use the OOTB "Image" digital asset type but then you are going to loose data ie alt tags, seo etc that you could map across from shopify - so lets create a new Digital asset type and add some sample fields to map data across to.

Head over to Content >> Asset Types and select the "Create" link in the top right corner.

  1. Create Asset Type

Let's create the Asset type "Web-Image" - make sure you select asset type as Digital Asset from the bottom.

2. Define Media Types against asset type

From here lets define the "Media Types" that can be of type "Web-Image" - I'll add a few of the common types, jpg, png, svg, webp but feel free to add more or less - we will just be migrated jpgs from shopify so make sure that is in.

3. Define the metadata definition

Select the "Definition" tab.
From here you can drag and drop the fields you want to assign meta data against as this is for our web-image asset type lets add "alt tag" and "title" text fields.

Drag and drop the "Text" data field into the definition.
Add the field info as follows -

Select the "Next" button
- you can define the field length if needed.

Select the "OK" Button and do the same for the title field.

4. Optional "Friendly URL"

I always set this up on my asset types - it makes it a lot easier to reference content instead of using a content ID. Select the "Friendly URL" tab and enable friendly URL.

Create Asset Type for Product data

Finally create a product asset following the same steps as above but this time on create make sure to select Create Content Item type not Digital Asset and add the fields you want to map across from shopify against the product.

Create Repository

Head over to Content >> Repositories and select the "Create" link top right hand corner.

Add a repository Name and assign the asset types you created ie Web Image, Product etc. and select the "Save" button.

You'll need to grab the Respository ID so we can tell the script where to create the assets.

Select the Side Panel Drawer icon and then the "API" tab this is where you can copy the respository ID from.

Configure Migration Script

First Follow the instructions in the github for the setup of the project.

Asset Type Field Mappings

Next lets take a look at the code and run through how the field mappings work for the images and product asset.

Take a look at line 27 of the createDigitalAsset method.
In the fileMeta object you should see a fields object this is where you can take you shopify product meta information passed as an object called assetInfo and assign the data to fields you have created within your asset type.

You can also define additional data ie. tags, taxonomies, collection, channel info so users won't need to manually go through and update.

This is the same for the createAsset method - update the fields key property value mappings.

Preprocessing Images

There may be times where you need to preprocess the image pulled from Shopify for example at the time of writing there was an issue on OCM where the renditions engine did not support JPG Progressive images and so I needed to convert Images from progressive to lossless before uploading to OCM otherwise the renditions would appear red with blurred scanlines.

To do this I setup sharp - a high performance Node.js image processing library. You can access the documentation here if you need to use it -

That's it hopefully this will save you some time and enable you to quickly copy across products from Shopify to OCM. - If you need any help please raise an issue this is just a rough code example.