Skip to main content
The User object lets you query information about the contact interacting with your flow, such as their name, phone number, and channel metadata.

Available data

The available data depends on the channel, but a typical example is:
{
  "id": "PHONE_NUMBER",
  "names": "John Doe"
}

Using user variables

You can access any user property with the syntax {{$user.property}}:
  • {{$user.id}} shows the user’s unique identifier for the channel. On WhatsApp this is the user’s phone number.
  • {{$user.names}} shows the user’s name.
In channels like WhatsApp, {{$user.id}} equals the contact’s number without symbols or spaces. For example, +1-555-111-2222 is represented as 15551112222.

User in code nodes

Inside code nodes, you have the User object available through $user:
// Access the user's id
const id = $user.get('id')

// Access the user's name
const name = $user.get('names')
The User object is read-only. If you want to persist new contact information, save that data in Memory or Context.