How can I link my online store to an external database?

Hi,

I have an online store hosted on Shopify.

And I also have an external database that contains specific data that I’d like to display in my online store.

I was thinking about building a custom API and deploy it somewhere (doesn’t matter) and then make that a new page in my online store and make it use that api to query data from my database.

Is that possible ? If so, are there any tutorials things I can start searching ?

Thanks !

I’m a little unclear on the actual need, but you’ve given me enough to get a very general idea.

This would be something approached with things like:

  1. Creating the middleware between Shopify and your system. When you add content into your side, something triggers and the middleware uses the API to update the object on Shopify. Perhaps it is directly editing the content like a description, or perhaps you’re adding content like a metafield.
  2. Or add JavaScript on the page that requests info from your system. So you would be creating a public endpoint that can be queried and the JS would do something with whatever is returned.

Don’t know enough about your need to be able to say which is the better option for you - if any.

For API things, the docs really are the best place to start.
https://shopify.dev/concepts/shopify-introduction

Hi Jason,

Thanks for the reply, I’ll explain better.

I want my customers to be able to track the position of their orders in the “queue”.

So the line items are treated in a special way in my custom backend, I give them a custom id let’s say ( not shopify, one that I have built) and so each line item will also have a position in the queue.

What I want is, have a page in my online store where my customers can enter that ID that I give them in a page in the online store, then they will get the position of that line item in the queue.

To do this, my online store needs to query my external database.

Does this give you a more clear idea ?

Thanks.