Wishlist API: New Targeted Marketing Capabilities Now on BigCommerce

Charles Ho
BigCommerce Developer Blog
4 min readMar 22, 2019

As of June 18, 2019, the Wishlist API is out of beta and in general availability.

Shoppers are trying to tell us what they want — if only we’ll listen. Products saved to wishlists represent a window into the thoughts, desires, and behaviors of shoppers. The BigCommerce Wishlist API, now in open beta, enables developers to tap into this valuable body of data.

With the Wishlist API, you can read, create, and update shopper wishlists. The Wishlist API enables you to build applications that:

  • Provide analytics reporting to help merchants understand which products are most frequently added to wishlists (and how that influences purchases)
  • Allow shoppers to create shareable gift registries
  • Create targeted promotions and advertising campaigns
  • Import wishlists and bring them across to BigCommerce after re-platforming

How We Built It

We first prototyped the Wishlist API during an internal Hackathon. Twice a year, our engineering, product, and design teams worldwide participate in Hackathons, spending 48–96 hours working to ship experimental and innovative features. It’s a time for creativity and teamwork, and our Hackathons have also been the genesis of many features that made their way into the core platform, including Wishlist API.

With the Wishlist API, our goal was to open an area of the platform that had previously been closed to third parties. This supports our mission of being the world’s most open SaaS platform, as well as our headless and Commerce-as-a-Service (CaaS) initiatives.

The Wishlist API Basics

The Wishlist API is simple but powerful. Normally, shoppers create wishlists by clicking the Add to Wishlist button on the product details page, adding the product to a list they can view from their customer account. Merchants can view their customers’ wishlists by logging into their customer’s account through the Admin panel.

At least, that’s been the flow until today.

The Wishlist API decouples the logic of wishlists from the UI, opening the door for third-party developers to create any kind of wishlist experience they can imagine. Add products to wishlists from a modal or anywhere on the storefront — or even from a third-party management tool or external, headless storefront. The Wishlist API allows access to wishlist data without having to log in to a customer account.

Once wishlist data has been extracted from the store, it can be consolidated and analyzed to pull out meaningful insights. Not only that — in conjunction with our other server-to-server APIs like Cart and Checkout, the Wishlist API can even be used to build flows that take the shopper from wishlist to purchase completely end-to-end.

The Wishlist API includes methods for retrieving all wishlists on a store, or working with individual wishlists. You can modify and manage a wishlist by changing its name, the customer ID it’s assigned to, and whether the wishlist is public or private. And of course, you can add or remove items, or delete wishlists.

Demo

Let’s do a quick demo to illustrate what you can do with the Wishlist API. We’ll run through a high level blueprint of how you might build an app that creates a wishlist based on a shopper’s abandoned cart contents.

The Wishlist API falls under the Customers scope, so you’ll need to generate API credentials with the Read Customers scope before using the Wishlist API. For a refresher on making BigCommerce API calls, see our Quick Start guide.

1. Register Abandoned Cart Webhook

To receive a notification to your application when a shopper has abandoned a cart on the storefront, register the store/cart/abandoned webhook. Carts are considered abandoned when one hour elapses after the cart’s last modified date.

The webhook payload will contain the Cart ID, which you can use to view the cart’s contents and see the ID of the customer associated with it:

{
"scope": "store/cart/abandoned",
"store_id": "12074048",
"data": {
"type": "cart",
"id": "5356d184-5eea-4392-9eef-351dd1ca3339"
},
"hash": "1dc40dc8d00386974b4d79991739705b172484b0",
"created_at": 1518406246,
"producer": "stores/ojgwnqqd0g"
}

2. Create a Wishlist with Cart Contents

Use the Cart ID to retrieve the cart and read the product IDs. You can now use those IDs to create a wishlist with the same products that the shopper selected on the storefront, and assign the wishlist to the customer’s ID. Once assigned, the customer will be able to view the wishlist when they log in to their account.

POST: /wishlists{
"name": "My Saved Products",
"items": [
{
"product_id": 77,
"variant_id": 1
},
{
"product_id": 80,
"variant_id": 1
},
{
"product_id": 81,
"variant_id": 1
},
{
"product_id": 86,
"variant_id": 1
},
{
"product_id": 88,
"variant_id": 1
}
],
"customer_id": 10,
"is_public": true
}

3. Send the Shopper a Notification

When you retrieve an abandoned cart’s contents, the payload will also contain the email address of the customer associated with the cart. Your app could close the loop by emailing the customer a notification to let them know that you’ve made it easy for them to keep track of their favorite products by saving their cart to a wishlist that they can access any time from their customer account page.

Wishlist App sample notification

Conclusion

With the Wishlist API, developers can build innovative applications that give merchants a new level of insight into their shoppers’ behavior and UI interactions that go beyond the native storefront. We’re excited to see how the developer community incorporates this new API into the solutions they build for BigCommerce merchants.

During the beta period, all developers building on BigCommerce will have access to the Wishlist API to begin testing, experimenting, and innovating. Most importantly, we need your feedback — tell us how you’re using the Wishlist API, what you’re building, and any improvements we could make.

Please submit your feedback here.

--

--

Charles Ho
BigCommerce Developer Blog

Product Manager at BigCommerce. Based in Sydney, Australia.