> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revbridge.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Event Types & Properties

> Understand event naming, standard properties, and how to use custom fields.

## Flexible schema

RevBridge AI uses a **flexible event schema**. You can send any `event_name` — there is no predefined list of allowed event types. This means you can track any action that matters to your business.

The only required field per event is `event_name`. All other fields are optional and are stored as event properties for segmentation, analytics, and campaign targeting.

## Standard event properties

These fields have dedicated handling in RevBridge for analytics, attribution, and campaign optimization.

### Core fields

| Property      | Type   | Required | Description                                                                  |
| ------------- | ------ | -------- | ---------------------------------------------------------------------------- |
| `event_name`  | string | Yes      | The name of the event (e.g., `purchase`, `page_view`)                        |
| `timestamp`   | string | No       | ISO 8601 timestamp (e.g., `2026-01-15T14:30:00Z`). Defaults to current time. |
| `revenue`     | number | No       | Revenue amount associated with the event                                     |
| `event_value` | number | No       | A numeric value for the event (e.g., score, rating)                          |

### Commerce fields

| Property             | Type   | Description                                        |
| -------------------- | ------ | -------------------------------------------------- |
| `currency`           | string | ISO 4217 currency code (e.g., `USD`, `BRL`, `EUR`) |
| `order_id`           | string | Order or transaction identifier                    |
| `product_ids`        | array  | List of product IDs involved in the event          |
| `product_categories` | array  | List of product categories                         |

### Campaign & messaging fields

| Property            | Type   | Description                                                                                                                                             |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `campaign_id`       | string | RevBridge campaign ID (for attribution)                                                                                                                 |
| `channel`           | string | Communication or source channel (e.g., `email`, `sms`, `whatsapp`, `push`, `web`). The [Web SDK](/developer/web-sdk) sets `web` on every browser event. |
| `template_id`       | string | Message template ID                                                                                                                                     |
| `message_subject`   | string | Email subject line or message title                                                                                                                     |
| `message_body`      | string | Message content                                                                                                                                         |
| `message_url`       | string | URL included in the message                                                                                                                             |
| `message_media_url` | string | Media attachment URL                                                                                                                                    |

## Custom properties

Any key-value pair beyond the standard fields is stored as a **custom event property**. Use them to capture business-specific data.

```json theme={null}
{
  "event_name": "product_view",
  "timestamp": "2026-01-15T14:30:00Z",
  "product_id": "SKU-789",
  "product_name": "Running Shoes Pro",
  "category": "footwear",
  "color": "blue",
  "size": "42",
  "source_page": "/summer-collection"
}
```

<Tip>
  Use consistent naming conventions across your events. We recommend `snake_case` for all property names (e.g., `product_name`, not `productName` or `ProductName`).
</Tip>

## Common e-commerce events

These are the most common events for e-commerce integrations. You are not limited to these — use any `event_name` that fits your business.

| Event Name           | Description                     | Typical Properties                                |
| -------------------- | ------------------------------- | ------------------------------------------------- |
| `purchase`           | Customer completed a purchase   | `revenue`, `currency`, `order_id`, `product_ids`  |
| `add_to_cart`        | Item added to shopping cart     | `product_id`, `product_name`, `quantity`, `price` |
| `remove_from_cart`   | Item removed from cart          | `product_id`, `product_name`                      |
| `product_view`       | Customer viewed a product page  | `product_id`, `product_name`, `category`          |
| `page_view`          | Customer viewed a page          | `page`, `referrer`                                |
| `search`             | Customer searched for something | `query`, `results_count`                          |
| `checkout_started`   | Customer started checkout       | `cart_value`, `item_count`                        |
| `checkout_abandoned` | Customer abandoned checkout     | `cart_value`, `item_count`, `step`                |
| `wishlist_add`       | Item added to wishlist          | `product_id`, `product_name`                      |
| `coupon_applied`     | Coupon or discount code used    | `coupon_code`, `discount_value`                   |
| `refund`             | Order was refunded              | `order_id`, `revenue`, `reason`                   |
| `signup`             | New account created             | `method`, `source`                                |
| `login`              | User logged in                  | `method`                                          |

## Messaging events

Track engagement with your outbound campaigns. These are typically sent by RevBridge automatically, but can also be sent from your own systems.

| Event Name           | Description                 | Typical Properties                              |
| -------------------- | --------------------------- | ----------------------------------------------- |
| `email_sent`         | Email was sent to the user  | `campaign_id`, `template_id`, `message_subject` |
| `email_delivered`    | Email was delivered         | `campaign_id`, `template_id`                    |
| `email_opened`       | Email was opened            | `campaign_id`, `template_id`                    |
| `email_clicked`      | Link in email was clicked   | `campaign_id`, `template_id`, `message_url`     |
| `email_bounced`      | Email bounced               | `campaign_id`, `bounce_type`                    |
| `email_unsubscribed` | User unsubscribed via email | `campaign_id`                                   |
| `sms_sent`           | SMS was sent                | `campaign_id`, `channel`                        |
| `sms_delivered`      | SMS was delivered           | `campaign_id`                                   |
| `push_sent`          | Push notification sent      | `campaign_id`, `channel`                        |
| `push_clicked`       | Push notification clicked   | `campaign_id`, `message_url`                    |

<Info>
  Push events are accepted by the API. The Push channel UI is coming soon.
</Info>

## Timestamps

<Info>
  Timestamps must be in **ISO 8601** format. Both of these formats are accepted:

  * With timezone: `2026-01-15T14:30:00Z` or `2026-01-15T14:30:00+03:00`
  * Without timezone: `2026-01-15T14:30:00` (treated as UTC)

  If no timestamp is provided, the event is recorded at the current server time.
</Info>

## Numeric fields

The `revenue` and `event_value` fields must be numeric. Both integer and decimal values are accepted:

```json theme={null}
{
  "event_name": "purchase",
  "revenue": 129.90,
  "event_value": 3
}
```

<Warning>
  Sending a non-numeric value for `revenue` or `event_value` will cause validation to fail for that user.
</Warning>
