Tying Variables to Deployments

When building an application with multiple profiles and deployments, oftentimes they require different configuration settings or inputs based on the deployment. To help with this, variables are capable of being promoted to an App Setting variable, which allows variables to be configured and initialized at the profile level.  For example, if there are multiple deployments such as QA or PROD, App Setting variables can be used to initialize different IDs/URLs based on those deployments so the application can have different parameters set at the profile level. The benefit of using App Setting variables is that the variables are all surfaced in Configuration Builder, which makes managing the variables a lot easier across different deployments.

How to promote a variable to an app setting

Any type of variables can be promoted to App Setting variables, whether they are on Web Pages, Web Flows, or Global Variables. To promote a variable to an App Setting variable right-click on the variable in the inspector. A dropdown will appear and provide the option to Convert to Setting

organizing info

After converting the variable to an App Setting Variable, the variable can be accessed in Configuration Builder. To access the App Setting variable, go to Configuration variable and scroll down to App Settings. This is where the variable can be initialized for each profile. The value also accepts Airscript as well.

mceclip1.png

Using the App Setting Variable

The App Setting variable can be accessed in Web Builder by using the 'profile' namespace. For example, to access the App Setting variable in the previous example, use:

profile.id