Identify the key components of a custom ecommerce integration
Klaviyo’s first major use case was with ecommerce businesses. While many people use popular ecommerce platforms such as Shopify, a large portion are using custom ecommerce sites that require custom-built integrations with Klaviyo. In order to build what we consider to be a “complete” ecommerce integration, there are a few key components that need to be included:
- Customer data
- Website activity
- Order activity
- Product catalog
In order to track all of this data appropriately, you must utilize both client-side and server-side APIs, depending on where the activity is taking place. For more details, follow our step-by-step guide on integrating an ecommerce platform without a pre-built Klaviyo integration.
Best practices for building custom integrations
Consistency is key in your success as a developer. These best practices apply to everything that you build and connect with Klaviyo including apps, ecommerce integrations, other site integrations, and workflow automations.
Standardize naming conventions
When naming custom events, use a past tense verb followed by a noun. Since metrics are triggered when someone takes an action, the name should reflect that action. This is how all native Klaviyo metrics are named, so following this scheme will help maintain consistency. Metrics from our native ecommerce integrations include:
- Active on Site
- Viewed Product
- Added to Cart
- Started Checkout
- Fulfilled Order
- Ordered Product
- Placed Order
- Refunded Order
- Canceled Order
Additionally, you’ll want to make sure that everything has a unique name, even between event properties and profile properties. If an event property shares a name with a profile property, the metric will not appear in the segment builder or in flow filter options.
Structure your data for segmentation
When building a custom integration with Klaviyo, you’ll need to determine which data to send to Klaviyo and how to structure it. Two of Klaviyo’s most powerful features are the segmentation engine and flow filtering. The way you choose to structure your data will influence how users can segment that data within Klaviyo. Make sure that all properties you want to segment on are sent at the top-level (not nested) of an event payload. Learn more about how to properly structure data for segmentation and filtering.
Choose a consistent unique identifier
The Profiles API allows you to identify and set properties on an individual customer profile. You can identify a user by email address, phone number, or unique customer ID (when you have an existing system that keys off a unique ID). We recommend using email address or phone number as the primary identifier. Unless you have a very compelling use case to use a unique customer ID and have a reliable system for customer ID management, our recommendation is to not use this identifier because it is difficult to manage properly and often leads to many unique IDs being used to identify the same person.
Explore the possibilities of what you can build
While ecommerce is a popular use case for Klaviyo developers, it is by no means the only use case to build for. Explore some of the other applications that are possible.
Integrate a ticketing or registration-based platform
Send timely event reminders, deliver e-tickets, and make personalized event recommendations based on a person’s previous event attendance history. Send user data from your ticketing system or registration platform to Klaviyo to trigger automated flow messages or create segments to deliver more relevant content to users. Use the Universal Content API to manage email content.
Learn more about integrating a registration-based system with Klaviyo.
Integrate a subscription-based system
Klaviyo’s flow and segmentation capabilities make it a superior tool for automating communications around subscriptions and recurring orders. Integrate your custom subscription platform with Klaviyo using server-side Profiles and Events APIs to send subscription data in real time.
Learn more about integrating a subscription ecommerce platform with Klaviyo.
Integrate a content-based platform
A catalog is not strictly limited to physical products. If you run a digital publication, blog, or another content-based site, you can leverage Klaviyo to deliver relevant content to subscribers based on their content consumption history. Use a custom catalog feed to send an XML or JSON feed of website content to Klaviyo.
Learn more about integrating a content-based platform with Klaviyo.
Build an app for Klaviyo to help other businesses
Klaviyo serves well over 100,000 users spanning a wide range of industries, sizes, and geographies. If you’ve got an idea for an app that may help a niche market, Klaviyo can give you exposure through our Tech Partner Program. Ready to share your app idea with us?
Submit your idea and join our partner program. We’ll help you get started building a best-in-class app.