Create a top-selling items page in your Shopify store

This example shows how you can build a top sellers page for your Shopify store in Parabola without writing a single line of code. If you don't use Shopify, don't worry: Parabola is very flexible and can work with Webflow, Weebly, Squarespace, Wix, you name it – it works.

Create a top-selling items page in your Shopify store

Pulling Shopify orders into Parabola

Parabola's generic API Import step makes it easy to pull in data from practically any web service. Connecting to Shopify is no different.

You'll want to drag out a new API Import step. Select 'Username & Password' from the authentication menu and supply your account id and password. Next, configure the url like so:

Finding the best selling items

Next, we utilize a series of Parabola transforms to trim the (hopefully long!) list of matching orders to only the top ten best sellers. We use Row Filter to filter for only complete orders, then the JSON Flattener to expand the order details.

We group (Group By) the items to count how many of each were sold, and Sort by the number sold – now the items are stack ranked by sales volume! Finally we use Row Numbers combined with another Row Filter to select only the top ten most sold items.

Creating and updating the page

For this next bit (the fun part), you'll want to go ahead and create a collection in Shopify and make a note of its id.

Back in Parabola we'll use another API Import to fetch your Shopify collections, and then use a row filter to grab the collection you just created. We use an API Export step to delete existing products from the collection, then do something a bit funky to cross join the collection id to the list of best selling items we create earlier. If you don't know what a cross join is, don't worry; it's just a fancy way of saying we want to make sure the collection id is present in every row of data from step two.

Syncing the updated collection to Shopify

Now we have a list of top selling product ids, and a collection id that needs to be updated. In order to have Shopify understand the message we plan to send, we need to merge the product ids & collection ids and wrap them in a bit of JSON.

We can do this using Parabola's Text Merge step. This step lets you create a new column in your data based on the values of existing columns. We use a special curly-brace notation to let Parabola know when we want it to substitute a value from our data. The step configuration winds up looking like this:


After that, we use an API Export step to push the data back to Shopify! The URL we need to fill in is a bit different this time, but you'll use the same username & password configuration from earlier:

That's it - we're done! If any of this was confusing or you have questions about extending this example to support a more specific use case, please drop us a line on Intercom (the chat thingy on our site).

Start automating with Parabola

Parabola is free to use for teams of any size. We also offer paid plans with additional features and support.