Send point credit and debit mobile app push notifications via Klaviyo flow

Why this use case exists

Some programs do not send full transaction data into TRIFFT, but they do send wallet movements (wallet credited / wallet debited).
Members still expect real‑time updates when their points change. This use case shows how to deliver those updates instantly through Klaviyo using TRIFFT’s Public Messages API.

What this flow achieves:

  • Real‑time push notifications for point credits and debits
  • In‑app pop‑ups when the member opens the app
  • Clear, immediate value confirmation for the member
  • Full control of messaging via Klaviyo

Image placeholder:
Push notification mockup


Prerequisites

  • TRIFFT mobile app deployed
  • TRIFFT ↔ Klaviyo integration enabled
  • Wallet events (wallet_credited, wallet_debited) available in Klaviyo
  • TRIFFT Public Messages API enabled
    • At Patrik: please provide link to API key instructions.

Data flow overview

  1. Wallet movement occurs → TRIFFT emits wallet event to Klaviyo
  2. Klaviyo Flow triggers on wallet_credited or wallet_debited
  3. Flow sends a Webhook call to TRIFFT Public Messages API
  4. TRIFFT delivers:
    • A push notification (if the app is closed)
    • An in‑app modal/banner (if the app is open)

[Diagram placeholder]

Note:
You must create two Flows, one for wallet_credited and one for wallet_debited.
Klaviyo cannot branch between different metric triggers inside a single Flow.


Example wallet event payload in Klaviyo

(This is a representative example. At Patrik: please verify/update structure.)

{
  "event": "wallet_credited",
  "timestamp": "2025-01-10T12:34:56Z",
  "member_id": "123456789",
  "wallet_id": "LOYALTY_POINTS",
  "change": 25,
  "reason": "Purchase at Store #12"
}

Step 1 — Verify wallet events in Klaviyo

  1. Go to Klaviyo → Analytics → Metrics
  2. Ensure wallet_credited and wallet_debited are listed
  3. Inspect a sample event payload to confirm structure and member identifiers

[Placeholder screenshot]


Step 2 — Create Klaviyo Flows for wallet movements

For each event type:

  1. Create a new Flow
  2. Choose Metric Trigger → select wallet_credited (or wallet_debited)
  3. Add an Action → Webhook
  4. Test the Flow, then duplicate it for the second event

[Placeholder screenshot]


Step 3 — Configure the Webhook to call TRIFFT Public Messages API

Method: POST
URL: https://[your-public-messages-endpoint]
Headers:

  • Content-Type: application/json
  • Authorization: Bearer [YOUR_API_KEY]

Example request body
(At Patrik: verify/replace with final schema. Add link to push/modal documentation.)

{
  "member_id": "{{ person.trifft_member_id }}",
  "channel": "APP",
  "type": "PUSH_AND_MODAL",
  "title": "{% if event == 'wallet_credited' %}Points added{% else %}Points deducted{% endif %}",
  "body": "{% if event == 'wallet_credited' %}We have added {{ event.change }} points to your account.{% else %}We have deducted {{ event.change }} points from your account.{% endif %}",
  "deeplink": "trifft://wallet",
  "metadata": {
    "wallet_id": "{{ event.wallet_id }}",
    "change": "{{ event.change }}",
    "reason": "{{ event.reason }}"
  }
}

How the app handles this message

  • If the app is in the background → message appears as a push notification
  • If the app is open → message appears as a modal, banner, or template depending on configuration

[Placeholder screenshot: push + in-app modal]


Step 4 — Testing and validation

  1. Select a test member
  2. Trigger a wallet credit or debit
    • Via TRIFFT Admin (Member Detail → Wallet)
    • Or via Public API
  3. Confirm:
    • Event arrives in Klaviyo
    • Flow is triggered
    • Webhook returns HTTP 2xx
    • Device receives push modality or in‑app pop-up

If errors occur:

  • Check API key + endpoint
  • Validate member_id mapping
  • Review webhook logs in Klaviyo

Variations

  • Send a monthly points statement
    • At Patrik: link to “Send Monthly Loyalty Points Summary via Klaviyo” use case
  • Add anti‑churn rules for sudden balance drops

Related use cases

  • Send Last Viewed Products to TRIFFT via Klaviyo
  • Send Recommended Products to TRIFFT via Klaviyo
  • Send Monthly Loyalty Points Summary via Klaviyo