Articles on: Klaviyo Integration

Using GoodAPI Events and Data in Klaviyo

Using GoodAPI Events & Data in Klaviyo


When you connect GoodAPI to Klaviyo, we automatically send environmental impact data every time one of your customers makes a purchase. This guide explains exactly what data is available and how to use it in your Klaviyo emails.


How It Works


Every time a customer places an order that generates environmental impact (trees planted or plastics removed), GoodAPI sends an “Impact Created By Purchase” event to Klaviyo. This event carries detailed data about the order’s impact, the customer’s lifetime impact, and your brand’s total impact.

GoodAPI also updates customer profile properties on each event so you can use lifetime impact data in any Klaviyo email — not just flow emails triggered by the event.


The “Impact Created By Purchase” Event


This is the core event sent to Klaviyo. It fires automatically when a customer’s order generates environmental impact.


When does it fire?

  • A customer places an order on your Shopify store
  • The order results in at least one tree planted or one plastic removed
  • Your Klaviyo integration is connected and active


Event Properties (Order-Level)


These properties describe the impact from a single order. Use them in flow emails triggered by the “Impact Created By Purchase” event.


Property

What It Is

Example Value

Klaviyo Template Tag

num_trees

Trees planted from this order

3

{{ event.num_trees }}

num_plastics

Plastics removed from this order

5

{{ event.num_plastics }}

pounds_plastic_removed

Pounds of plastic removed from this order

0.23

{{ event.pounds_plastic_removed }}

order_id

The Shopify order number

#1042

{{ event.order_id }}

first_name

Customer’s first name

Jane

{{ event.first_name }}

last_name

Customer’s last name

Smith

{{ event.last_name }}

customer_id

Shopify customer ID

7849302

{{ event.customer_id }}

shop_name

Your Shopify store domain

mystore.myshopify.com

{{ event.shop_name }}

impact_type

Your store’s impact mode

per_order

{{ event.impact_type }}


Event Properties (Customer Lifetime Totals)


These are also included in each event and represent the customer’s all-time impact across every order they’ve placed.


Property

What It Is

Example Value

Klaviyo Template Tag

customer_total_num_trees

Total trees planted by this customer (all orders)

12

{{ event.customer_total_num_trees }}

customer_total_num_plastics

Total plastics removed by this customer (all orders)

20

{{ event.customer_total_num_plastics }}

customer_total_pounds_plastic_removed

Total pounds of plastic removed by this customer

0.91

{{ event.customer_total_pounds_plastic_removed }}


Event Properties (Brand Totals)


These represent your brand’s total impact across all customers and all orders.


Property

What It Is

Example Value

Klaviyo Template Tag

brand_total_num_trees

Total trees your brand has planted

5,420

{{ event.brand_total_num_trees }}

brand_total_num_plastics

Total plastics your brand has removed

12,300

{{ event.brand_total_num_plastics }}

brand_total_pounds_plastic_removed

Total pounds of plastic your brand has removed

559.09

{{ event.brand_total_pounds_plastic_removed }}


Event Properties (Additional)


Property

What It Is

Example Value

Klaviyo Template Tag

selected_reforestation_projects

Active tree planting project IDs

["veritree-us"]

{{ event.selected_reforestation_projects }}


Customer Profile Properties


In addition to event properties, GoodAPI updates profile-level properties on each customer in Klaviyo. These persist on the customer’s profile and are updated every time a new order is placed.

Because these live on the profile, you can use them in any Klaviyo email: campaigns, flows, segments, and more, not just in emails triggered by the impact event.


Profile Property

What It Is

Example Value

Klaviyo Template Tag

customer_total_num_trees

Customer’s lifetime total planted

12

{{ person

lookup:"customer_total_num_trees"

default:'' }}

customer_total_num_plastics

Customer’s lifetime total plastics removed

20

{{ person

lookup:"customer_total_num_plastics"

default:'' }}

customer_total_pounds_plastic_removed

Customer’s lifetime pounds of plastic removed

0.91

{{ person

lookup:"customer_total_pounds_plastic_removed"

default:'' }}


How to Use This Data in Klaviyo


1. Post-Purchase Impact Emails (Flow)


When you set up the GoodAPI integration, we create a flow called “GoodAPI Email On Impact” that triggers on the “Impact Created By Purchase” event. This flow starts in draft mode — you’ll need to set it to live in Klaviyo when you’re ready.

This is the most common use case. After a customer places an order, they receive an email showing the impact their purchase made.


Example email copy using event properties:

Hi {{ event.first_name }},

Thank you for your order! Your purchase just planted {{ event.num_trees }} tree(s)
and removed {{ event.num_plastics }} plastic(s) from the ocean.

So far, you've helped plant {{ event.customer_total_num_trees }} trees and remove
{{ event.customer_total_num_plastics }} plastics across all your orders with us.

Together with all our customers, we've planted {{ event.brand_total_num_trees }} trees!


2. Campaigns & Newsletters

Use profile properties to reference a customer’s lifetime impact in any campaign email — no event trigger required.


Example:

Hi {{ person.first_name|default:'friend' }},

Did you know? Thanks to your purchases, you've helped plant
{{ person|lookup:'customer_total_num_trees' }} trees and remove
{{ person|lookup:'customer_total_pounds_plastic_removed' }} pounds of plastic.


3. Segmentation

You can create Klaviyo segments based on profile properties to target customers by their impact level. For example:

  • High-impact customers: Customers where customer_total_num_trees is greater than 10
  • Plastic champions: Customers where customer_total_num_plastics is greater than 50
  • New impact customers: Customers where customer_total_num_trees equals 1 (first-time impact)


4. Conditional Content

Use Klaviyo’s template logic to show different content based on impact type:

{% if event.num_trees > 0 %}
Your purchase planted {{ event.num_trees }} tree(s)!
{% endif %}

{% if event.num_plastics > 0 %}
Your purchase removed {{ event.num_plastics }} plastic(s) from the ocean!
{% endif %}


5. Data Feed (Legacy)

If you set up a GoodAPI data feed URL, you can pull your brand-level totals into any Klaviyo template:

Feed Property

Klaviyo Template Tag

Total trees planted (brand)

{{ feeds.goodapi.total_trees_planted_merchant }}

Total plastics removed (brand)

{{ feeds.goodapi.total_bottles_registered_merchant }}

Note: The data feed provides brand-level totals only. For customer-level data, use the event or profile properties described above.


Quick Reference: Where to Use Each Data Type

Data Type

Available In

Best For

Event properties (order-level)

Flow emails triggered by “Impact Created By Purchase”

Post-purchase thank-you emails, order-specific impact details

Event properties (customer totals)

Flow emails triggered by “Impact Created By Purchase”

Showing cumulative impact in post-purchase emails

Event properties (brand totals)

Flow emails triggered by “Impact Created By Purchase”

Showing your brand’s overall impact alongside the order

Profile properties (customer totals)

Any email — campaigns, flows, segments

Newsletter highlights, loyalty emails, win-back campaigns, segmentation

Data feed (brand totals)

Any email — campaigns, flows

Brand-wide impact stats in any email


Frequently Asked Questions


Q: Why didn’t my customer receive an impact email?

The event only fires when an order generates at least one tree planted or one plastic removed. If the order didn’t produce any impact (e.g., impact settings aren’t configured), no event is sent. Also make sure the “GoodAPI Email On Impact” flow is set to Live in Klaviyo.


Q: Can I customize the email template?

Yes! When GoodAPI sets up the integration, we create an “Environmental Impact Template” in your Klaviyo account. You can edit this template directly in Klaviyo’s template editor. You can also create your own template and use any of the event or profile properties listed above.


Q: Do profile properties update automatically?

Yes. Every time a new order generates impact, GoodAPI updates the customer’s profile properties with their latest lifetime totals. No manual action required.



Q: Can I use impact data in my existing flows?

Absolutely. You can add the “Impact Created By Purchase” event as a trigger for any flow, or use profile properties (like customer_total_num_trees) in conditional splits and email content within your existing flows.



Q: What’s the difference between event properties and profile properties?

Event properties are tied to a specific event (order) and are only accessible in emails triggered by that event. Profile properties are stored on the customer’s Klaviyo profile and can be used anywhere — campaigns, flows, segments, and more.



Q: How is “pounds of plastic removed” calculated?

We calculate pounds based on the number of plastics removed: plastics / 22. This means roughly 22 plastic items equals 1 pound.

Updated on: 18/02/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!