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: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 theUser object available through $user:
The
User object is read-only. If you want to persist new contact information, save that data in Memory or Context.