- Show a VIP message to customers in a
VIP memberssegment - Show a product recommendation when a Klaviyo profile property has a certain value
- Hide or show a portal action based on campaign, loyalty, churn-risk, or lifecycle data
- Pair a personalized Customer Portal message with a Klaviyo metric that tracks when a customer acts on it
Before you start
You need:- Customer Portal v2 enabled for your project
- The Native Klaviyo integration preview enabled for your project
- Permission to connect your Klaviyo account to Firmhouse
- Access to Customer Portal > Templates so you can edit Liquid templates
Connect Klaviyo with OAuth
- In Firmhouse, open Apps > Klaviyo.
- Click Connect Klaviyo.
- Sign in to Klaviyo and approve the requested access.
- Return to Firmhouse and confirm that the Klaviyo settings show OAuth connected.
Use the Klaviyo profile Liquid object
Klaviyo data is available through the current subscription:klaviyo_profile object exposes:
Firmhouse looks up the Klaviyo profile by the subscription email address. If Klaviyo is not connected with OAuth, the subscription has no email address, or Klaviyo does not return a profile, the object renders as empty data.
Show content based on a profile property
Usesubscription.klaviyo_profile.properties when the decision is based on a custom property on the Klaviyo profile.
customer_tier. For keys with spaces or special characters, use bracket notation or normalize the property name in Klaviyo first.
Show content based on segment membership
Usesegment_names when you want to check whether a customer is in a named Klaviyo segment.
segment_ids instead of segment_names when you want the template logic to keep working if a segment is renamed in Klaviyo.
Combine Klaviyo data with Customer Portal actions
You can combine Klaviyo conditions with Customer Portal components. For example, show an add-product action only for customers in a specific segment:Track Customer Portal actions in Klaviyo
Use Klaviyo’s public Client Event API when you want to track that a Customer Portal message was shown or clicked. This is a browser-side API, so use your Klaviyo public API key, also called the Site ID. Never expose OAuth access or refresh tokens in Customer Portal HTML or JavaScript. A practical pattern is to define one helper function in theshared_head template, and then call that helper from any page, dialog, or button where you want to track a Customer Portal action.