Skip to content

Standard Schema

Every FirstHive account starts with four standard entities. They fit retail, ecommerce and D2C businesses out of the box, and they’re the base that every industry schema builds on.

EntityOne record perBuilt from
EventInteraction: a page view, click, message, purchase, status changeSent in, never changed after
CustomerPerson (one FHID)Calculated from the person’s events and identifiers
TransactionOrder, booking or paymentCalculated from order events
TransactionItemLine item in a transactionCalculated from line-item events
CatalogueProduct, variant and market priceYour commerce platform or a product feed
OffersOffer and offer codeCreated in FirstHive or brought in from another system

Every record carries acc_id (your account) and fhid (the unified customer it belongs to). Fields in nested objects are written with a dot, for example contact.email or amount.total.

Event

The atomic, immutable record. Every tracked interaction is stored as one of these.

FieldTypeRequiredDescription
acc_idlongYesAccount identifier
categorystringYesEvent category
event_idbinaryYesUnique event identifier
event_namestringYesEvent name
event_datestringYesEvent occurrence date
event_timetimestampYesEvent occurrence timestamp
event_typestringYessystem or custom
fhidbinaryYesFirstHive unified identifier, assigned at ingestion
event_labelstringNoLabel of the event source
event_sourcestringNoSource of the event
sidbinaryNoSession identifier

Nested objects on Event:

  • campaign: id, channel, journey_id, template_id, variant_id, msg_id
  • channel: utm_source, utm_medium, utm_campaign, utm_content, utm_term, ad_creative, ad_group, landing_page_url, referral_url, grouping
  • device: id, type, platform, os, os_version, brand, model, browser, screen_resolution, view_port, user_agent, connection_type, network_provider
  • geo: city, region, country, latitude, longitude, timezone
  • tech: ip, app_version
  • custom: your own fields (see Custom fields)

Customer

The unified profile entity, derived from the event stream.

FieldTypeRequiredDescription
acc_idlongYesAccount identifier
fhidbinaryYesFirstHive unified identifier
cidstringNoCustomer identifier
pfhidbinaryNoPrior/parent FHID (reference from before unification)
unifiedbooleanNoWhether this record has completed unification
tagsarrayNoFree-form tags
created_at / updated_at / updated_datetimestamp/stringNoRecord audit timestamps

Nested objects on Customer:

  • contact: email, mobile, alternate_email, contact_android_device_id, contact_ios_device_id, contact_web_device_id, preferred_contact_method
  • consent: email, sms, whatsapp, rcs, mobilepush, webpush (all boolean)
  • demography: first_name, last_name, middle_name, full_name, salutation, gender, dob, age, marital_status, education_level, occupation, income_bracket, language, region, city, country, zip_code
  • reachability: preferred_channel, best_time_to_contact, and per-channel booleans (email, sms, whatsapp, rcs, mobile_push, web_push)
  • tx (a behavioral and transactional summary calculated by FirstHive, not sent in): first_purchase_date, last_purchase_date, purchase_count, frequency, recency, monetary_value, aov, average_days_between_purchases, frequent_city, preferred_payment_method, mode, customer_segment, and ML-derived fields: ltv, clv_prediction, churn_risk
  • custom: your own fields (see Custom fields)

Transaction

Any purchase, booking, order, or financial event, derived from the underlying event history.

FieldTypeRequiredDescription
acc_idlongYesAccount identifier
fhidbinaryYesFirstHive unified identifier
idbinaryYesUnique identifier
cidstringNoCustomer identifier
id_origstringNoOriginal source-system identifier
invoice_idstringNoInvoice identifier
item_countlongNoNumber of line items
txn_datetimestampNoTransaction date
txn_statusstringNoCurrent transaction status
source, store_id, notes, tags—NoOrigin and free-form metadata

Nested objects on Transaction:

  • amount: subtotal, discount, taxes, total, final
  • billing / shipping: full address blocks (name, first_name, last_name, phone, company, address1, address2, city, province, province_code, country, country_code, zip, latitude, longitude)
  • contact: email, phone
  • payment: method, gateway, status, card_last_four, tx_ref
  • delivery: method, shipping_carrier, shipping_service, estimated_date, actual_date, shipped_date, tracking_number, tracking_url, fee, is_free, is_expedited, shipment_status, instructions
  • cancellation: state, date, reason, initiated_by
  • refund: status, amount, date, reason, transaction_id
  • replacement: state, original_order_id
  • review: status, description
  • points: earned, used, is_used, value
  • order: issue_state, issue_description
  • sales: channel_id, channel_name
  • channel: utm_campaign, utm_medium, utm_source
  • device: ip_address, session_id, user_agent
  • demography: first_name, last_name

TransactionItem

One line item within a Transaction, linked to its Transaction by txn_id.

FieldTypeRequiredDescription
acc_idlongYesAccount identifier
fhidbinaryYesFirstHive unified identifier (independent of the parent Transaction’s)
idbinaryYesUnique identifier
id_origstringYesOriginal source-system identifier
txn_idbinaryYesParent Transaction identifier
txn_id_origstringYesParent transaction’s original source-system identifier
created_at / updated_at / updated_date—NoRecord audit timestamps

Nested objects on TransactionItem:

  • item: id, sku_id, variant_id, name, category, subcategory, quantity, serial_no, warranty_info, expiry_date
  • price: mrp, selling, total, taxes, tax_included
  • discount: applied, amount, coupon_code
  • fulfillment: status, date
  • cancellation: state, date, reason
  • return: status, date, reason
  • replacement: state, item_id, reason
  • gift: state, message
  • subscription: enabled, id, status, frequency, iteration_id, iteration_number