Important: The Shopify integration allows you to embed an AI Employee on your Shopify store to handle customer inquiries, provide product recommendations, assist with orders, and improve the shopping experience.
🔢 Table of Contents
- Overview
- Prerequisites
- Installation Steps
- Configuring Your AI Employee
- Customization Options
- Common Use Cases
- Troubleshooting
- Best Practices
1. Overview
What This Integration Does
The Shopify integration embeds a chat widget on your store, powered by your AI Employee. Customers can:- Ask questions about products
- Get sizing and specification information
- Track order status
- Request returns or exchanges
- Get shopping recommendations
- Receive instant support 24/7
Key Features
- Easy Installation: Add with a simple script tag
- Customizable Widget: Match your store’s branding
- Mobile Responsive: Works on all devices
- Product Knowledge: Connect datastores with product info
- Order Integration: Can integrate with Shopify APIs (via HTTP Tool)
- Lead Capture: Collect customer information
- Multi-language: Support multiple languages
Technical Requirements
- Active Shopify store (any plan)
- Access to theme code editor
- ZappWay AI Employee created and configured
- Basic familiarity with HTML (helpful but not required)
2. Prerequisites
Before You Begin
1. Create an AI Employee: If you haven’t already:- Go to AI Employees
- Click “Create AI Employee”
- Configure settings and instructions
- See AI Employee Guide for details
- Product descriptions
- Sizing guides
- Shipping policies
- Return policies
- FAQs
- Open AI Employee settings
- Go to Tools tab
- Add Datastore Tool
- Select your product datastore
- Save configuration
- Open your AI Employee in the dashboard
- Copy the Agent ID from the URL or settings
- Keep this handy for installation
clf1a2b3c4d5e6f7g8h9
3. Installation Steps
Step 1: Access Theme Code Editor
- Log in to your Shopify Admin dashboard
- Navigate to Online Store → Themes
- Find your current active theme
- Click Actions → Edit code
Step 2: Copy Integration Script
Copy the following script, replacingYOUR_AGENT_ID with your actual Agent ID:
Step 3: Insert Script in Theme
- In the theme code editor, locate the
theme.liquidfile in the Layout folder - Find the closing
</head>tag (usually near the top of the file) - Paste the script above the
</head>tag - Click Save in the top-right corner
Important: The script must be placed before the </head> tag, not after.
Step 4: Verify Installation
- Visit your Shopify store in a new browser tab
- Look for the chat bubble in the bottom-right corner
- Click the bubble to open the chat widget
- Send a test message to your AI Employee
- Verify responses are working correctly
4. Configuring Your AI Employee
Recommended Instructions for Shopify
Configure your AI Employee with instructions specific to e-commerce:Connecting Product Data
Create Product Datastore:- Go to Datastores
- Click “Create Datastore”
- Name it “Product Catalog” or similar
- Add datasources:
- Product descriptions (copy from Shopify product pages)
- Sizing guides (PDF or text)
- Shipping policy
- Return policy
- FAQs
- Open AI Employee → Tools tab
- Add Datastore Tool
- Select “Product Catalog” datastore
- Save
Optional: Order Tracking Integration
To enable order tracking, set up the HTTP Tool to query Shopify’s API: See: HTTP Tool Guide Basic Setup:- Add HTTP Tool to AI Employee
- Configure endpoint:
https://your-store.myshopify.com/admin/api/2024-01/orders.json - Add authentication (Shopify API key)
- Update instructions to mention order tracking capability
5. Customization Options
Widget Appearance
Customize the chat bubble and widget to match your store’s branding:| Option | Type | Default | Description |
|---|---|---|---|
theme.primaryColor | string | #3B82F6 | Main brand color |
theme.position | string | right | Bubble position (left/right) |
theme.bottom | number | 20 | Distance from bottom (px) |
theme.right | number | 20 | Distance from right (px) |
theme.left | number | 20 | Distance from left (px) |
window.title | string | Chat | Widget header title |
window.welcomeMessage | string | - | Initial greeting message |
window.height | number | 600 | Widget height (px) |
window.width | number | 400 | Widget width (px) |
Show on Specific Pages
To show the widget only on certain pages:- Product pages:
/products/ - Collection pages:
/collections/ - Cart page:
/cart - Checkout:
/checkout - All pages: (no condition)
Hide on Mobile
If you want to hide the widget on mobile devices:6. Common Use Cases
Product Recommendations
Customer: “I’m looking for a gift for my wife” AI Employee:- Product datastore with detailed descriptions
- Instructions to ask qualifying questions
- Knowledge of product categories
Order Tracking
Customer: “Where is my order #12345?” AI Employee:- HTTP Tool configured with Shopify API
- API credentials with order read permission
- Instructions for handling order queries
Sizing Assistance
Customer: “What size should I get for the Classic T-Shirt?” AI Employee:- Sizing guide uploaded to datastore
- Instructions to ask clarifying questions
- Product-specific sizing information
Returns and Exchanges
Customer: “I want to return my order” AI Employee:- Return policy in datastore
- Form Tool for collecting return details
- Instructions for return process
Abandoned Cart Recovery
Trigger: Customer has items in cart but hasn’t checked out AI Employee:- Proactive message trigger (custom implementation)
- Instructions for cart recovery
- Knowledge of current promotions
7. Troubleshooting
Chat Bubble Not Appearing
Problem: Widget doesn’t show on your store Checks:-
Verify Agent ID is correct:
- Check for typos in the script
- Ensure Agent ID matches your dashboard
-
Check script placement:
- Must be before
</head>tag - Not inside any other script tags
- Saved correctly in theme.liquid
- Must be before
-
Clear browser cache:
- Hard refresh: Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
- Try incognito/private browsing mode
-
Check browser console for errors:
- Open DevTools (F12)
- Go to Console tab
- Look for error messages
- Common error: “Failed to load module”
-
Verify theme file:
- Ensure you edited the active theme
- Check that changes were saved
- Preview theme before publishing
AI Not Responding
Problem: Chat opens but AI doesn’t reply Checks:-
Test AI Employee directly:
- Go to AI Employee in ZappWay dashboard
- Use test chat interface
- If it works there, issue is with integration
-
Check AI Employee status:
- Ensure AI Employee is not disabled
- Verify instructions are configured
- Check that datastores are connected
-
Review rate limits:
- Check if rate limits are exceeded
- See Rate Limit Guide
-
Check datastore status:
- Ensure datastores are processed (not “Processing”)
- Verify content is indexed
Widget Styling Issues
Problem: Widget doesn’t match store design Solutions:- Customize colors:
- Adjust position:
- Change widget size:
Script Loading Slowly
Problem: Widget takes time to appear Causes:- CDN loading delay (rare)
- Slow network connection
- Other scripts blocking
- Use async loading:
- Self-host the script (advanced):
- Download library from CDN
- Upload to Shopify theme assets
- Update script src to point to local file
8. Best Practices
Content Strategy
Keep Product Info Updated: ✅ Do:- Update datastore when products change
- Include seasonal product info
- Add new products to datastore immediately
- Remove discontinued products
- Outdated pricing information
- Products no longer in stock
- Inconsistent product descriptions
- Detailed product descriptions
- Materials and specifications
- Care instructions
- Sizing charts (with measurements)
- Color options and variations
- Product use cases and benefits
- Customer reviews and testimonials
- Comparison with similar products
AI Employee Configuration
Encourage Browsing:Customer Experience
Response Time:- AI should respond within 2-3 seconds
- If processing longer (e.g., API calls), show typing indicator
- Provide status updates for complex queries
Analytics and Improvement
Track Key Metrics:- Most common customer questions
- Products frequently asked about
- Drop-off points in conversations
- Questions AI couldn’t answer
- Check conversation logs
- Identify knowledge gaps
- Update datastore with missing info
- Analyze top product inquiries
- Update AI instructions based on trends
- Add new FAQs to datastore
- Major knowledge base overhaul
- Review and refine AI personality
- A/B test different approaches
Security
Protect Customer Data:- Don’t store payment information in chat
- Don’t ask for sensitive data (passwords, full card numbers)
- Comply with privacy regulations (GDPR, CCPA)
- Use secure connections (HTTPS) only
❌ Access customer credit cards
❌ Modify orders without confirmation
❌ Share other customers’ information
❌ Make unauthorized discounts
📞 Support & Resources
Getting Help
In-App Support:- Help button in ZappWay dashboard
- Live chat (available on Pro+ plans)
Feedback
Report Issues:- Email: [email protected]
- Include:
- Shopify store URL
- Agent ID
- Screenshots of issue
- Browser console errors (if any)
✅ Quick Reference
Installation Checklist
Script Template
Common Customizations
Change bubble position to left:Last Updated: January 2025
Version: 1.0
Platform: ZappWay × Shopify Integration

