Nested Objects in Custom Event Properties
Learn how to send structured metadata within custom events using nested objects to group related event attributes such as order details or product information.
Overview
Nested objects allow you to send structured metadata within custom event properties.
For more information, refer to Nested Objects.
Use Cases
Nested event properties help capture structured event data.
Healthcare
Send medication reminders or follow-up test notifications based on nested appointment details. This reduces missed follow-ups and improves patient compliance. For example, trigger a reminder when Appointment.Prescription.MedicationName exists and Appointment.Prescription.NextDoseTime is approaching, or send a follow-up notification when Appointment.Tests.FollowUpDate is scheduled.
Travel & Hospitality
Trigger personalized follow-ups based on booking preferences such as room type, meal plan, or service requests. This improves the guest experience and reduces booking cancellations by confirming preferences proactively. For example, send a confirmation message when Booking.Preferences.RoomType is Suite, and remind guests of selected services when Booking.Preferences.Services.Spa is true.
Send Nested Event Properties
Nested Objects in custom event properties follow the same structure and validation rules as Nested Objects in user properties. Event properties follow the same schema enforcement rules to ensure consistent ingestion and prevent failures. You can send nested event properties through CleverTap SDKs or APIs.
The following sample payload sends an event with nested course selection data:
{
"courses_in_cart": [
{
"id": 10,
"name": "Greenfield Institute of Technology",
"courses": [
{
"id": 101,
"name": "B.Tech in Computer Science and Engineering (Slot-A)"
}
]
},
{
"id": 12,
"name": "Sunrise University, Jaipur",
"courses": [
{
"id": 102,
"name": "B.Tech in Computer Science and Engineering"
},
{
"id": 103,
"name": "B.E. in Computer Science and Engineering"
}
]
}
],
"amount": 3.0,
"payment_from": "CAF Version2"
}Event Schema Behavior
When you send nested event properties, CleverTap processes the structure and stores nested attributes within the event schema.
These properties can then be used in analytics and campaign targeting workflows.
Use Nested Objects across Platforms
After ingestion, Nested Objects for custom event properties are available across CleverTap, including segmentation filters and campaign personalization.
- Segment Builder
Nested fields from events can also be used as filters inside segmentation conditions.
The following image shows how nested fields appear for event properties and can be used to create filters in the Segment Builder:

Nested Objects for Event Properties in Segment Builder
- Liquid Tags: Use Liquid Tags to personalize campaign content using attributes stored inside Nested Objects in custom event properties. You can reference nested fields directly using Liquid Tags to personalize campaign content across multiple channels, including Push Notifications, Emails, In-App messages, SMS, WhatsApp, and Webhooks.
The following image shows the Liquid Tags for Nested Objects in custom event properties:

Liquid Tags for Nested Objects in Custom Event Properties
In the above example, {{ Event.courses_in_cart[0].courses[0].name | default: "courses in cart" }} is used. The message dynamically inserts the name of the first course from the first item inside the courses_in_cart array when the event triggers. If the value is unavailable, it falls back to the default text courses in cart.
This shows how you can access deeply nested event attributes, including arrays within arrays, to personalize real-time messages triggered by custom events.
System Considerations
CleverTap enforces some system limits to maintain performance and stability. The following table lists the limits applied during nested object ingestion to ensure consistent data handling:
| Limit Type | Maximum Value |
|---|---|
| Nesting depth | 3 levels |
| Payload size | 32 KB. Applies to the total size of evtData (event uploads), including all nested content. |
| Root-level keys (objects or arrays) | Maximum 5 |
| Nested elements inside an array | Maximum 100 |
| Nested keys inside an object | Maximum 100 |
| Reserved fields for custom event properties | Charged.Items |
FAQs
Can Nested Event Properties be used for segmentation and personalization?
Yes. After ingestion, nested event properties can be used in Segment Builder filters and Liquid Tags. You can reference nested attributes using dot notation to create targeted segments or personalize campaign content.
Are there any reserved fields for nested event properties?
Yes. The field Charged.Items is reserved for CleverTap’s charged event structure and cannot be used for custom nested event properties.
Updated about 4 hours ago
