user_identifier
- Type:
string - Description: Unique identifier for the user
- Note: Must be a string. Convert numeric IDs using
String(userId)
company
- Type:
string(optional) - Description: Company name for user tracking, analytics, and filtering
- Usage: Used for user segmentation and analytics in the dashboard
- Benefits:
- Filter conversations by company in the dashboard
- Analyze usage patterns by organization
- Generate company-specific reports and statistics
enableUsageChecking
- Type:
boolean - Default:
truewhenuser_identifieris provided - Description: Control usage limit checking before widget initialization
- Checks user’s usage against configured monthly limits
- Silently blocks widget if limits exceeded
- Falls back to allowing access if check fails
How Usage Checking Works
When usage checking is active:- Pre-initialization Check: Before the widget appears, the SDK checks the user’s current usage against configured limits
- Silent Blocking: If limits are exceeded, the widget doesn’t initialize (no error shown to end user)
- Error Callback: The
onErrorcallback receives details about usage limit violations - Fail-Safe Behavior: If the usage check API fails, the widget initializes normally (conservative approach)
Configurable Limits
The system can enforce limits on:- Chat Conversations: Maximum number of chat sessions per month
- Voice Conversations: Maximum number of voice sessions per month
- Total Minutes: Maximum duration across all conversations per month
