Skip to content

How the Data Model Works

FirstHive’s data model has two layers: a stream of events, and the entities (Customer, Transaction and so on) that FirstHive calculates from them. Knowing how the two fit together helps you plan integrations, segments and reports.

Events in, entities out

  • Events are the source of truth. Every interaction or change (a page view, an order shipped, a policy renewed, a KYC completed) arrives as a new event. Events are never edited or overwritten after they arrive.
  • Every event is linked to a person on arrival. FirstHive matches each event to a unified customer profile and stamps it with that profile’s FirstHive ID (FHID) in real time. Later unification passes can unify two FHIDs into one when new data shows they’re the same person; the events stay the same, and only the profile they roll up to changes. See Unification.
  • Entities are calculated from events. Customer, Transaction and TransactionItem records aren’t written to directly. When an event changes something (for example an “Order Shipped” event), FirstHive keeps the event and recalculates the entity’s current state, such as the order status, from the full history.
  • Usage counts events. Your events quota counts events, not entities. Creating or updating an entity is a by-product of the events that feed it. See Understanding Events in FirstHive.

Because entities are built from history, you get both today’s state (an order’s current status) and the timeline behind it (when it was placed, shipped and delivered). Models such as RFM and customer lifetime value use that timeline.

Entity types

TypeWhat it holdsLinked to a customer?Examples
ProfileOne record per personIt is the customerCustomer, Investor, Member
TransactionOrders, bookings and payments, with line itemsYes, by FHIDTransaction, TransactionItem, Fund transaction
Custom entityIndustry records that belong to a customerYes, by FHIDPolicy, Loan application, Folio, Lead, Booking
Event entityTimestamped occurrencesYes, or through another recordEvent, Flight delay, Campaign response
Reference entityShared catalogs that no single customer ownsNoProduct catalogue, Fund (scheme) master, Distributor master

Standard and industry schemas

  • Standard Schema: Event, Customer, Transaction and TransactionItem, plus Catalogue and Offers. Every account has them, and they fit retail, ecommerce and D2C as they are.
  • Industry schemas: ready-made entity sets for insurance, mutual funds, banking and fintech, airlines, real estate and loyalty. They add industry entities, such as a policy, folio or booking, on top of the standard ones.

Each account uses one industry schema. Your FirstHive team sets it up during onboarding and shares the full field-level reference for your industry.

Custom fields

The Customer, Event and other entities can be extended with your own fields for data the standard schema doesn’t cover, such as a membership tier or a preferred store. Your FirstHive team maps custom fields during onboarding. Once mapped, they work like any other field in segments, personalization and reports.

Fields FirstHive calculates

Some Customer fields are calculated by FirstHive and should not be sent in from other systems:

  • Purchase summary: first and last purchase date, purchase count, recency, frequency, monetary value, average order value, days between purchases.
  • Model outputs: lifetime value, CLV prediction, churn risk, RFM segment and propensity scores. See AI/ML Capabilities.

Tracking parameters and stored events

Events sent through the FH Tracking API map onto the stored Event entity: the category parameter (e_c) becomes category, the name parameter (e_n) becomes event_name, and the 10 custom dimension slots can be complemented by custom fields on the stored event. event_label and event_source record extra context.