Why do we care about APIs?
Imagine all of the software in your tech stack works independently. Your ecommerce store runs independently of Klaviyo, which runs independently of your loyalty programs and shipping software.
One of your loyalty customers recently made a purchase, but they reached out to support because they never received a shipping confirmation. Upon chatting with support, they found that their loyalty points weren't applied to their purchase.
This is not only a frustrating customer experience, but it reduces the power of all of the software you rely on. Each piece of software in your tech stack relies on information from all of the others in order to keep your business running smoothly and efficiently.
APIs are instrumental in allowing all of these pieces of software to communicate with one another, and many of the integrations and software that you already work with rely on APIs.
Understanding how to craft, send, and troubleshoot API calls can help you understand the integrations you are already using and learn how to take Klaviyo to the next level.
Discover how APIs impact brands
The following use cases highlight some of the ways Klaviyo's APIs have helped brands communicate with their customers.
Report on message performance
Nani Skincare is looking to do a deep dive on how all of their campaigns in the last 6 months performed. They are specifically looking at conversions; they want to know the conversion rate and average order value for each campaign, in addition to open and click rates.
To set this up, Nani used the Query Campaign Values API endpoint. With one API call, they can see detailed reports on every campaign they have sent out in a given timeframe.
Nani then automated this, making an API call on a monthly basis to analyze monthly campaign performance. This enabled them to quickly identify their highest- and lowest-converting campaigns, and adjust their sending strategy accordingly. Since then, they’ve been able to see the impacts of their changes, and continuously evaluate and iterate on their optimal sending strategy.
Integrate POS data into Klaviyo
WineDirect is a software used by wineries to manage inventory and handle ecommerce and POS purchases. WineDirect has enabled hundreds of wineries to sell wine directly to consumers.
Wine sales happen largely in person, as customers visit wineries and book tastings. Klaviyo partner Best Worlds was able to build a custom integration with WineDirect to help bridge the gap between POS activity and digital communication.
With this integration, when customers book a wine tasting, the integration calls the Klaviyo Create Event endpoint to send a custom "Booked wine tasting" event into Klaviyo.
The integration also syncs a customer's wine club membership status and all of their orders into Klaviyo.
With this data synced into Klaviyo, WineDirect is able to send personalized messages to their customers after their tastings. They send different messages based on wine club membership status and whether or not the customer purchased any wine after their tasting.
Check out Klaviyo's Developer Blog to read more about how Best Worlds developed this integration and helped wineries communicate with their customers.
Track unsubscribes with a custom event
Bola's Baked Goods noticed a recent uptick in unsubscribes. Obviously, something is going wrong, but they want to know what - are they sending too many emails? Are the emails not engaging enough? Are customers overloaded with emails in addition to social media ads?
To resolve this, Bola's used a custom hosted unsubscribe page. On this page, they asked customers why they wanted to opt out of email marketing:
Once customers click Unsubscribe, Bola's uses Klaviyo APIs to send a custom "Submitted Unsubscribe Reason" event into Klaviyo. This event contains the unsubscribe reason the customer selected and updates a custom profile property with this reason as well.
Now, Bola's has a deeper understanding of why customers are unsubscribing and can tailor their marketing efforts accordingly. They can create custom reports in Klaviyo to understand unsubscribe reasons over time and make sure they communicate with their customers in the right way.
You can read more about how to implement this solution in this Solution Recipe.
Internationalize a product catalog
SWAK, a cosmetics and beauty brand, recently expanded sales from their home base of the UK into Germany, Spain, and France. They've found themselves with many more customers from these additional countries, along with more languages and currencies to handle.
To properly internationalize their products, SWAK used the Catalogs API. This allowed them to update their catalog to have different products in each language and currency.
Now, German shoppers see German product names, while English shoppers see the same product in English. The products can still be used with Klaviyo's product blocks, meaning each shopper gets recommendations personalized not only to their browsing history, but to their language preference as well.
SWAK can also use this data to track performance of different products in different regions, informing their overall product and marketing strategy.
Follow along with the steps in this Solution Recipe to implement a similar strategy.
APIs are everywhere
Klaviyo's APIs can be used to modify and report on every part of Klaviyo's data model.
Keep these examples in mind as you start working through making your own API calls. Consider what worked for these brands and what customization can do for you.