Skip to main content

Catalog Sync

In this guide, we'll take a look at how to use Alloy to configure Catalog Sync workflows with popular e-commerce applications

Use Case Overview

Let's assume you're building an app that needs to sync catalog data from an e-commerce system such as Shopify to another application your business uses internally. You need to first obtain a historical listing of all the relevant products and then subscribe to realtime events each and every time an product is created or updated.

To do this, we'll build a few workflows. Our first workflow will grab the historical list of all available products. The next workflow will subscribe to all catalog updates so you can be alerted each and every time an update occurs on a product.

Time to dive in!

Syncing Historical Catalog

Create a new workflow. For the trigger, we'll select "On Installation" as our trigger. This trigger tells Alloy to only run this workflow once, on your initial install.

Next, add a e-commerce connector. For our demo, we'll use Shopify but you can easily use others like BigCommerce, Adobe Magento, WooCommerce, etc. Select the list all products action.

Lastly, add a Stream Data connector. This connector will tell Alloy where to send all the catalog records to. Specify a destination URL of your choosing. You can see an example of this workflow below.

Realtime Catalog Updates

Lastly, let's create a workflow that alerts us each time a product is updated in our e-commerce system. For this workflow, we'll choose the Shopify Trigger as our starting point and subscribe to the Product Updated event.

Add a Stream Data connector to send over the product payload in real time to your application. You can see an example of this workflow below.

Wrapping Up

As you can see, it's easy to create workflows that subscribe to both historical and realtime catalog data in e-commerce systems. Let's take a look at what we covered in this tutorial:

  1. We used the On Installation connector to run a historical sync to fetch all historical Catalog records and send it back to your application.
  2. Then, we set up another workflow to notify and update us whenever a Product record is updated.