Events (Usage)
Events
The Events API allows you to track and manage event-based data associated with customers. Each event consists of key details such as customer ID, event type, timestamp, and value. You can use these events for analytics, reporting, and business logic automation.
Event Object
Event Data Structure
| Field | Type | Description | Example |
|----------------|----------|-------------------------------------------------|---------|
| `customerId` | `string` | The ID of the customer | `123e4567-e89b-12d3-a456-426614174000` |
| `datetime` | `Date` | The date and time of the event | `2021-01-01T00:00:00.000Z` |
| `eventTypeId` | `string` | The type of the event | `123e4567-e89b-12d3-a456-426614174000` |
| `value` | `string` | The value of the event, usually a number | `123` |
| `differentiator` | `string` | A differentiator for the event | `DIFF` |
Event Type Object
Event types define the structure and categorization of events.
Event Type Data Structure
| Field | Type | Description | Example |
|----------------|----------|-------------------------------------------------|---------|
| `id` | `string` | The unique ID of the event type | `123e4567-e89b-12d3-a456-426614174000` |
| `name` | `string` | The name of the event type | `Event Type Name` |
| `displayType` | `string` | The way the event type should be displayed | `value` |
| `fieldToSum` | `string` | The field to aggregate values | `value` |
| `fieldToName` | `string` | The field used as the event name | `value` |
Conclusion
The Events API provides a flexible and structured way to track important customer interactions, making it an essential part of data-driven decision-making.
Updated 2 months ago