Hi, Welcome back! Tokens in GPTWeb let you personalize every touchpoint with dynamic visitor data. Instead of generic messages, you can create personalized experiences like "Hello from your organization!" automatically. Here's everything you need to know about tokens, conditionals, and formatters.
Basic Token Syntax
Tokens use double curly braces: Tokens work in welcome messages, campaigns, emails, agent descriptions, and more. They get replaced with actual visitor data at runtime.
Using Conditionals with Tokens
Conditionals let you show different content based on visitor status or data availability. Here's how to use them:
Welcome back! Your last visit: Hello! Thanks for visiting. ๐ You're a Discussion Qualified Lead! Your score: Representing Tell us about your organization
Using Formatters with Tokens
Formatters transform token values for better display. Combine them with fallback values for robust personalization:
DATE/TIME FORMATTERS:
Last seen: โ January 5, 2026 Joined: โ Jan 5, 2026 Visit time: โ 5:30 PM Recent: โ 2 days ago NUMBER FORMATTERS:
Visits: โ 1,234 Revenue: โ $1,234.50 Score: โ 85.6% TEXT FORMATTERS:
Email: โ nick@example.com Name: โ Nick Company: โ your organization Phone: โ (650) 555-1234
Combining Formatters with Fallbacks
Create robust personalization that always displays well:
Hello! Last visit: Company: Score:
All Available Tokens
| Category |
Token |
Description |
Example Output |
| Visitor |
{{raw:visitor.first_name}} |
First name |
Nick |
| Visitor |
{{raw:visitor.last_name}} |
Last name |
Bonfiglio |
| Visitor |
{{raw:visitor.email}} |
Email address |
{{visitor.email}} |
| Visitor |
{{raw:visitor.company}} |
Company name |
{{visitor.company}} |
| Visitor |
{{raw:visitor.phone}} |
Phone number |
(555) 123-4567 |
| Visitor |
{{raw:visitor.title}} |
Job title |
CEO |
| Visitor |
{{raw:visitor.lead_score}} |
Lead score (0-100) |
85 |
| Visitor |
{{raw:visitor.visit_count}} |
Number of visits |
12 |
| Visitor |
{{raw:visitor.known}} |
Is visitor identified |
true/false |
| Visitor |
{{raw:visitor.is_dql}} |
Is Discussion Qualified Lead |
true/false |
| Visitor |
{{raw:visitor.last_seen}} |
Last visit timestamp |
2026-01-05T10:30:00Z |
| Visitor |
{{raw:visitor.created_at}} |
First visit timestamp |
2025-12-01T09:15:00Z |
| Visitor |
{{raw:visitor.recent_conversations}} |
Last 20 chat messages |
(formatted HTML) |
| Score |
{{raw:score.total_score}} |
Overall AI score |
87 |
| Score |
{{raw:score.engagement}} |
Engagement score |
45 |
| Score |
{{raw:score.behavioral}} |
Behavioral score |
32 |
| Score |
{{raw:score.firmographic}} |
Firmographic score |
10 |
| AI Analysis |
{{raw:ai.reasoning}} |
AI decision reasoning |
High engagement pattern |
| AI Analysis |
{{raw:ai.decision}} |
AI decision outcome |
qualified |
| AI Analysis |
{{raw:ai.confidence}} |
AI confidence level |
0.92 |
| Branding |
{{raw:company_name}} |
{{visitor.company}} name |
{{visitor.company}} |
| Branding |
{{raw:branding.logo_html}} |
Logo as HTML img tag |
<img src='...' /> |
| Branding |
{{raw:branding.email_footer}} |
Standard email footer |
(HTML footer) |
| Branding |
{{raw:branding.primary_color}} |
Brand color hex |
#4A90E2 |
| Trigger |
{{raw:trigger.campaign_name}} |
Campaign that triggered agent |
Product Demo Request |
| Trigger |
{{raw:trigger.segment_name}} |
Segment that triggered agent |
Enterprise Leads |
| Trigger |
{{raw:trigger.action}} |
Action that triggered agent |
form_submitted |
All Formatters Reference
| Formatter |
Category |
Usage |
Input Example |
Output Example |
| |date |
Date/Time |
{{raw:token|date}} |
2026-01-05T10:30:00Z |
January 5, 2026 |
| |shortdate |
Date/Time |
{{raw:token|shortdate}} |
2026-01-05T10:30:00Z |
Jan 5, 2026 |
| |time |
Date/Time |
{{raw:token|time}} |
2026-01-05T10:30:00Z |
10:30 AM |
| |datetime |
Date/Time |
{{raw:token|datetime}} |
2026-01-05T10:30:00Z |
Jan 5, 2026 10:30 AM |
| |relative |
Date/Time |
{{raw:token|relative}} |
2026-01-03T10:30:00Z |
2 days ago |
| |number |
Numbers |
{{raw:token|number}} |
1234567 |
1,234,567 |
| |currency |
Numbers |
{{raw:token|currency}} |
1234.50 |
$1,234.50 |
| |percent |
Numbers |
{{raw:token|percent}} |
85.6 |
85.6% |
| |phone |
Text |
{{raw:token|phone}} |
6505551234 |
(650) 555-1234 |
| |uppercase |
Text |
{{raw:token|uppercase}} |
hello |
HELLO |
| |lowercase |
Text |
{{raw:token|lowercase}} |
HELLO |
hello |
| |capitalize |
Text |
{{raw:token|capitalize}} |
hello world |
Hello World |
Real-World Complete Example
Here's a complete email template combining conditionals, formatters, and fallbacks:
Subject: Welcome back!Thanks for your interest! Hi, ๐ Great news! Based on your engagement, you're a Discussion Qualified Lead with a score of. We noticed you're with. Organizations like yours typically benefit from our Modern AI Web platform. Tell us about your organization so we can personalize your experience. Your Activity:
- Total visits: - Last seen: - Joined: Your engagement score: Best regards,
Best Practices
here are key practices for
using tokens effectively at organizations like your organization: 1.
Always use fallbacks for tokens that might be empty: 2.
Format dates and numbers for better readability: 3.
Capitalize names for professional appearance: 4.
Use conditionals to avoid showing empty data: Check if a field exists before displaying it 5.
Test with anonymous visitors to ensure fallbacks work properly 6.
Combine formatters with fallbacks for robust output:
Where Tokens Work
Tokens are supported across GPTWeb: โ
Welcome messages
โ
Campaign messages and CTAs
โ
Email templates (subject and body)
โ
Agent descriptions and actions
โ
Custom forms
โ
Toaster notifications
โ
Modal content
โ
AI zones in emails Tokens are replaced at runtime with actual visitor data, making every interaction personal and relevant.
GPTWeb is the future of engagement, websites and marketing automation combined that is built for the AI era, built for now.