Documentation Index
Fetch the complete documentation index at: https://docs.quiva.ai/llms.txt
Use this file to discover all available pages before exploring further.
Embed Triggers
Embed triggers allow you to add interactive elements to your website or web application that trigger QuivaWorks flows. With simple copy-paste embed code, you can add buttons, forms, or chat interfaces that connect directly to your intelligent agents.Overview
Embed triggers come in three types:Button
Form
Chat
- ✅ No backend required - just copy and paste HTML
- ✅ Works on any website (HTML, WordPress, Squarespace, etc.)
- ✅ Customizable styling and behavior
- ✅ Secure with optional API keys
- ✅ Mobile-responsive out of the box
Button Embed
The button embed renders a clickable button on your website. When clicked, it can either trigger a flow immediately or open a chat window.What is Button Embed?
A button embed creates an interactive button that:- Triggers your flow when clicked
- Can make an HTTP request (for actions)
- Can open a chat window (for conversations)
- Passes data to your flow
- Shows loading states
- Displays success/error messages
Use Cases
Quick Actions
Quick Actions
- “Get a Quote” - Calculate and return pricing
- “Check Availability” - Query inventory
- “Generate Report” - Create document on-demand
- “Subscribe to Newsletter” - Add to mailing list
Chat Launcher
Chat Launcher
- “Chat with Support” - Open support chat
- “Talk to Sales” - Start sales conversation
- “Get Help” - Launch help chat
- “Ask a Question” - Begin Q&A
Lead Capture
Lead Capture
- “Start Free Trial” - Collect info and provision
- “Book a Demo” - Capture details and schedule
- “Request Information” - Gather requirements
Configuration
Add Button Trigger to Flow
- Open your flow in the Hub
- Click Add Trigger
- Select Embed Trigger
- Choose Button as the embed type
- The trigger is added to your flow
Configure Button Settings
- Trigger Name: Descriptive name (e.g., “Homepage Chat Button”)
- Button Text: What displays on the button (e.g., “Get Started”, “Chat Now”)
- Button Color: Primary color (hex code or color picker)
- Button Style: Choose from preset styles or customize
- Action Type: Choose what happens on click
- Make HTTP Request: Trigger flow and get response
- Open Chat: Launch chat interface
- Response Mode: Wait for completion or run in background
- HTTP Request: For actions that return data (quotes, lookups, submissions)
- Open Chat: For conversations with agents
Configure Security (Optional)
- Anyone can click the button
- Good for public websites
- Toggle Require API Key to ON
- Click Generate API Key
- Copy and save the key
- The key is automatically embedded in the code
Get Embed Code
- Click Get Embed Code button
- Copy the HTML snippet provided
- The code includes:
- Button HTML
- JavaScript to handle clicks
- Styling (optional)
- API key (if enabled)
Customization Options
- Styling
- Behavior
- Data Passing
- Button text
- Primary color
- Size (small, medium, large)
- Border radius
- Icon (optional)
Form Embed
The form embed creates customizable web forms that collect user input and submit it to your flow.What is Form Embed?
A form embed creates a data collection interface that:- Displays form fields you configure
- Collects user input
- Validates data client-side
- Submits to your flow on submit
- Shows confirmation or error messages
- Supports various field types
Use Cases
Contact Forms
Contact Forms
- Name
- Phone
- Company
- Message
- Qualify lead
- Enrich data
- Add to CRM
- Send notification
- Auto-respond
Sales/Demo Requests
Sales/Demo Requests
- Name
- Company
- Company size
- Use case
- Timeline
- Automatically qualify
- Enrich with company data
- Score against ICP
- Book demo if qualified
- Notify sales team
Support Tickets
Support Tickets
- Name
- Issue type
- Priority
- Description
- Attachments (if enabled)
- Create support ticket
- Assign to team
- Auto-respond with ticket number
- Alert team if urgent
Surveys & Feedback
Surveys & Feedback
- Satisfaction rating
- Multiple choice answers
- Open text feedback
- Contact info (optional)
- Store responses
- Analyze sentiment
- Flag negative feedback
- Send thank you
Application Forms
Application Forms
- Personal information
- Qualifications
- Documents
- References
- Validate completeness
- Screen applicants
- Send to review queue
- Auto-respond
Configuration
Add Form Trigger to Flow
- Open your flow in the Hub
- Click Add Trigger
- Select Embed Trigger
- Choose Form as the embed type
- The trigger is added to your flow
Design Your Form
- Click Add Field
- Choose field type:
- Text Input (single line)
- Text Area (multiple lines)
- Phone
- Number
- Dropdown/Select
- Radio Buttons
- Checkboxes
- Date
- File Upload (if enabled)
- Configure field settings:
- Label: What displays above the field
- Placeholder: Hint text inside field
- Required: Toggle on/off
- Validation: Email format, phone format, min/max length
- Default Value: Pre-fill if needed
Configure Form Layout
- Single Column: All fields stack vertically (default)
- Two Columns: Fields side-by-side
- Three Columns: Compact layout for many short fields
- Custom Layout: Drag and drop to arrange
- Form Title: Headline above form (optional)
- Form Description: Subtext explaining purpose
- Submit Button Text: “Submit”, “Send”, “Get Started”, etc.
- Success Message: Shown after submission
- Error Message: Shown if submission fails
Configure Submission Behavior
- Wait for Completion: Form shows result after flow completes
- Run in Background: Form shows success immediately, flow runs async
- Show Message: Display success message on same page
- Redirect: Send user to a different URL (e.g., thank you page)
- Reset Form: Clear fields and allow another submission
- Keep Values: Keep filled values (for editing)
Style Your Form
- Primary color (buttons, focus states)
- Background color
- Border radius
- Font family
- Spacing
Configure Security (Optional)
- Anyone can submit
- Use CAPTCHA to prevent spam (coming soon)
- Rate limiting to prevent abuse
- Requires API key in request
- Good for internal forms or server-side submissions
- Not typical for public website forms
- Toggle Require API Key to ON
- Generate and copy the API key
- Key is embedded in the form code
Get Embed Code
- Click Get Embed Code
- Copy the HTML snippet
- The code includes:
- Form HTML structure
- JavaScript for handling submission
- Validation logic
- Styling (optional)
Form Field Types
Text Input
Text Input
- Label: “Full Name”
- Placeholder: “John Smith”
- Required: Yes/No
- Min/Max Length
- Pattern validation (regex)
Text Area
Text Area
- Label: “Message”
- Placeholder: “Tell us about your needs…”
- Rows: 4-10
- Required: Yes/No
- Max length
Email
- Label: “Email Address”
- Placeholder: “you@example.com”
- Required: Yes (typically)
- Auto-validates email format
Phone
Phone
- Label: “Phone Number”
- Placeholder: “(555) 123-4567”
- Format: US, International, etc.
- Required: Yes/No
Number
Number
- Label: “Number of Employees”
- Min/Max values
- Step (1, 0.1, etc.)
- Required: Yes/No
Dropdown/Select
Dropdown/Select
- Label: “Company Size”
- Options:
- “1-10 employees”
- “11-50 employees”
- “51-200 employees”
- “201-1000 employees”
- “1000+ employees”
- Required: Yes/No
- Default selection
Radio Buttons
Radio Buttons
Checkboxes
Checkboxes
- Label: “Interested In:”
- Options:
- Product Demo
- Pricing Info
- Technical Documentation
- Free Trial
- Required: At least one/specific ones
Date
Date
- Label: “Preferred Date”
- Min/Max dates
- Default: Today/None
- Required: Yes/No
- Format: MM/DD/YYYY, DD/MM/YYYY, etc.
File Upload
File Upload
- Label: “Upload Resume”
- Allowed types: PDF, DOC, images, etc.
- Max size: 5MB, 10MB, etc.
- Multiple files: Yes/No
- Required: Yes/No
Validation
Client-side validation happens automatically: Built-in Validation:- Required fields must be filled
- Email format checking
- Phone format checking
- Min/max length enforcement
- Number range validation
- File type and size checking
Chat Embed
The chat embed creates an interactive chat interface on your website where users can have conversations with your AI agents.What is Chat Embed?
A chat embed creates a messaging interface that:- Opens as a widget or full-screen chat
- Allows back-and-forth conversation
- Shows typing indicators
- Supports rich messages
- Remembers conversation history
- Can be triggered by button or auto-open
Use Cases
Customer Support
Customer Support
- Answer product questions
- Troubleshoot issues
- Look up orders
- Process returns
- Escalate to humans when needed
Sales Conversations
Sales Conversations
- Ask discovery questions
- Understand needs
- Qualify leads
- Book meetings
- Answer pricing questions
Product Guidance
Product Guidance
- Product recommendations
- Feature explanations
- Configuration help
- Use case guidance
- Setup assistance
Onboarding Assistant
Onboarding Assistant
- Welcome and introduce features
- Help with setup
- Answer questions
- Provide tutorials
- Collect feedback
Configuration
Add Chat Trigger to Flow
- Open your flow in the Hub
- Click Add Trigger
- Select Embed Trigger
- Choose Chat as the embed type
- The trigger is added to your flow
Configure Chat Settings
- Chat Widget Style: Bubble, sidebar, full-screen
- Position: Bottom right, bottom left, center
- Widget Color: Primary brand color
- Agent Name: Display name (e.g., “Support Assistant”)
- Agent Avatar: Optional image URL
- Welcome Message: First message shown (e.g., “Hi! How can I help?”)
- Auto-open: Open chat automatically on page load
- Auto-open Delay: Wait X seconds before opening
- Minimize on Close: Keep widget visible when closed
- Sound Notifications: Play sound on new messages
- Desktop Notifications: Browser notifications when tab inactive
Configure Conversation Flow
- Select which agent handles conversations
- Agent must be in the same flow
- Agent receives chat messages as prompts
- Context Window: How much history to maintain
- Session Duration: How long conversations persist
- Clear on Close: Reset conversation when chat closed
Customize Appearance
- Primary color
- Secondary color
- Text color
- Background color
- Border radius
- Font family
Configure Security
- Anyone can use the chat
- No authentication required
- Rate limit to prevent abuse
- Require user login
- Pass user data to agent
- Personalized experience
- Access to account information
${trigger.userData.email}Get Embed Code
- Floating button in corner
- Clicking opens chat window
- Unobtrusive, always available
- Chat window always visible
- Part of your page layout
- Good for dedicated support pages
- Custom button on your page
- Clicking opens chat as modal overlay
- Full control over button placement and styling
Add to Your Website
- Copy the embed code
- Paste before closing
</body>tag (for bubble) - Or paste in specific container (for inline)
- Save and publish
- Test the chat on your site
Advanced Features
- Rich Messages
- Typing Indicators
- Conversation History
- Suggested Responses
- File Attachments
- Events & Callbacks
- Bold and italic
- Links
- Lists and code blocks
Security & Privacy
Securing Public Embeds
Even public embeds should have protections:Rate Limiting
Rate Limiting
- Button: 10 clicks per user per hour
- Form: 5 submissions per user per hour
- Chat: 100 messages per user per hour
CAPTCHA (Coming Soon)
CAPTCHA (Coming Soon)
- Add CAPTCHA to forms
- Challenge suspicious activity
- Reduce spam submissions
Content Security
Content Security
- Input sanitization (automatic)
- XSS prevention (built-in)
- SQL injection prevention (N/A, no direct DB access)
- File upload scanning (for upload-enabled features)
Privacy Compliance
Privacy Compliance
- Don’t collect more data than needed
- Display privacy policy link
- Allow users to delete data
- Comply with GDPR, CCPA
- Use consent checkboxes for sensitive data
Using API Keys
For internal or secured embeds:Generate API Key
- Toggle Require API Key to ON
- Click Generate API Key
- Copy and save securely
Best Practices
Keep forms short
Keep forms short
- Higher completion rates
- Better user experience
- Less overwhelming
- Faster submissions
Set clear expectations
Set clear expectations
- “We’ll respond within 24 hours”
- “This takes 2 minutes to complete”
- “Your information is secure”
- Welcome message: “Hi! I can help with orders, returns, and product questions.”
- Response time: “I typically respond in under 30 seconds”
- Escalation: “If I can’t help, I’ll connect you with a human”
Provide immediate feedback
Provide immediate feedback
- Show loading spinner on submit
- Display success message immediately
- Send confirmation email
- Show typing indicator while processing
- Acknowledge messages (“Let me look that up…”)
- Set response time expectations
- Disable during processing
- Show loading state
- Display result clearly
Make it mobile-friendly
Make it mobile-friendly
- Use mobile-appropriate input types (email, tel, number)
- Large tap targets (44px minimum)
- Single column layout on mobile
- Avoid dropdowns (use radio buttons for few options)
- Full-screen on mobile
- Easy to close
- Readable text size (16px minimum)
- Thumb-friendly send button
- Large enough to tap (44px minimum)
- Not too close to edges
- Clear label visible at all times
Test thoroughly
Test thoroughly
- ✅ Desktop browsers (Chrome, Firefox, Safari, Edge)
- ✅ Mobile browsers (iOS Safari, Android Chrome)
- ✅ Tablet sizes
- ✅ Form validation works
- ✅ Error handling graceful
- ✅ Success flow works end-to-end
- ✅ Styling matches your site
- ✅ Loading states display
- ✅ Rate limiting prevents spam
- ✅ Analytics tracking (if enabled)
Monitor and optimize
Monitor and optimize
- Forms: Submission rate, completion rate, time to complete, abandonment rate
- Chat: Conversations started, messages per conversation, resolution rate, satisfaction
- Buttons: Click rate, success rate, error rate
- High abandonment → Simplify form
- Low click rate → Improve button copy/placement
- Low satisfaction → Improve agent responses
- High error rate → Fix technical issues
Troubleshooting
Embed not showing
Embed not showing
- JavaScript loaded? (check browser console)
- Container ID correct? (for inline embeds)
- Flow deployed? (not just saved)
- Any JavaScript errors?
- Ad blocker interfering?
- Verify script URL is correct
- Check container element exists
- Deploy the flow if not deployed
- Test in incognito mode (no extensions)
- Check browser console for errors
Form not submitting
Form not submitting
- Required fields filled?
- Validation errors shown?
- Network error? (check console)
- Rate limit reached?
- Flow deployed and active?
- Fill all required fields
- Fix validation errors
- Check network tab for failed requests
- Wait if rate limited
- Verify flow is deployed
Chat not responding
Chat not responding
- Agent connected to flow?
- Flow deployed?
- Agent hitting errors?
- Network connectivity?
- Rate limits reached?
- Verify agent configuration
- Check flow execution logs
- Test agent separately
- Check browser network tab
- Review rate limit settings
Styling issues
Styling issues
- Embed doesn’t match site style
- CSS conflicts with site
- Responsive issues on mobile
- Colors not applying
- Use custom CSS overrides
- Check CSS specificity
- Test on actual mobile devices
- Use browser dev tools to debug
- Increase CSS specificity if needed:
CORS errors
CORS errors
- Embedding on unauthorized domain
- Missing domain in allowlist
- Go to trigger settings
- Add your domain to Allowed Domains:
- Save and test again