Skip to content

Event Parameters and Types

For developers

The exhaustive parameter reference (type contract plus runtime behavior) for every event. When the two differ, runtime wins — see Known Gotchas.

How to read this page

This page merges:

  • Type contract source: src/types.ts
  • Runtime payload behavior: src/classes/events.ts

If type and runtime behavior differ, runtime behavior wins for what is actually sent.

Common auto fields on most events

Added by sendEvent():

  • userId
  • sessionId
  • device
  • os
  • osversion
  • currency
  • lang
  • testMode
  • email (if present in SDK user storage)

Page and product

PageView(params)

  • Event name: PAGE_VIEW
  • Type: Omit<PageViewPayload, 'name'>
  • Parameters:
    • category?
    • subCategory?
    • params?

ProductView(params)

  • Event name: PRODUCT_VIEW
  • Type: Omit<ProductViewPayload, 'name'>
  • Required:
    • productId
  • Optional highlights:
    • title, price, oldPrice, brand, category, mainCategory
    • image, additionalImages
    • inStock, stockCount, stockStatus
    • labels, reviewCount, params
  • Runtime note:
    • params entries are JSON-stringified before send.
    • Boolean-like inStock and noUpdate are normalized.

Search(params)

  • Event name: SEARCH
  • Type: Omit<SearchPayload, 'name'>
  • Required:
    • query
  • Optional:
    • type (instant or faceted)
    • results

Practical modes used by this SDK:

  • Before Search: query: '', type: 'instant'
  • After Search: query not empty + type: 'instant'
  • Searchandising: query not empty + type: 'faceted'

Basket and checkout

BasketView(params)

  • Event name: CHECKOUT
  • Step: view-basket
  • Type: Omit<BasketViewPayload, 'name'>
  • Required:
    • totalPrice
    • productList
  • Optional:
    • cartUrl (recommended for deep links; see example/src/screens/BasketScreen.tsx; Event Playground Basket View omits it)
  • Runtime note:
    • Adds basketId: basketId_{userId}.

BasketAdd(params)

  • Event name: BASKET_OPERATIONS
  • Step: add
  • Type: Omit<BasketOperationPayload, 'name'>
  • Required:
    • productId
    • quantity
  • Optional:
    • price
  • Runtime note:
    • Adds basketId: basketId_{userId}.

BasketRemove(params)

  • Event name: BASKET_OPERATIONS
  • Step: remove
  • Type: Omit<BasketOperationPayload, 'name'>
  • Required:
    • productId
    • quantity
  • Optional:
    • price
  • Runtime note:
    • Adds basketId: basketId_{userId}.

BasketClear()

  • Event name: BASKET_OPERATIONS
  • Step: clear
  • Input: no params
  • Runtime note:
    • Adds basketId: basketId_{userId}.

Purchase(params)

  • Event name: CHECKOUT
  • Step: purchase
  • Type: Omit<PurchasePayload, 'name'>
  • Required:
    • totalPrice
    • orderNo
    • productList
  • Optional:
    • paymentType, discounts, shipment, tax, coupon
  • Runtime note:
    • Adds basketId: basketId_{userId}.

CustomerInformation(params)

  • Event name: CHECKOUT
  • Step: customer-info
  • Type: Omit<BasketViewPayload, 'name'>
  • Required:
    • totalPrice
    • productList
  • Optional:
    • cartUrl

PaymentInformation(params)

  • Event name: CHECKOUT
  • Step: payment-info
  • Type: Omit<PurchasePayload, 'name'>
  • Required:
    • totalPrice
    • orderNo
    • productList

Wishlist

FavoriteAdd(params)

  • Event name: WISHLIST
  • Step: add
  • Type: FavoritePayload
  • Required:
    • productId
  • Optional:
    • favoritesList

FavoriteRemove(params)

  • Event name: WISHLIST
  • Step: remove
  • Type: FavoritePayload
  • Required:
    • productId
  • Optional:
    • favoritesList

FavoriteDetail(params)

  • Event name: WISHLIST
  • Step: detail
  • Type: Omit<FavoritePayload, 'productId'>
  • Optional:
    • favoritesList

FavoriteView(params)

  • Event name: WISHLIST
  • Step: view-favorites
  • Type: Omit<FavoritePayload, 'productId'>
  • Optional:
    • favoritesList

User lifecycle

Identify(params)

  • Event name: USER_OPERATIONS
  • Step: update
  • Type: IdentifyPayload
  • Common fields:
    • email, externalId, phone
    • isLogin, isRegistered
    • emailNtf, smsNtf, whatsappNtf
    • source
  • Runtime notes:
    • If isLogin exists, it may set isRegistered.
    • source: 'email-collection' forces emailNtf = true.
    • source: 'whatsapp-collection' forces whatsappNtf = true.
    • Sent with async: false.

IysPermission(params)

  • Event name: USER_OPERATIONS
  • Step: iyspermissions
  • Type: Omit<RegisterPayload, 'name' | 'isLogin' | 'isRegistered'>
  • Purpose:
    • IYS consent payload for relevant integrations.

Register(params)

  • Event name: USER_OPERATIONS
  • Step: signup
  • Type: Omit<RegisterPayload, 'name' | 'isLogin' | 'isRegistered' | 'isNft'>
  • Required:
    • email
  • Common optional:
    • externalId, phone, emailNtf, smsNtf, whatsappNtf
  • Runtime notes:
    • Persists user in SDK storage.
    • Sends isRegistered: true.

Login(params)

  • SDK method: events.Login (Expo playground UI label: LogIn).
  • Event name: USER_OPERATIONS
  • Step: signin
  • Type: Omit<RegisterPayload, 'name' | 'isLogin' | 'isRegistered' | 'isNft'>
  • Required:
    • email
  • Runtime notes:
    • Persists user in SDK storage.
    • Sends isLogin: true and isRegistered: true.

Logout(params)

  • Event name: USER_OPERATIONS
  • Step: signout
  • Type: Omit<LogoutPayload, 'name' | 'isLogin'>
  • Common field:
    • email
  • Runtime note:
    • Sends isLogin: false.

Customer Data Platform

CDP methods send dedicated event names (no step field). Payloads go through sendEvent() on /add/events/v1.json. See Customer Data Platform Events for full semantics.

UserTraits(params)

  • Event name: USER_TRAITS
  • Type: CdpEventsPayload
  • Runtime notes:
    • No-ops on an empty payload.
    • Omitted consent fields are not defaulted.
    • Does not persist to SEGMENTIFY_USER storage.

IdentifyUser(params)

  • Event name: USER_IDENTIFY
  • Type: CdpEventsPayload
  • Runtime notes:
    • Deduplicates against the last successfully sent profile snapshot in SEGMENTIFY_USER_PROFILE.
    • Snapshot is cleared on Logout / LogoutUser.

RegisterUser(params) / LoginUser(params) / LogoutUser(params)

  • Event names: USER_REGISTER, USER_LOGIN, USER_LOGOUT
  • Type: CdpEventsPayload
  • Runtime notes:
    • No-ops on an empty payload.
    • Omitted consent fields are not defaulted.
    • Do not persist to SEGMENTIFY_USER storage and do not run IYS logic.

SubscribeUser(params)

  • Event name: USER_SUBSCRIBE
  • Type: SubscribeProperties (discriminated by channel)
  • Channel requirements:
    • web_push: pushSubscriptionId
    • email: email, purpose
    • whatsapp / sms / call: phoneNumber

UnsubscribeUser(params)

  • Event name: USER_UNSUBSCRIBE
  • Type: UnsubscribePayload
  • Fields:
    • channel (required)
    • email? (for email channel)
    • phoneNumber? (for whatsapp, sms, call)

Interaction, form, custom, gamification

Interaction(params)

  • Event name: INTERACTION
  • Type: Omit<InteractionPayload, 'name'>
  • Required:
    • type (InteractionPayload in src/types.ts; Event Playground SMS Interaction Click uses type: 'sms', which may require widening the union for strict TypeScript)
  • Optional:
    • instanceId, interactionId
  • Runtime note:
    • If instanceId is provided, runtime sets interactionId to the same value (overwriting a distinct interactionId passed in the same object).

Form(params)

  • Event name: FORM
  • Type: Omit<FormPayload, 'name'>
  • Required:
    • formName
    • fields
    • instanceId
  • Runtime note:
    • instanceId is nested into params.instanceId in outgoing payload.

ErrorHandler(error)

  • Event name: CUSTOM_EVENT
  • Type: Error input, not payload object
  • Runtime payload:
    • type: 'error_handler'
    • params.errorMessage
    • params.nextPage: false

GamificationWof(params) and GamificationScratch(params)

  • Event name: GAMIFICATION
  • Type: Omit<GamificationPayload, 'name'>
  • Common fields:
    • type, record, used, win, instanceId, interactionId
  • Runtime note:
    • Both methods set outgoing type: 'win'.

Push events (static methods)

Events.subscribePushNotification(params)

  • Endpoint type: push subscription endpoint
  • Type: PushToken
  • Required:
    • token
  • Optional:
    • providerType (FIREBASE or APNS)
  • Runtime payload fields include:
    • providerType
    • deviceToken
    • userId
    • os
    • type: 'PERMISSION_INFO'

Events.pushNotificationInteraction(params)

  • Endpoint type: push interaction endpoint
  • Type:
    • PushNotificationClickPayload or PushNotificationViewPayload
  • Required:
    • type (CLICK or VIEW)
  • Optional:
    • instanceId
  • Runtime payload fields include:
    • instanceId
    • userId
    • os
    • type

Implementation tips

  • Use this reference with End-to-End Implementation.
  • Treat src/classes/events.ts as transport truth and src/types.ts as compile-time contract.
  • Validate critical events (Purchase, Register, Login, Logout) for duplicates in QA.