User and Wishlist Events
For developers
The USER_OPERATIONS and WISHLIST families — identity, consent, and saved items. Business meaning: Event Catalog.
USER_OPERATIONS family
Identify (step: update)
Method
events.Identify(params)
Common parameters
emailphoneemailNtfsmsNtfwhatsappNtfisLogin,isRegisteredsource
Runtime behavior
- if
isLogin === true, SDK forcesisRegistered = true source: 'email-collection'forcesemailNtf = truesource: 'whatsapp-collection'forceswhatsappNtf = true- if configured endpoint is
https://per2.segmentify.com, SDK also triggersIysPermission - sends with
async: false
IysPermission (step: iyspermissions)
SDK builds userIysPermission object with emailIysReceiptType, source, and allow date.
Register (step: signup)
- stores user object in storage first
- sends
isRegistered: true - may trigger
IysPermissionwhen notification permissions are present onper2
Login (step: signin)
Method
events.Login(params) — the Expo playground labels this button LogIn for readability.
- stores user
- sends
isLogin: trueandisRegistered: true
Logout (step: signout)
- sends
isLogin: false
WISHLIST family
FavoriteAdd (step: add)
- Required (type)
productId - Optional
favoritesList
FavoriteRemove (step: remove)
- Required (type)
productId
FavoriteDetail (step: detail)
- method type omits
productId - runtime still spreads supplied params into event
FavoriteView (step: view-favorites)
- method type omits
productId - usually used with
favoritesList
Repository usage links
- Event Playground:
example/src/App.tsx(Identify,Register,Loginvia LogIn button,Logout,FavoriteAdd,FavoriteRemove,FavoriteView) - register flow:
example/src/screens/RegisterScreen.tsx - login flow:
example/src/screens/LoginScreen.tsx - logout flow:
shared/hooks/useAuth.tsx(logout);example/src/screens/ProfileScreen.tsx - identify flow:
example/src/screens/EditProfileScreen.tsx - wishlist view flow:
example/src/screens/WishlistScreen.tsx - wishlist add/remove internals:
shared/hooks/useWishlist.tsx
Practical sequence
- sign up ->
Register - sign in ->
Login - profile update or consent update ->
Identify - sign out ->
Logout - wishlist add/remove ->
FavoriteAdd/FavoriteRemove - wishlist screen view ->
FavoriteView