Sending custom webhooks from TRIFFT to Klaviyo
Sending Custom Webhooks from TRIFFT to Klaviyo
While TRIFFT automatically shares a rich set of metrics and attributes with Klaviyo, there are two situations where you may want to send additional custom data:
When to Use Custom Webhooks
-
Non-standard Events or Profile Updates
If you need to send custom events or modify profile properties that fall outside of TRIFFT's default dataset. -
Payload Manipulation
If you need to adjust the payload before sending it — for example:- Formatting
datetime
fields - Adding enriched data from external systems
- Mapping to Klaviyo’s custom structure or naming conventions
- Formatting
These advanced use cases can be handled using TRIFFT’s native webhook system, which supports outbound HTTP calls to Klaviyo’s public API.
Step-by-Step Setup
1. Create a Klaviyo API Key
- Go to your Klaviyo Account Settings → API Keys
- Create a private API key
- Assign
events/write
orprofiles/write
scopes depending on your use case
Keep this key secure — it will be used for authorization when TRIFFT sends the webhook.
2. Set Up the Webhook in TRIFFT
- Go to Settings → Integrations → Webhooks in TRIFFT Admin
- Create a new webhook authorisation and use the following settings:
Setting | Value |
---|---|
Destination URL | https://a.klaviyo.com/api/ or other Klaviyo endpoint |
Headers | Authorization: Bearer YOUR_KLAVIYO_API_KEY |

3. Configure Webhook

Example payload to send a custom event:
{
"data": {
"type": "event",
"attributes": {
"time": "{{ event.created_at | date('c') }}",
"metric": {
"data": {
"type": "metric",
"attributes": {
"name": "Customer profile updated"
}
}
},
"profile": {
"data": {
"type": "profile",
"attributes": {
"email": "{{ member.email }}"
}
}
},
"properties": {
"first_name": "{{ member.param.first_name }}",
"last_name": "{{ member.param.last_name }}",
"dateOfBirth": "{{ member.param.dateOfBirth }}",
"card_number": "{{ member.param.card_number }}",
"language": "{{ member.param.language }}"
}
}
}
}
Events created via webhooks will not be "branded" - ie, they will appear in Klaviyo with generic cogwheel icon, not with TRIFFT icon.
TRIFFT webhooks support Twig template engine which is similar to Jinja
Updated 2 days ago