Overview
Pass arbitrary JSON metadata when initializing the widget to:- Personalize the AI assistant using Data-Driven Rules
- Track users across your CRM systems via lead webhooks
Basic Usage
Hot Reload
Update metadata when users log in or state changes:Chat history is preserved when updating metadata mid-session. The AI will adapt its behavior based on the new values.
Data-Driven Rules
Custom metadata powers Data-Driven Rules - a feature that lets you customize the AI assistant’s behavior based on visitor context.How It Works
- Pass metadata fields from your website (e.g.,
isAuthenticated,customerType) - Configure rules in the AI Playbook dashboard
- The AI automatically adapts its responses based on the metadata values
Predefined Fields
These fields have built-in example instructions in the dashboard:Custom Fields
You can use any field name you like. Configure a “Custom field” rule in the AI Playbook to use it.Example: Authentication Prompt
Rule configuration:- Field:
isAuthenticated - Instructions: “If false, after they’ve sent 3 messages, politely suggest logging in to save their conversation. If true, don’t mention logging in.”
Webhook Integration
Metadata also appears inlead.captured.v1 webhooks for CRM integration: