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.

Property
Type
Description

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

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():

  1. Merges data - New properties are merged with existing user data

  2. Syncs to server - Updated data is sent to Cueflow

  3. Re-evaluates messages - Targeting rules are checked against new data

  4. 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() first

  • Calling before init shows a warning: "Cueflow: Not initialized"

Next Steps

Last updated