Documentation
Shopify Integration Guide
Learn how to connect your Shopify store to LeadMachine to automatically sync customers and orders as leads.
What is the Shopify Integration?
The Shopify integration connects your Shopify store(s) to LeadMachine, automatically syncing:
Customers:
- Contact information
- Addresses
- Order history
- Customer metadata
- Order details and totals
- Line items
- Financial status
- Fulfillment status
- 📊 All customer data in one place
- 🔄 Automatic real-time syncing
- 🏷️ Auto-tagging with "Customer" tag
- 📈 Track customer behavior
- 💰 See order history per lead
- 🎯 Better customer targeting
- Shopify store owner or staff account
- LeadMachine admin access
- Active Shopify store with customers
- LeadMachine: Admin or SuperAdmin
- Shopify: Store owner or staff with app installation permissions
- Log in to LeadMachine
- Go to Company Settings
- Click the Integrations tab
- Find the Shopify section
- Click "Connect Shopify Store" button
- Enter your Shopify store URL - Format:
- Click "Connect"
- You'll be redirected to Shopify
- Review the permissions LeadMachine is requesting: - Read customers - Write customers (for updates) - Read orders - Write orders (for metadata) - Read products - Read customer events
- Click "Install app" to authorize
- You'll be redirected back to LeadMachine
- After authorization, you'll see your store connected
- Click "Sync Now" to import existing data
- First sync may take a few minutes depending on data volume
- Progress indicator shows sync status
- When complete, you'll see: - Number of customers synced - Number of orders synced - Any errors or warnings
- 0-100 customers: ~30 seconds
- 100-500 customers: 1-2 minutes
- 500-1000 customers: 2-5 minutes
- 1000+ customers: 5-10 minutes
- First name
- Last name
- Email address
- Phone number
- Company name (if provided)
- Street address
- City
- State/Province
- ZIP/Postal code
- Country
- Shopify customer ID
- Total orders count
- Total spent
- Account creation date
- Tags (Shopify tags)
- Notes
- Creates a lead in LeadMachine
- Stores email and phone as contacts
- Saves Shopify data as entity metadata
- Links to company via company_id
- Order number (e.g., #1001)
- Order date
- Total price
- Subtotal
- Tax amount
- Shipping amount
- Currency
- Financial status (paid, pending, etc.)
- Fulfillment status (fulfilled, partial, etc.)
- Line items count
- Links order to customer lead
- Multiple orders per customer
- Full order history visible
- Complete order JSON stored
- All line items
- Shipping details
- Discount codes used
customers/create- New customer addedcustomers/update- Customer information changedorders/create- New order placedorders/updated- Order status changed- Event happens in Shopify (new customer, new order)
- Shopify sends webhook to LeadMachine
- LeadMachine processes the data
- Lead is created/updated automatically
- "Customer" tag is applied
- Data appears in LeadMachine within seconds
- All webhooks are HMAC verified
- Ensures data comes from Shopify
- Prevents unauthorized access
- Secure data transmission
- Go to Company Settings → Integrations
- Find your connected Shopify store
- Click "Sync Now"
- Syncs all customers and orders
- Updates existing leads
- Adds new leads
- After connecting for first time
- If you suspect data is out of sync
- To import historical data
- After making bulk changes in Shopify
- 🛒 Customer tag = Has placed orders (
orders_count > 0) - ✉️ Newsletter tag = No orders yet but accepts marketing (
orders_count = 0ANDaccepts_marketing = true) - 🛒 Customer tag (fallback) = Applied if neither condition is met
- Distinguish between paying customers and newsletter subscribers
- Target marketing campaigns more effectively
- Track conversion from newsletter subscriber to customer
- Automatically segment your audience
- Both tags are from the default tag set (available to all companies)
- Cannot be disabled (automatic)
- Applied intelligently based on customer behavior
- During manual customer sync
- When customer/create or customer/update webhook fires
- When customer/marketing_consent_update webhook fires
- When order with customer data syncs
- When order webhook contains customer data
- Newsletter subscriber makes first purchase → "Newsletter" tag remains, "Customer" tag added
- Customer opts into marketing → No change (already has "Customer" tag)
- Customer updates marketing consent → Tags re-evaluated
- Once applied, tags stay on lead
- Won't be removed by subsequent syncs
- Can be manually removed if needed
- Will be re-applied based on current Shopify data on next sync
- Instantly see which leads are paying customers vs. newsletter subscribers
- Visual distinction from prospects
- Color-coded badges on lead cards
- Understand customer journey at a glance
- Filter leads by "Customer" tag to see paying customers only
- Filter by "Newsletter" tag to find subscribers who haven't purchased yet
- Separate customer list from prospects
- Combine with other filters (VIP + Customer, Newsletter + Hot Lead)
- Quick access to segmented views
- Track newsletter subscriber to customer conversion
- Measure customer engagement and lifetime value
- Identify upsell opportunities for existing customers
- Track marketing consent acceptance rates
- Monitor conversion funnel from subscriber to customer
- Target paying customers with loyalty campaigns
- Send first-purchase incentives to newsletter subscribers
- Exclude paying customers from acquisition campaigns
- Create customer-only email sequences
- Personalize messaging based on customer status
- Re-engage subscribers who haven't purchased
- Newsletter tag only = Nurture campaigns, first-purchase discounts
- Customer tag only = Loyalty programs, upsells, repeat purchase incentives
- Both tags = VIP treatment for customers who engage with marketing
- Neither tag = General prospects, requires manual follow-up
- All standard lead fields populated
- Email and phone saved as contacts
- Address displayed with map (if Google Maps configured)
- Shopify metadata visible in custom fields
- Card showing all orders from this customer
- Order number, date, and total
- Financial and fulfillment status
- Click order to see full details
- Links to Shopify admin (for store owners)
- "Customer" tag visible below lead name
- Other applied tags shown
- Click "Manage Tags" to add more tags
- Customer name
- Location
- Tags (including "Customer" tag)
- Status
- Created date
- Expand "Tag" filter accordion
- Click the "Customer" tag
- See only Shopify customers
- Combine with other filters as needed
- Recent orders overview
- Top customers
- Revenue analytics
- Customer growth trends
- Quick links to Shopify admin
- Main navigation → Shopify Dashboard
- Or Company Settings → Integrations → View Dashboard
- Go to Company Settings → Integrations
- Click "Connect Another Store"
- Follow the same connection process
- Each store syncs independently
- All customers go into same lead database
- Multiple brands
- Different product lines
- International stores
- Test and production stores
- If same customer exists in multiple stores
- LeadMachine matches by email
- Updates existing lead rather than creating duplicate
- Order history shows orders from all connected stores
- Company Settings → Integrations
- See all connected stores
- Store name and URL
- Last sync time
- Connection status
- Click "Sync Now" on specific store
- Syncs only that store's data
- Doesn't affect other stores
- Find the store in Integrations
- Click "Disconnect" or settings icon
- Confirm disconnection
- Webhooks are removed
- Existing leads remain (not deleted)
- No more automatic syncing
- Can reconnect at any time
- Follow same connection process
- Previous data still exists
- Syncing resumes
- Name: Store name (e.g., "My Store")
- Helps identify which store the lead came from
- Created automatically on first sync
- Applied to all leads from that store
- Each store gets its own lead type
- Easy to filter by store
- Track performance per store
- Go to Company Settings → Lead Types
- Find the Shopify store lead types
- Edit name, icon, or color
- Changes apply to all leads with that type
- Verify store URL is correct
- Ensure you're logged into Shopify
- Check that you have install permissions
- Try clearing browser cache and reconnecting
- Check if app was uninstalled in Shopify
- Verify API credentials haven't expired
- Reconnect the store
- Contact support if issue persists
- Check connection status
- Verify webhooks are registered
- Try manual sync
- Check error logs in Company Settings
- Ensure order sync is enabled
- Check that orders have customer data
- Verify order date range (if applicable)
- Try manual sync
- LeadMachine matches by email
- If email is different, new lead is created
- Can manually merge duplicate leads
- Update email to prevent future duplicates
- Large stores take longer
- 1000+ customers may take 5-10 minutes
- Sync runs in background
- You can navigate away during sync
- Check last sync time
- Try manual sync to update
- Verify which data takes precedence
- Some fields may be overridden locally
- Check currency conversion
- Verify tax calculation
- Compare with Shopify admin
- Report discrepancies to support
- Check if Shopify has the data
- Some fields are optional in Shopify
- Customers may not have provided all info
- LeadMachine only syncs what Shopify has
- Check webhook status in Shopify admin
- Settings → Notifications → Webhooks
- Verify webhook URL is correct
- Check webhook delivery history
- Re-register webhooks via LeadMachine
- Shopify has delivery queues
- May take 1-2 minutes during high traffic
- Generally under 30 seconds
- Not an issue with LeadMachine
- Clean up Shopify customer data
- Remove test customers
- Ensure customer emails are valid
- Review customer tags in Shopify
- Run initial manual sync
- Verify data looks correct
- Check that "Customer" tags are applied
- Test a few sample leads
- Monitor first few webhook events
- Regularly review synced leads
- Remove duplicates if they occur
- Update incorrect information
- Add additional tags as needed
- Use "Customer" tag for base filtering
- Add VIP tag for high-value customers
- Tag by purchase category if relevant
- Tag by customer tier or status
- Use store-based lead types
- Or create custom types for product lines
- Helps with reporting and filtering
- Keep type names descriptive
- Webhooks handle real-time syncing
- Manual sync only when needed
- Don't sync more than once per hour
- Large stores: sync during off-hours
- Monitor database size
- Archive old leads if needed
- Focus on active customers
- Delete test data periodically
- Never share Shopify API keys
- Use strong passwords
- Enable 2FA on Shopify account
- Regularly review connected apps
- Review webhook deliveries
- Check for suspicious activity
- Audit lead access logs
- Remove disconnected stores
- Shopify customer tags → Lead tags
- Shopify metafields → Custom fields
- Order notes → Lead notes
- Custom attributes → Custom fields
- Custom mapping requires configuration
- Contact support or admin
- Provide mapping requirements
- Changes take effect on next sync
- LeadMachine uses Shopify Admin API
- Version 2024-10 (or latest stable)
- REST and GraphQL endpoints
- Follows Shopify rate limits
- Build custom sync scripts
- Add additional data points
- Create custom reports
- Integrate with other tools
- Has placed orders → "Customer" tag
- No orders but accepts marketing → "Newsletter" tag
- Neither condition → "Customer" tag (fallback)
- Check this documentation first
- Review error messages carefully
- Try manual sync to troubleshoot
- Check Shopify webhook delivery logs
- Contact LeadMachine support
- Include store URL and error details
- In-app support tickets
- Email support
- Documentation (this guide)
- Knowledge base articles
- 🛒 Customer = Has placed orders
- ✉️ Newsletter = Accepts marketing but hasn't purchased yet
- Use tags to create targeted campaigns and measure conversion
Orders:
Benefits:
Setting Up Shopify Integration
Prerequisites
What You Need:
Permissions Required:
Step-by-Step Setup
1. Access Integration Settings
2. Connect Your Store
yourstore.myshopify.com
- Or: yourstore.com (if you have a custom domain)
3. Authorize LeadMachine
4. Initial Sync
First Sync Time Estimates:
What Gets Synced
Customer Data
Basic Information:
Address Information:
Shopify Metadata:
How It's Stored:
Order Data
Order Details:
Order Status:
Customer Link:
Order Metadata:
Automatic Syncing
Real-Time Webhooks
Once connected, LeadMachine registers webhooks with Shopify for:
Customer Webhooks:
Order Webhooks:
How Webhooks Work:
Webhook Verification:
Manual Sync
You can manually sync at any time:
When to Manual Sync:
Auto-Tagging with Smart Behavior-Based Tags
How Smart Auto-Tagging Works
LeadMachine automatically applies tags to Shopify customers based on their behavior and marketing preferences:
Smart Tagging Logic:
Why This Matters:
Tags Applied:
When Tags Are Applied:
Tag Transitions:
Tag Persistence:
Benefits of Smart Auto-Tagging
Easy Identification:
Powerful Filtering:
Reporting & Analytics:
Workflow Automation:
Campaign Segmentation:
Viewing Synced Data
On Lead Details Page
Customer Information:
Shopify Orders Section:
Tags Display:
On Leads List Page
Lead Cards Show:
Filter by Customer Tag:
Shopify Dashboard (if available)
Some accounts may have access to a dedicated Shopify dashboard:
Dashboard Features:
Access:
Managing Multiple Stores
Connect Additional Stores
You can connect multiple Shopify stores to one LeadMachine account:
Multiple Store Scenarios:
Lead Deduplication:
Manage Connected Stores
View Connections:
Sync Individual Store:
Disconnect a Store:
Reconnect a Store:
Lead Types for Shopify
Automatic Lead Type
When syncing Shopify customers, a lead type is automatically created:
Default Lead Type:
Multiple Stores:
Customize Lead Types
Admins can customize Shopify lead types:
Troubleshooting
Connection Issues
Can't Connect to Shopify
Connection Lost
Sync Issues
Customers Not Syncing
Orders Missing
Duplicate Leads
Sync Taking Too Long
Data Accuracy
Customer Data Doesn't Match Shopify
Order Totals Incorrect
Missing Customer Information
Webhook Issues
Webhooks Not Firing
Delayed Webhook Delivery
Best Practices
Initial Setup
Before Connecting:
After Connecting:
Data Management
Keep Data Clean:
Tag Strategy:
Lead Types:
Performance Optimization
Sync Frequency:
Data Volume:
Security
Protect Credentials:
Monitor Access:
Advanced Features
Custom Field Mapping
Some configurations support custom field mapping:
Map Shopify Fields to Lead Fields:
Contact Admin:
API Integration
For advanced users or developers:
Shopify API Access:
Extend Functionality:
FAQ
Q: Will this sync all my historical customers? A: Yes, the initial sync imports all existing customers and orders from your Shopify store.
Q: How often does data sync? A: Real-time via webhooks for new/updated customers and orders. You can also manually sync anytime.
Q: What happens if I disconnect? A: Automatic syncing stops, but existing lead data remains. You won't get new updates from Shopify.
Q: Can I remove the "Customer" or "Newsletter" tag? A: Yes, you can manually remove either tag, but they will be re-applied based on the customer's current data (orders_count and accepts_marketing) on the next sync.
Q: How does LeadMachine decide between "Customer" and "Newsletter" tags? A: It's based on behavior:
Q: What happens when a newsletter subscriber makes their first purchase? A: The customer will be tagged with both "Newsletter" and "Customer" tags, showing they were engaged with marketing AND became a paying customer.
Q: Can I see who opted into marketing? A: Yes! Filter by the "Newsletter" tag to see all subscribers. Combine with other filters to find hot leads who are already engaged with your marketing.
Q: Does this work with Shopify Plus? A: Yes, works with all Shopify plans including Shopify Plus.
Q: Are there any costs? A: No additional costs from LeadMachine. Standard Shopify API usage applies.
Q: Can I sync only certain customers? A: Not directly. All customers sync. You can use tags or filters to organize them in LeadMachine.
Q: What if a customer updates their email in Shopify? A: The webhook will update the lead's email in LeadMachine automatically.
Q: Can I sync products? A: Currently, LeadMachine syncs customers and orders. Product sync may be added in future updates.
Q: Will this slow down my Shopify store? A: No, the integration uses webhooks which don't impact store performance.
Getting Help
Need Assistance?
Support Channels:
Summary
The Shopify integration brings your store customers into LeadMachine for unified customer management with intelligent behavior-based tagging:
✅ Automatic customer and order syncing ✅ Real-time webhooks for instant updates ✅ Smart auto-tagging based on orders and marketing consent ✅ Distinguish paying customers from newsletter subscribers ✅ Track conversion from subscriber to customer ✅ Full order history per customer ✅ Multiple store support ✅ Powerful filtering and segmentation ✅ Secure OAuth connection ✅ No store performance impact ✅ Marketing consent tracking with webhooks
Smart Tagging at a Glance:
Connect your Shopify store today to streamline customer management, automatically segment your audience, and leverage all of LeadMachine's lead organization, tagging, and AI-powered features for your e-commerce customers!