Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore Personalize
Data privacy
Before you start sending data
Integrating with Sitecore Personalize
Stream API
Personalize API Flow execution
REST APIs
  • Sitecore Personalize for developers
  • Stream API
  • Boxever JavaScript Library (legacy) reference
  • Objects
  • Event object
  • SEARCH event

SEARCH event

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

Attribute

Type

Description

Example

Required/optional

product_type

string

The 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_name

string

The 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:

Attribute

Type

Description

Example

Required/optional

flight_type

string 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

origin

string (three-letter, uppercase)

The IATA code of the origin the guest searched for.

  • "BCN"

  • "DUB"

  • "LON"

Required

destination

string (three-letter, uppercase)

The IATA code of the destination the guest searched for.

  • "BCN"

  • "DUB"

  • "LON"

Required

start

string (ISO 8601) without the time zone. Format: YYYY-MM-DD’T’hh:mm

The local departure date and time of the flight that the guest searched for.

"2025-08-21T16:17"

Required

end

string (ISO 8601) without the time zone. Format: YYYY-MM-DD’T’hh:mm

The local return date and time of the flight that the guest searched for.

"2025-08-23T07:00"

Required

adults

integer

The number of adults of the flight the guest searched for.

The minimum value is 0.

2

Required

children

integer

The number of children of the flight the guest searched for.

The minimum value is 0.

2

Required

infants

integer

The number of infants of the flight the guest searched for.

The minimum value is 0.

1

Required

fare_class

string (title case)

The class of flight the guest searched for.

  • "Economy"

  • "Premium Economy"

  • "Business"

  • "First Class"

Required

fare_family

string (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() function returns.

RequestResponse
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() function returns. This event object describes a search for a flight.

RequestResponse
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: "2025-08-21T16:17",
    end: "2025-08-23T07:00",
    adults: 2,
    children: 2,
    infants: 1,
    fare_class: "Economy",
    fare_family: "Economy Plus"
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore