Link Search Menu Expand Document

Klaviyo Integration and Triggers for Spaaza

You can trigger emails and communication flows in Klaviyo when specific events occur in Spaaza. This document explains how to set up the integration, create triggers, and personalize emails using the data Spaaza sends.

Setting Up the Klaviyo Integration

Before you can use triggers:

  1. Create a Klaviyo Private API Key.
    See How to Create a Private API Key in Klaviyo.
  2. Connect Klaviyo to Spaaza:
    1. Open Settings in the Spaaza Console.
    2. Under Integrations, click Add an integration.
    3. Select Klaviyo.
    4. Enter your Klaviyo Private API Key.
    5. Click Save.

After completing these steps, your integration will be active.

Creating a Trigger in Spaaza

To send a message when an event happens in Spaaza:

  1. Create the email Flow in Klaviyo.
  2. In Spaaza Console, go to Settings > Integrations > View all triggers.
  3. Click Add a trigger and select Add a Klaviyo trigger.
  4. Under Event, choose the event type (e.g., Loyalty Level Changed, Voucher Issued).
  5. Enter the subject line of the Flow you created in Klaviyo.
  6. Important: The subject line must match exactly between Spaaza and Klaviyo.
  7. Click Save.
  8. Test the flow by performing the event (e.g., changing a loyalty level).

Special Event Payloads Sent by Spaaza

When an event is triggered, Spaaza sends a JSON payload to Klaviyo. This allows you to personalize your emails dynamically. Here are examples of the additional data you can use:

Points Mutation (shopper.points-mutation)

{
  "points_amount_earned": data.Amount,
  "points_balance_current": data.User.LoyaltyStatus.PointsBalanceCurrent,
  "points_to_proceed_next_level": data.User.LoyaltyStatus.PointsToNext,
  "loyalty_status_level": data.User.LoyaltyStatus.Name
}

Loyalty Level Change (shopper.loyalty-level-changed)

{
  "current_level": data.LoyaltyLevel.Name,
  "previous_level": data.LoyaltyLevelPrevious.Name,
  "points_balance_current": data.User.LoyaltyStatus.PointsBalanceCurrent,
  "points_to_proceed_next_level": data.User.LoyaltyStatus.PointsToNext
}

Voucher Issued (shopper.voucher-issued)

{
  "voucher_text": data.VoucherText,
  "voucher_key": data.VoucherKey,
  "voucher_id": data.VoucherID,
  "voucher_expiry": data.VoucherExpiryDatetimeUTC,
  "voucher_amount": data.VoucherAmount
}

Shopper Opted-In (shopper.opted-in)

{
  "language": data.Language,
  "member_number": data.MemberNumber.Code
}

You can access these properties inside your Klaviyo email templates to personalize content based on loyalty status, points earned, vouchers issued, and more. Learn how to use dynamic data fields in Klaviyo templates here: Message Personalization Reference - Klaviyo.

Setting Up Campaign-Specific Triggers

You can also link Klaviyo triggers to specific Spaaza campaigns:

  1. Open the Campaign page in Spaaza.
  2. Click the Triggers tab.
  3. Add a new Klaviyo Trigger linked to a campaign event (e.g., Voucher Issued).
  4. Follow the same steps as setting a standard trigger.

This allows you to target communications even more precisely during promotions or special events.

Practical Notes from Experience

For Klaviyo integrations with Spaaza:

  • Our customer handled most of the setup directly in Klaviyo.
  • They created the templates for transactional emails and set up the Flows.
  • Spaaza simply posted event payloads to the Klaviyo endpoint.
  • After the setup, we collaborated with them to test and confirm everything was working as expected.