Skip to main content

Using Dynamic Data in CommandBar

One of the most important aspects of ensuring that you are helping the right users at the right time, is by customizing experiences for specific groups of users. Once added, dynamic data can let you do things like customize text to include a user's first_name, display announcements to select user groups (isPaid or super_user). In this guide, we'll show you how to share dynamic data with CommandBar, and list out the surface area that can be customized.

Sharing Dynamic Data with CommandBar

Dynamic data can be shared with CommandBar in two main ways:

  • Each time CommandBar starts, you can pass userProperties along with boot
  • At any time, you can share new dynamic data with CommandBar with addMetadata

Displaying Dynamic Data with CommandBar experiences

Don't have time to read a novel during work hours? That's okay! The quickest way to see if you can use dynamic data within CommandBar is by typing {{ in any input field. Once you do, CommandBar will pop up all the dynamic data that you've shared with CommandBar. That's it!

Dynamic Data Autocomplete

Have more time? Here's all the different surface area that dynamic data can be used.