If you’re considering moving from Shopify Plus to microservices-based commerce, this article will explain the benefits of the move, as well as teach you how to make the jump. We will talk about Shopify’s strengths and weaknesses, and how microservices and Fabric can help you avoid the latter.

Shopify is a good e-commerce system in many ways, but if you use it exclusively, then you have to accept its limitations. Moving all or part of your system away from it can help you avoid these limitations. Let’s look at some of the areas microservices can improve. 

  • Security: Shopify has been in the news regarding data theft before. Managing your own services means you’re free to address those concerns and implement additional security. Working with APIs means you can control the data flow in and out of your backend. It also means you can develop it incrementally, while building on what you already have. That means you don’t have to reinvent the wheel when you want to offer something new on the frontend.
  • Technical Limitations: One issue with Shopify is its lack of multi-store architecture, Also, while Shopify’s SEO approach is decent it is hard to modify. Using a custom frontend like Fabric XM allows you to modify the URL structure and robots.txt file.Shopify can also slow down as you add features. For example, its plugins don’t have to be certified. Handling services independently means you can ensure they continue to perform at the level you require
  • Flexibility: Shopify allows you to get up and running quickly, but you’re tied in to the way it does things. For example, Shopify apps aren’t always geared to work well internationally and can cost a lot if you have multiple local versions of your store. Data for multiple stores is also tricky to combine. With microservices and Fabric, you can add an API query doing whatever it is you need—you aren’t limited to what Shopify offers.

Once you know that microservices are the right choice, the next step is to create a plan to migrate each piece of your store from Salesforce Commerce Cloud to your new microservices. Because of its monolithic design, it isn’t necessarily easy to migrate from Salesforce Commerce, but by taking it piece-by-piece and starting with the most valuable functionality, you can start to see benefits early in the process.

Let’s take a look at some of the services Shopify Plus provides and decide what to implement using microservices.

  • Product Information Management (PIM): Your Shopify installation will include lots of product-specific data. Moving this to a separate backend like Fabric PIM with an API letting you retrieve, modify, and create new products, is a great place to start. Decoupling this data from Shopify means you can use it on any of the new channels you create. It gives you full control over what’s shared, and the formatting and structure can be defined however you like.
  • Order Management System (OMS): Your order management system includes your user’s shopping cart, as well as payments. You have to smoothly pass the data on to your payment handler and delivery setup while allowing users to track, and potentially cancel, the whole process. There’s a lot involved, and it's important for everything to run like clockwork. Fabric OMS can help with this. 
  • Other Supporting Services: Shopify Plus offers a whole suite of features and services. Some of these will matter to you more than others—priorities differ from business to business. When picking a feature to include, you should consider what you’d like to make available to channels other than Shopify, and also which areas have the most scope for improvement.

To integrate your new services with your Shopify installation, you can set up an API Gateway. That will let you reroute requests to your new backend. You could also adopt a service mesh model, which handles communication between your application components and lets you handle data flow between your existing application and external microservices.

To move data from your old system, you can export it to a CSV file, then use JavaScript to shift it across to your new microservice. You can do this as you go, creating a service, copying your data into it, then adjusting your API gateway to handle future requests from Shopify. 

 

Export Data from Shopify

Shopify Plus has a simple export system, letting you easily create a CSV file. Its documentation explains how to do this for product, customer, and order data, among other things. You can find an example file here.

Shopify product data includes the following fields:

RequiredRequired but can be blankOptional
HandleBodySEO title
TitleVendorSEO description
PublishedTypeGoogle shopping metafields
StatusTagsCost per item
 Image src 
 Image position 
 Image alt text 
 Gift card 

 

Your new system won’t have to use the same fields, so you can pick and choose which are relevant to you and which, if any, are required in your system. That kind of flexibility is one of the advantages of working with microservices. You can have a compact, faster system, or one that contains whatever extra information you need.There are more fields for products that have additional options and variants. Consult the documentation for details.

 

Import Data into Microservices

You can use JavaScript to transfer your data into your new system. Here’s an example showing how to import data using the latest version of Amazon SQS. You can find more details in Amazon’s documentation.

 

const { SQSClient, SendMessageCommand } = require("@aws-sdk/client-sqs");
const REGION = "us-east-1"; //or whatever your region is
const params = {
DelaySeconds: 10,
  MessageAttributes: {
Title: {
   DataType: "String",
   StringValue: "Sneakers",
},
Vendor: {
   DataType: "String",
   StringValue: "Comfy Sneakers Inc",
},
InventoryQty: {
   DataType: "Number",
   StringValue: "146",
},
Value: {
   DataType: "Number",
   StringValue: "79.99",
},
  },
  MessageBody:
"Product Data.",
  QueueUrl: "SQS_QUEUE_URL", //replace this with your queue URL
}
const sqs = new SQSClient({ region: REGION});
const run = async () => {
  try {
const data = await sqs.send(new SendMessageCommand(params));
console.log("Success, product sent. MessageID:", data.MessageId);
  } catch (err) {
console.log("Error", err);
  }
};
run();

 

Note: This article only begins to tell the story of migrating from Shopify Plus to microservices-based commerce with Fabric. We are currently creating a Shopify Plus migration playbook with more detailed information.

 

Last update: May 12, 2021

Have any questions?
Let's Talk.