PromptDesk OS
Prompt Variables
Prompt Variables
You can add prompt variables by using the {{variable}}
Handlebars.js syntax. The following examples will always be fully supported in the PromptDesk OS and SDKs.
Simple Variables
{{first_name}}
Object Variables
{{user.name}}
Array Variables
{{user.emails[0]}}
Nested Variables
{{user.address.city}}
Each Loop
{{#each user.emails}}
- {{this}}
{{/each}}
If Conditional
{{#if user.emails}}
{{user.emails[0]}}
{{else}}
No emails
{{/if}}
Editing Prompt Variables
Add a prompt example:
- Define a variable using the
{{variable}}
syntax - Click the "Variable" name
- Provide a variable value
- Click "Okay"