Build custom functions with Code

Build custom functions with Code

Learn how to use Code to write, test, and deploy custom Python and JavaScript functions in Klaviyo.

rate limit

Code not recognized.

About this course

This course introduces Code, an Integrated Development Environment (IDE) directly in Klaviyo CDP. Code allows you to run functions directly in Klaviyo in response to Klaviyo events. Writing Code functions allows you to build unique customer experiences, simplify your tech stack, and save you time and money, all while increasing your functions' security. Get creative and start coding in Klaviyo today.

By the end of this course, you should be able to:

  • Communicate the business benefits of using Code.
  • Determine when to use Code vs webhooks.
  • Use all components of the Code editor.
  • Implement a custom function in the Code editor that triggers based on desired events logged in Klaviyo.
  • Troubleshoot function errors.
  • Create functions for your business needs.

Take this course if:

You want to create unique customer experiences by running custom code directly in Klaviyo.

Prerequisites:

In order to write and edit functions in Code, you will need to have prior knowledge of Python or JavaScript. 

However, you can still take this course if you do not know how to write code. This course will provide an overview of what Code is and how it can benefit your business, and it will also introduce a library of pre-written Code recipes that can typically be run with minimal configuration.

Michaela's headshot
Michaela Fooksa is a developer education specialist at Klaviyo with a background in education and computational biology. When not at work, you can find her exploring local trails on skis or on foot or curled up with a book. Connect with Michaela on LinkedIn or the Klaviyo Community.

Curriculum59 min

  • Determine when to use Code
  • What is Code? 4 min
  • Choose when to use Code over webhooks 7 min
  • Knowledge check 2 min
  • Build functions with the Code editor
  • Navigate the Code editor 3 min
  • Create and test a function 6 min
  • Monitor your functions with logs 4 min
  • Knowledge check 4 min
  • Create functions for your business needs
  • Restructure event data for use in segmentation 2 min
  • Use Code to consolidate your tech stack 2 min
  • Import modules to expand the power of your functions 2 min
  • Start building with Code 2 min
  • Next steps
  • Final exam 20 min
  • Resources 1 min
  • Feedback

About this course

This course introduces Code, an Integrated Development Environment (IDE) directly in Klaviyo CDP. Code allows you to run functions directly in Klaviyo in response to Klaviyo events. Writing Code functions allows you to build unique customer experiences, simplify your tech stack, and save you time and money, all while increasing your functions' security. Get creative and start coding in Klaviyo today.

By the end of this course, you should be able to:

  • Communicate the business benefits of using Code.
  • Determine when to use Code vs webhooks.
  • Use all components of the Code editor.
  • Implement a custom function in the Code editor that triggers based on desired events logged in Klaviyo.
  • Troubleshoot function errors.
  • Create functions for your business needs.

Take this course if:

You want to create unique customer experiences by running custom code directly in Klaviyo.

Prerequisites:

In order to write and edit functions in Code, you will need to have prior knowledge of Python or JavaScript. 

However, you can still take this course if you do not know how to write code. This course will provide an overview of what Code is and how it can benefit your business, and it will also introduce a library of pre-written Code recipes that can typically be run with minimal configuration.

Michaela's headshot
Michaela Fooksa is a developer education specialist at Klaviyo with a background in education and computational biology. When not at work, you can find her exploring local trails on skis or on foot or curled up with a book. Connect with Michaela on LinkedIn or the Klaviyo Community.

Curriculum59 min

  • Determine when to use Code
  • What is Code? 4 min
  • Choose when to use Code over webhooks 7 min
  • Knowledge check 2 min
  • Build functions with the Code editor
  • Navigate the Code editor 3 min
  • Create and test a function 6 min
  • Monitor your functions with logs 4 min
  • Knowledge check 4 min
  • Create functions for your business needs
  • Restructure event data for use in segmentation 2 min
  • Use Code to consolidate your tech stack 2 min
  • Import modules to expand the power of your functions 2 min
  • Start building with Code 2 min
  • Next steps
  • Final exam 20 min
  • Resources 1 min
  • Feedback