Absolute Antibody Case Study: Syncing Products via the WooCommerce API

Founded in 2012 in Oxford, UK, Absolute Antibody Ltd are experts in antibody sequencing, engineering and recombinant manufacture. Their mission is to bring therapeutic grade antibodies to the research and diagnostics market. This quest has lead to an extremely complex product catalog.

Over the last year, we at Electric Studio have partnered with Absolute Antibody to rework their website. The primary aims were to improve the customer experience and reduce the amount of repeated information on the site. This meant that we had to understand their product catalog, which without a related degree was no walk in the park! Each antibody product is based on a specific clone, and each is sold in a variety of sizes and conjugations with different price points.

The Absolute Antibody site features an extensive catalog of reagents for research and diagnostic use, including antibodies against viral antigens

Based on our previous experiences we chose to implement a solution using WooCommerce. We used a combination of WooCommerce’s native grouped and variable products to represent the catalog in a way that matched the Absolute Antibody product structure.

We integrated the site with ElasticSearch to improve the speed of the search and category pages. We did this using a hosted solution with Elastic Cloud and utilizing ElasticPress to index the product data, with some additional customizations to mostly limit responses to grouped products. This improves the navigation of the product catalogue, helping people to find the antibody they need more quickly.

The product page on the site was designed to allow all of the relevant information to be shown at the right time without repetition. It is based on the grouped product, and using Ajax calls to pull in different levels of product information users can easily switch between antibody products based on a given clone. Buyers can quickly see and select the appropriate size and required conjugation.

An antibody product page using Ajax calls to pull in different levels of product information

The Sync Tool: From 8 hours to as little as 20 minutes

Of course, the product catalog already featured over 4,500 antibody products, grouped under 800+ clones and each having up to fifteen variations – altogether around 50,000 different products. There was no way that an editor was going to add each of these products into the new website manually! A sync tool was required.

Absolute Antibody already had a sync tool for their previous site. However, it had been built before the WooCommerce REST API had been available and was built for a substantially different site structure. It was decided to rewrite the tool from scratch to take advantage of the latest improvements in the WooCommerce API. The product data is currently stored in a Microsoft SQL Azure database, for which Absolute Antibody already had a Dreamfactory installation to enable an interface with Salesforce.

We decided to use Laravel to write the new sync tool with a WooCommerce API library, and to utilize the current Dreamfactory installation to access the data securely. We pulled the data into a local database, which enabled us to add web-specific details at this point – e.g. to store the product IDs and compute the product categories. We then pushed this data into the website via the WooCommerce API – creating the variable products first before adding the variations, and then creating the grouped products once we have product IDs for all of their children.

We also built a small additional API to allow us to sync the image data (including captions) for the products through to the website. This API piggy-backs onto the WooCommerce Rest API authentication, making the calls more secure. The images can be uploaded to the media library on the website as usual, and the API only adds the data once the images are present.

Users are able to select a custom conjugation for their selected antibody on demans

Obviously with 50,000 products the speed of the sync was of great importance: the faster the sync, the more frequently it can be run and the better the site stays up to date. The previous sync took between eight and twelve hours to run a complete product sync, which obviously is not something that can run regularly.

The faster the sync, the more frequently it can be run and the better the site stays up to date.

We put a lot of work into the efficiency of the code, looking at everything from the structure of Dreamfactory API queries, where best to manipulate the product data, and even optimizing the batch size to push to WooCommerce. The new tool can complete a full product sync in four to six hours – around half the time of the old sync! That was a big improvement but still quite a chunk of time…

By pulling the data into an intermediate database we were able to mark which products have changed since the previous sync. This means that we can do an incremental synchronization which can take as little as twenty minutes – depending on how much has changed. This is a sync that can be run multiple times a day, keeping the products up to date.

The future

Absolute Antibody are continuing to grow, with both new offices and more products. Using WordPress and WooCommerce they now have a clean site that will be able to grow with them. We look forward to continuing to work with them as they do.

—————–

Dr Ellie Martin is a senior backend developer at Electric Studio, a WordPress agency based in Oxford, UK.

Ellie Martin Avatar

About

11 comments

  1. Yeah, I love woocomerce api

    Lora
    septiembre 14, 2018
    • Woo!

      Marina Pape
      septiembre 24, 2018
  2. We are also think to build my own store on the woocomerce.

    Brenda Loew
    septiembre 14, 2018
    • We’re excited that you’re considering Woo, Brenda!

      I see that you already sell your books on Amazon – you may be interested to know that we have an Amazon Pay integration that enables customers to purchase on your site using the payment and shipping information in their Amazon accounts:

      https://woocommerce.com/products/pay-with-amazon/

      Thanks for reading the blog, and all the best with your eCommerce journey. 😊

      Gareth Allison
      septiembre 18, 2018
  3. We love it and thanks for this your valueable case study.

    Flyttfirma Malmö
    septiembre 15, 2018
  4. Thanks for sharing amazing info and keep posting

    Diabetes
    septiembre 18, 2018
  5. Thanks for sharing this interesting case study. I’m trying myself to work with Woo API.

    James
    septiembre 18, 2018
    • Exciting! You should join the #developers channel in the WooCommerce Slack, lots of friendly people in there who would lend a hand > https://woocommerceslack.herokuapp.com/

      Marina Pape
      septiembre 21, 2018
  6. Absolute Antibody Case Study: Syncing Products via the WooCommerce API Nice post

    frpbypassapkpro
    septiembre 19, 2018
  7. I love the speedup process to the API when sync. Hopefully This will Help lots of Woocommerce user around the world.

    Lewis Pearson
    septiembre 20, 2018
  8. i really like the speedup process to the API when sync. hopefully this can assist lots of Woocommerce consumer around the world.

    Wp hound
    septiembre 25, 2018

Stay up to date with WooCommerce emails

View our privacy policy. You can unsubscribe anytime.

Subscribing...

There was an error subscribing; please try again later.

Thanks for subscribing!
Emails will be sent to

You're already subscribed!
Emails are sent to

Usar sus datos personales
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.