How to access the caller's phone number (inbound) in custom function or your agent prompt.

Last updated: July 2, 2025

When building a chat agent that needs to access the caller's phone number in a custom function node or in the call/chat flow, you'll need to use the built-in system variable user_number.

Using the user_number variable

The user_number system variable automatically captures the phone number of the incoming caller. To use it in your custom function node:

  1. Access the variable using {{user_number}} in your prompt or function configuration

  2. Map this variable to your function's parameters where you need to use the phone number

Additional Resources

For more information about available system variables, visit our Dynamic Variables documentation.