Skip to main content

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

PropertyTypeRequiredDescription
event_namestringYesThe name of the event (e.g., purchase, page_view)
timestampstringNoISO 8601 timestamp (e.g., 2026-01-15T14:30:00Z). Defaults to current time.
revenuenumberNoRevenue amount associated with the event
event_valuenumberNoA numeric value for the event (e.g., score, rating)

Commerce fields

PropertyTypeDescription
currencystringISO 4217 currency code (e.g., USD, BRL, EUR)
order_idstringOrder or transaction identifier
product_idsarrayList of product IDs involved in the event
product_categoriesarrayList of product categories

Campaign & messaging fields

PropertyTypeDescription
campaign_idstringRevBridge campaign ID (for attribution)
channelstringCommunication channel (e.g., email, sms, whatsapp, push)
template_idstringMessage template ID
message_subjectstringEmail subject line or message title
message_bodystringMessage content
message_urlstringURL included in the message
message_media_urlstringMedia 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.
{
  "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"
}
Use consistent naming conventions across your events. We recommend snake_case for all property names (e.g., product_name, not productName or ProductName).

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 NameDescriptionTypical Properties
purchaseCustomer completed a purchaserevenue, currency, order_id, product_ids
add_to_cartItem added to shopping cartproduct_id, product_name, quantity, price
remove_from_cartItem removed from cartproduct_id, product_name
product_viewCustomer viewed a product pageproduct_id, product_name, category
page_viewCustomer viewed a pagepage, referrer
searchCustomer searched for somethingquery, results_count
checkout_startedCustomer started checkoutcart_value, item_count
checkout_abandonedCustomer abandoned checkoutcart_value, item_count, step
wishlist_addItem added to wishlistproduct_id, product_name
coupon_appliedCoupon or discount code usedcoupon_code, discount_value
refundOrder was refundedorder_id, revenue, reason
signupNew account createdmethod, source
loginUser logged inmethod

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 NameDescriptionTypical Properties
email_sentEmail was sent to the usercampaign_id, template_id, message_subject
email_deliveredEmail was deliveredcampaign_id, template_id
email_openedEmail was openedcampaign_id, template_id
email_clickedLink in email was clickedcampaign_id, template_id, message_url
email_bouncedEmail bouncedcampaign_id, bounce_type
email_unsubscribedUser unsubscribed via emailcampaign_id
sms_sentSMS was sentcampaign_id, channel
sms_deliveredSMS was deliveredcampaign_id
push_sentPush notification sentcampaign_id, channel
push_clickedPush notification clickedcampaign_id, message_url

Timestamps

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.

Numeric fields

The revenue and event_value fields must be numeric. Both integer and decimal values are accepted:
{
  "event_name": "purchase",
  "revenue": 129.90,
  "event_value": 3
}
Sending a non-numeric value for revenue or event_value will cause validation to fail for that user.