Custom Events in SendX let you track any user action across your website or app—not just standard email opens and clicks.
By pushing custom events tied to a contact’s profile, you can capture key behaviors such as:
Product Added to Cart
Checkout Abandoned
Video Played
Plan Upgraded
With this data, you can build highly personalized user segments and run targeted campaigns that drive conversions.
This guide will show you how to:
Capture custom events in SendX.
Add properties (Text, Number, Boolean, Date) to events.
Create segments based on frequency, timing, and property filters.
Before You Begin
Before creating custom event segments in SendX, ensure:
Custom events are set up
Your website or app should already be sending events to SendX via the Custom Event API.Contacts exist in your account
The contact must already exist in SendX, or will be created when the event is pushed (based on the identifier).You know your event structure
Event Name (e.g., abandoned_cart, purchase, login).
Properties inside the data object (e.g., price, currency, item_count).
You have clear segmentation goals
Example goals:Identify users who abandoned carts with more than 2 items.
Target users who upgraded their plan in the last 30 days.
Re-engage customers whose subscription renewal date is within 7 days.
Step-by-Step Instructions
Custom Event Data Structure
When sending a custom event to SendX, the request body should look like this:
{
"name": "abandoned_cart",
"identifier": "john.doe@example.com",
"data": {
"price": "29.99",
"currency": "USD",
"item_count": "3"
},
"time": 1669990400
}
Explanation:
name (string): Name of the event (e.g., "abandoned_cart", "purchase", "video_played").
identifier (string): Unique identifier of the contact (email or custom ID).
data (object): Custom event properties, which can be of type:
Text (String) → "currency": "USD"
Number → "item_count": "3", "price": "29.99"
Boolean → "isFirstPurchase": true
Date → "renewalDate": "2025-09-01T00:00:00Z"
time (timestamp): UNIX timestamp of when the event occurred.
Example with Multiple Property Types
{
"name": "purchase",
"identifier": "sarah.lee@example.com",
"data": {
"productName": "Yoga Mat",
"price": 45.0,
"currency": "USD",
"quantity": 1,
"isFirstPurchase": true,
"purchaseDate": "2025-08-01T10:15:00Z"
},
"time": 1735670400
}
Here, the properties include:
productName → Text
price → Number
currency → Text
quantity → Number
isFirstPurchase → Boolean
purchaseDate → Date
Custom Event API Documentation
Creating a Custom Event Segment
Go to the Segments page.
Click on Create Segment in the navigation bar.
You can just enter a name for your segment.
Click + New Group to create a condition group.
Click + Add Condition inside the group.
From the entity dropdown, select Custom Events.
Choose an Action, select Purchase (or your desired custom event).
Under Condition, select Has Been Performed.
Specify how many times the event occurred (e.g., 1 for at least once).
Click Save, then Update Contacts to see matching users.
Filtering Logins Within a Time Frame
In the condition section, change Forever to In the Last.
Enter the desired time window (e.g., 2 days).
Click Save, then Update Contacts to apply the filter.
View all contacts who purchased in the last 2 days.
Using Custom Event Properties
Go to Audience > Segments.
Click + Create Segment.
Give the segment a name (e.g., "Login via Google").
Click + New Group → + Add Condition.
Select Custom Events → Choose Login as the action.
Click Properties, then Select the property key (e.g., Via).
Choose the operator Equal and enter the value Google.
Click Save, then Update Contacts to preview users who logged in via Google.
Tips & Best Practices
Here are some helpful ways to make the most of custom event segments:
Start with simple conditions: Begin with basic "has performed" segments before adding complex time and property filters.
Use meaningful timeframes: Choose time periods that make sense for your business (e.g., "last 7 days" for recent activity).
Combine multiple conditions: Use the "+ Add Condition" feature to create more precise segments.
Test your segments: Always click "Update Contacts" to verify your segment is capturing the right people.
Use descriptive names: Name segments clearly so your team understands who they target.
Troubleshooting Common Issues
Custom event segmentation can sometimes present challenges with data and conditions. Here are solutions to common problems:
Problem: "I don't see my custom events in the 'Choose an action' dropdown."
Solution: Custom events must be sent to SendX before they appear in segmentation options. Ensure your website or app is properly sending events and that at least one contact has performed the action.
Problem: "My segment shows zero contacts even though I know people performed the action."
Solution: Check that your conditions are set correctly and not too restrictive. Try expanding the timeframe or reducing the frequency requirement to see if contacts appear.
Problem: "Event properties aren't showing up in the properties dropdown."
Solution: Properties only appear if they were included when the custom event was originally sent. Verify that your events include the properties you want to segment by.
Problem: "My time-based segments aren't updating with new activity."
Solution: Segments don't automatically refresh. Click "Update Contacts" after setting up time-based conditions to see current results that match your timeframe.
Related Articles
Now that you can create custom event segments, here are simple ways to expand your custom events usage:
How to Send Custom Events Using SendX API: Check out this article to learn how to set up and push custom events from your website or app to SendX for segmentation.
Creating and Managing Custom Event-Based Segments in SendX : Check out this video to learn how to use custom events in segments
Creating Personalized Email Workflows Using Custom Event Data: Discover how to trigger automated email sequences and personalize content based on the custom events you're now segmenting by in this article.