Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
PersonalizeCloud Portal
Sitecore Personalize developer documentation
  • Developing with Sitecore Personalize
                • VIEW event
                • IDENTITY event
                • SEARCH event
                • Custom events
            • Flow object
        • Troubleshooting
        • Release notes
  1. Event object
  1. Sitecore Personalize developer documentation
  2. Stream API

SEARCH event

The event object for a SEARCH event must include all the required attributes for event objects plus the following attributes:

AttributeTypeDescriptionExampleRequired/optional
product_typestringThe product type the guest searched for.

This is a custom value of your choice, but note that the value "FLIGHT" is reserved by Sitecore Personalize. If you set the value to "FLIGHT", you must include more attributes in the event object.
  • "running shoes"
  • "office supplies"
  • "FLIGHT"
Required
product_namestringThe product name the guest searched for.
  • "airSupport"
  • "M06P-BLK pencil, 0.6mm"
  • "DUB-LON"
Required

If you set the value of product_type to "FLIGHT", the event object for a SEARCH event must also include the following attributes:

AttributeTypeDescriptionExampleRequired/optional
flight_typestring enum (two-letter, uppercase)The flight type the guest searched for.Must be one of:

  • "OW"
  • "RT"


"OW" stands for a one-way flight. "RT" stands for a return flight.
Required
originstring (three-letter, uppercase)The IATA code of the origin the guest searched for.
  • "BCN"
  • "DUB"
  • "LON"
Required
destinationstring (three-letter, uppercase)The IATA code of the destination the guest searched for.
  • "BCN"
  • "DUB"
  • "LON"
Required
startstring (ISO 8601) without the time zone. Format: YYYY-MM-DD’T’hh
The local departure date and time of the flight that the guest searched for."2026-08-21T16:17"Required
endstring (ISO 8601) without the time zone. Format: YYYY-MM-DD’T’hh
The local return date and time of the flight that the guest searched for."2026-08-23T07:00"Required
adultsintegerThe number of adults of the flight the guest searched for.

The minimum value is 0.
2Required
childrenintegerThe number of children of the flight the guest searched for.

The minimum value is 0.
2Required
infantsintegerThe number of infants of the flight the guest searched for.

The minimum value is 0.
1Required
fare_classstring (title case)The class of flight the guest searched for.
  • "Economy"
  • "Premium Economy"
  • "Business"
  • "First Class"
Required
fare_familystring (title case recommended)The fare family of the flight the guest searched for.
  • "Economy Plus"
  • "Flexi Economy"
Optional

Examples

This example describes an event object for a SEARCH event in an integration that uses the Boxever JavaScript Library. The browser_id is set to the value that the [Boxever.getID()](bx-getid.md "Boxever.getID()") function returns.

const searchEvent = {
    browser_id: Boxever.getID(),
    channel: "WEB",
    type: "SEARCH",
    language: "EN",
    currency: "EUR",
    page: "search results page",
    pos: "myretailsite/ireland",
    product_type: "running shoes",
    product_name: "airSupport"
}

This example describes an event object for a SEARCH event in an integration that uses the Boxever JavaScript Library. The browser_id is set to the value that the [Boxever.getID()](bx-getid.md "Boxever.getID()") function returns. This event object describes a search for a flight.

const searchEvent = {
    browser_id: Boxever.getID(),
    channel: "WEB",
    type: "SEARCH",
    language: "EN",
    currency: "EUR",
    page: "search results page",
    pos: "myretailsite/ireland",
    product_type: "FLIGHT",
    product_name: "DUB-LON",
    flight_type: "RT",
    origin: "DUB",
    destination: "LON",
    start: "2026-08-21T16:17",
    end: "2026-08-23T07:00",
    adults: 2,
    children: 2,
    infants: 1,
    fare_class: "Economy",
    fare_family: "Economy Plus"
}
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use