Advanced
Dynamic Variables
Sometimes you want to use a dynamic piece of content within your Flow such as an email address or a localized string for i18n. In these cases, you can use dynamic variables to personalize for each user.
Setting Dynamic Variables
Flows support setting custom variables anywhere in the data defined from the Frigade dashboard with the ${variable}
pattern. For instance,
your Flow might look like this:
Then using your React component of choice, you can set the firstName
variable like so:
Variables can also be added at the global level via the <Frigade.Provider />
. This will make them accessible in all Flows and Collections.
To pass in variables globally, simply pass the variables
object to the provider:
See the Provider documentation for more details.