Segment integration
Sync customer identity and behavioural events from Segment to enrich Liya contact records and trigger proactive support.
The Segment integration brings your product analytics data into Liya. Customer identity attributes (from identify calls) and behavioural events (from trackcalls) flow into Liya, enriching contact records and enabling event-triggered automations.
What the integration provides
| Data type | How it's used in Liya |
|---|---|
| identify() traits | Automatically populate contact custom attributes (plan, MRR, company, sign-up date, etc.) |
| track() events | Trigger Liya automations when specific product events occur |
| group() traits | Populate account-level attributes on the contact's company record |
| page() events | Show recent page visits in the conversation sidebar for context |
Connecting Segment
Go to Settings → Integrations → Segment
Click Connect and copy your Liya Segment Source Key.
Add Liya as a destination in Segment
In your Segment workspace, go to Connections → Destinations → Add destination. Search for "LiyaSupport" and click Configure.
Enter your Segment Source Key
Paste the key from Step 1 into the destination configuration and enable the destination.
Map Segment traits to Liya attributes
In Liya's Segment settings, map the Segment trait names to your Liya custom attribute keys. For example: plan → plan, monthlySpend → mrr.
Sending identity to Liya
Your existing analytics.identify() calls automatically enrich Liya contact records without any code changes — once the destination is connected:
Event-triggered automations
Use Segment trackevents to trigger Liya automations. For example, automatically create a churn-risk ticket when a user cancels, or send a proactive check-in when a customer hasn't logged in for 30 days.
Configure event-based rules in Settings → Automations. Add a trigger of type Segment event received, select the event name, and define your actions.
Customer context in conversations
When a Segment-identified customer contacts your support team, their conversation sidebar shows:
- All mapped custom attributes (plan, MRR, sign-up date, etc.)
- Recent
trackevents (last 10 events in the past 30 days) - Recent
pageviews with timestamps - Link to their Segment profile