Skip to content

klaviyo-developer-challenge-april-2023-python-sdk

View Readme
View Code

Welcome to the Klaviyo Developer Challenge for April 2023! This month's challenge will focus on our new Predictive Analytics API, which can be used in association with any operation that retrieves a profile or profiles. Predictive analytics brings you a rich suite of data-science based statistics, including data on Customer Lifetime Value (CLV), churn probability and expected date of next order.

You are tasked with the following:

  • Given a profile ID, find the predicted CLV of the profile
  • Given a segment ID, find the average predicted CLV of the segment
  • Rank all segments in your account by average predicted CLV

IMPORTANT: Not all profiles will have CLV metrics based on the data available in your Klaviyo account; for the purposes of this challenge, feel free to mock API responses if your account is not yet able to receive CLV metrics. That said, your code should still work even if a profile has null values for its predictive_analytics data.

We are excited to offer you an in-browser development environment through Napkin.io! Klaviyo acquired Napkin in November and we are using it internally for a variety of key functions and hope you will do the same. For this challenge, please submit your answers as a Napkin function by following the steps below:

  • Create an account in Napkin - you can sign up via Google, GitHub, or email
  • Clone this Napkin function
  • The cloned function will give you some boilerplate code that allows you to make API calls with our SDKs. Once you have cloned the function, you must get a private API in your Klaviyo account and add it to your Napkin environment
  • Once you have your private API key, set it as your KLAVIYO_PRIVATE_API_KEY under “Other” in your Napkin function like below

Once you have your solution, share your Napkin function. You can get a URL to your public function by clicking Share and making the function public. Please submit your Napkin URL and other details to this form.

Good luck! And please feel free to email developers@klaviyo.com with any questions.

Information
Last Updated
6/23/23 @ 11:06 AM
Developed by
Napkin Team
Language
Python
Tags