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:
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:
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.