Cueflow.update()
Update user attributes after initialization. Use this when user data changes during a session.
Syntax
Cueflow.update(data)Parameters
data (required)
An object containing properties to update. Only include properties you want to change.
email
string
User's email address
name
string
Display name
phone
string
Phone number
avatarUrl
string
URL to profile image
role
string
User's role
plan
string
Subscription plan
signedUpAt
string
ISO 8601 signup date
[custom]
any
Any custom attributes
You cannot change the user's id with update(). To switch users, call Cueflow.shutdown() first, then Cueflow.init() with the new user.
Basic Example
Common Use Cases
Plan Upgrade
When a user upgrades their subscription:
This immediately re-evaluates targeting rules, so messages targeted at free users will hide, and pro-only messages will show.
Profile Update
When user updates their profile:
Onboarding Completion
Track when user completes onboarding:
Feature Activation
When user enables a feature:
How It Works
When you call update():
Merges data - New properties are merged with existing user data
Syncs to server - Updated data is sent to Cueflow
Re-evaluates messages - Targeting rules are checked against new data
Updates display - Messages are shown/hidden based on new targeting
Multiple Updates
You can call update() multiple times:
Updating Custom Attributes
Custom attributes work the same way:
Requirements
Must call
Cueflow.init()firstCalling before init shows a warning:
"Cueflow: Not initialized"
Next Steps
Cueflow.track() - Track user events
Custom Attributes - Learn about custom attributes
Last updated