If you’re selling products online, there’s a good chance you’re using a one-size-fits-all platform. These platforms offer many advantages, but they also have limitations. If you want to move beyond these limitations, microservices can help.
Shopify Plus is a one-size-fits-all platform that allows you to use headless systems while retaining most of its features. So if you already have a Shopify Plus setup, you can keep the frontend and migrate the backend to a microservices-based alternative for more flexibility.
In this post, we’ll explain why businesses are moving away from monolithic e-commerce platforms like Shopify Plus and how they are doing it from a high level.
Note: We’ve written before about migrating away from classic e-commerce monoliths like Salesforce Demandware. As you’ll see, many of the same concepts and migration practices apply to modern monoliths like Shopify Plus.
Shopify is a fantastic system in many ways, but you have to accept its limitations if you use it exclusively. Moving all or part of your system away from it can avoid these problems. Let’s look at some of the areas microservices can improve.
You can take advantage of the modularity of microservices to move from Shopify bit by bit. Identify what you can benefit most from replacing and build it. If you do that repeatedly, you can move away from Shopify step by step, improving your service with minimal disruption.
Let’s look at some of Shopify Plus’s services and decide what to implement using microservices.
Your Shopify installation will include lots of product-specific data. Moving this to a separate backend, 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 complete control over what’s shared, and the formatting and structure can be defined however you like.
fabric has a prebuilt PIM system that will help you transition quickly and easily and offers you plenty of flexibility. As well as helping you get set up, fabric can also help with data migration.
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 everything needs to run like clockwork.
Taking control of this area means you can evolve it over time and perfect everything, adding features for the various frontend services you want to use while ensuring the core functionality is rock-solid.
fabric can help with this, too. Its OMS promises a friction-free experience that can drive customer satisfaction and make life easier for everyone involved in your order and delivery chain.
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 which areas have the most scope for improvement.
These might include store management, customer personalization, or analytics. Take a look at the features fabric offers to see what it can do for you in those areas.
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 manage data flow between your existing application and external microservices.
With a new layer in place, you can look at replacing services one by one, thoroughly testing each stage, and ensuring the new process is fully integrated before moving on to the next.
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, create a service, copy your data into it, and then adjust your API gateway to handle future requests from Shopify.
Shopify Plus has a simple export system, letting you easily create a CSV file. Its documentation explains how to do this for a product, customer, and order data, among other things. You can find an example file here.
Shopify product data includes the following fields:
Required | Required but can be blank | Optional |
---|---|---|
Handle | Body | SEO Title |
Title | Vendor | SEO Description |
Published | Type | Google shopping metafields |
Status | Tags | Cost per item |
Image Src | ||
Image Position | ||
Image Alt Text | ||
Gift Card |
There are more fields for products that have additional options and variants. Consult the documentation for details.
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.
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();
As you expand your microservices and move functionality away from Shopify, it’s essential to test thoroughly. This should be done at every stage. You need to have a rigorous testing system to ensure everything is still working smoothly, including the area being moved and everything else.
Taking a section by section approach means you can focus on a particular service and know where to look should any problems arise. That makes issues easier to fix and the overall adjustment smoother.
In addition to finding errors, it’s helpful to have metrics that measure the speed of transactions. If you can connect these to sales and customer retention, all the better.
Shopify Plus is an excellent platform with much to like about it, but the world is moving away from one-size-fits-all software toward more flexible, customized solutions.
Building services yourself is very achievable, but there is plenty of support available, so you don’t have to go it alone entirely. An existing solution can save you time and money, and as these services mature, the argument for that route gets stronger.
Consider taking advantage of prebuilt or customized microservices with fabric to quickly build a system that offers adaptability for new challenges and opportunities based on solid, reusable foundations.
Tech advocate and writer @ fabric.