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
  • Orders:

  • Order details and totals
  • Line items
  • Financial status
  • Fulfillment status
  • Benefits:

  • 📊 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
  • Setting Up Shopify Integration

    Prerequisites

    What You Need:

  • Shopify store owner or staff account
  • LeadMachine admin access
  • Active Shopify store with customers
  • Permissions Required:

  • LeadMachine: Admin or SuperAdmin
  • Shopify: Store owner or staff with app installation permissions
  • Step-by-Step Setup

    1. Access Integration Settings

  • Log in to LeadMachine
  • Go to Company Settings
  • Click the Integrations tab
  • Find the Shopify section
  • 2. Connect Your Store

  • Click "Connect Shopify Store" button
  • Enter your Shopify store URL
  • - Format: yourstore.myshopify.com - Or: yourstore.com (if you have a custom domain)
  • Click "Connect"
  • You'll be redirected to Shopify
  • 3. Authorize LeadMachine

  • 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
  • 4. Initial Sync

  • 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

    First Sync Time Estimates:

  • 0-100 customers: ~30 seconds
  • 100-500 customers: 1-2 minutes
  • 500-1000 customers: 2-5 minutes
  • 1000+ customers: 5-10 minutes
  • What Gets Synced

    Customer Data

    Basic Information:

  • First name
  • Last name
  • Email address
  • Phone number
  • Company name (if provided)
  • Address Information:

  • Street address
  • City
  • State/Province
  • ZIP/Postal code
  • Country
  • Shopify Metadata:

  • Shopify customer ID
  • Total orders count
  • Total spent
  • Account creation date
  • Tags (Shopify tags)
  • Notes
  • How It's Stored:

  • Creates a lead in LeadMachine
  • Stores email and phone as contacts
  • Saves Shopify data as entity metadata
  • Links to company via company_id
  • Order Data

    Order Details:

  • Order number (e.g., #1001)
  • Order date
  • Total price
  • Subtotal
  • Tax amount
  • Shipping amount
  • Currency
  • Order Status:

  • Financial status (paid, pending, etc.)
  • Fulfillment status (fulfilled, partial, etc.)
  • Line items count
  • Customer Link:

  • Links order to customer lead
  • Multiple orders per customer
  • Full order history visible
  • Order Metadata:

  • Complete order JSON stored
  • All line items
  • Shipping details
  • Discount codes used
  • Automatic Syncing

    Real-Time Webhooks

    Once connected, LeadMachine registers webhooks with Shopify for:

    Customer Webhooks:

  • customers/create - New customer added
  • customers/update - Customer information changed
  • Order Webhooks:

  • orders/create - New order placed
  • orders/updated - Order status changed
  • How Webhooks Work:

  • 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
  • Webhook Verification:

  • All webhooks are HMAC verified
  • Ensures data comes from Shopify
  • Prevents unauthorized access
  • Secure data transmission
  • Manual Sync

    You can manually sync at any time:

  • Go to Company Settings → Integrations
  • Find your connected Shopify store
  • Click "Sync Now"
  • Syncs all customers and orders
  • Updates existing leads
  • Adds new leads
  • When to Manual Sync:

  • After connecting for first time
  • If you suspect data is out of sync
  • To import historical data
  • After making bulk changes in Shopify
  • 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:

  • 🛒 Customer tag = Has placed orders (orders_count > 0)
  • ✉️ Newsletter tag = No orders yet but accepts marketing (orders_count = 0 AND accepts_marketing = true)
  • 🛒 Customer tag (fallback) = Applied if neither condition is met
  • Why This Matters:

  • Distinguish between paying customers and newsletter subscribers
  • Target marketing campaigns more effectively
  • Track conversion from newsletter subscriber to customer
  • Automatically segment your audience
  • Tags Applied:

  • Both tags are from the default tag set (available to all companies)
  • Cannot be disabled (automatic)
  • Applied intelligently based on customer behavior
  • When Tags Are Applied:

  • 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
  • Tag Transitions:

  • 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
  • Tag Persistence:

  • 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
  • Benefits of Smart Auto-Tagging

    Easy Identification:

  • 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
  • Powerful Filtering:

  • 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
  • Reporting & Analytics:

  • 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
  • Workflow Automation:

  • 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
  • Campaign Segmentation:

  • 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
  • Viewing Synced Data

    On Lead Details Page

    Customer Information:

  • 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
  • Shopify Orders Section:

  • 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)
  • Tags Display:

  • "Customer" tag visible below lead name
  • Other applied tags shown
  • Click "Manage Tags" to add more tags
  • On Leads List Page

    Lead Cards Show:

  • Customer name
  • Location
  • Tags (including "Customer" tag)
  • Status
  • Created date
  • Filter by Customer Tag:

  • Expand "Tag" filter accordion
  • Click the "Customer" tag
  • See only Shopify customers
  • Combine with other filters as needed
  • Shopify Dashboard (if available)

    Some accounts may have access to a dedicated Shopify dashboard:

    Dashboard Features:

  • Recent orders overview
  • Top customers
  • Revenue analytics
  • Customer growth trends
  • Quick links to Shopify admin
  • Access:

  • Main navigation → Shopify Dashboard
  • Or Company Settings → Integrations → View Dashboard
  • Managing Multiple Stores

    Connect Additional Stores

    You can connect multiple Shopify stores to one LeadMachine account:

  • 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 Store Scenarios:

  • Multiple brands
  • Different product lines
  • International stores
  • Test and production stores
  • Lead Deduplication:

  • 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
  • Manage Connected Stores

    View Connections:

  • Company Settings → Integrations
  • See all connected stores
  • Store name and URL
  • Last sync time
  • Connection status
  • Sync Individual Store:

  • Click "Sync Now" on specific store
  • Syncs only that store's data
  • Doesn't affect other stores
  • Disconnect a Store:

  • Find the store in Integrations
  • Click "Disconnect" or settings icon
  • Confirm disconnection
  • Webhooks are removed
  • Existing leads remain (not deleted)
  • No more automatic syncing
  • Reconnect a Store:

  • Can reconnect at any time
  • Follow same connection process
  • Previous data still exists
  • Syncing resumes
  • Lead Types for Shopify

    Automatic Lead Type

    When syncing Shopify customers, a lead type is automatically created:

    Default Lead Type:

  • 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
  • Multiple Stores:

  • Each store gets its own lead type
  • Easy to filter by store
  • Track performance per store
  • Customize Lead Types

    Admins can customize Shopify lead types:

  • 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
  • Troubleshooting

    Connection Issues

    Can't Connect to Shopify

  • Verify store URL is correct
  • Ensure you're logged into Shopify
  • Check that you have install permissions
  • Try clearing browser cache and reconnecting
  • Connection Lost

  • Check if app was uninstalled in Shopify
  • Verify API credentials haven't expired
  • Reconnect the store
  • Contact support if issue persists
  • Sync Issues

    Customers Not Syncing

  • Check connection status
  • Verify webhooks are registered
  • Try manual sync
  • Check error logs in Company Settings
  • Orders Missing

  • Ensure order sync is enabled
  • Check that orders have customer data
  • Verify order date range (if applicable)
  • Try manual sync
  • Duplicate Leads

  • LeadMachine matches by email
  • If email is different, new lead is created
  • Can manually merge duplicate leads
  • Update email to prevent future duplicates
  • Sync Taking Too Long

  • Large stores take longer
  • 1000+ customers may take 5-10 minutes
  • Sync runs in background
  • You can navigate away during sync
  • Data Accuracy

    Customer Data Doesn't Match Shopify

  • Check last sync time
  • Try manual sync to update
  • Verify which data takes precedence
  • Some fields may be overridden locally
  • Order Totals Incorrect

  • Check currency conversion
  • Verify tax calculation
  • Compare with Shopify admin
  • Report discrepancies to support
  • Missing Customer Information

  • 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
  • Webhook Issues

    Webhooks Not Firing

  • Check webhook status in Shopify admin
  • Settings → Notifications → Webhooks
  • Verify webhook URL is correct
  • Check webhook delivery history
  • Re-register webhooks via LeadMachine
  • Delayed Webhook Delivery

  • Shopify has delivery queues
  • May take 1-2 minutes during high traffic
  • Generally under 30 seconds
  • Not an issue with LeadMachine
  • Best Practices

    Initial Setup

    Before Connecting:

  • Clean up Shopify customer data
  • Remove test customers
  • Ensure customer emails are valid
  • Review customer tags in Shopify
  • After Connecting:

  • Run initial manual sync
  • Verify data looks correct
  • Check that "Customer" tags are applied
  • Test a few sample leads
  • Monitor first few webhook events
  • Data Management

    Keep Data Clean:

  • Regularly review synced leads
  • Remove duplicates if they occur
  • Update incorrect information
  • Add additional tags as needed
  • Tag Strategy:

  • 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
  • Lead Types:

  • Use store-based lead types
  • Or create custom types for product lines
  • Helps with reporting and filtering
  • Keep type names descriptive
  • Performance Optimization

    Sync Frequency:

  • Webhooks handle real-time syncing
  • Manual sync only when needed
  • Don't sync more than once per hour
  • Large stores: sync during off-hours
  • Data Volume:

  • Monitor database size
  • Archive old leads if needed
  • Focus on active customers
  • Delete test data periodically
  • Security

    Protect Credentials:

  • Never share Shopify API keys
  • Use strong passwords
  • Enable 2FA on Shopify account
  • Regularly review connected apps
  • Monitor Access:

  • Review webhook deliveries
  • Check for suspicious activity
  • Audit lead access logs
  • Remove disconnected stores
  • Advanced Features

    Custom Field Mapping

    Some configurations support custom field mapping:

    Map Shopify Fields to Lead Fields:

  • Shopify customer tags → Lead tags
  • Shopify metafields → Custom fields
  • Order notes → Lead notes
  • Custom attributes → Custom fields
  • Contact Admin:

  • Custom mapping requires configuration
  • Contact support or admin
  • Provide mapping requirements
  • Changes take effect on next sync
  • API Integration

    For advanced users or developers:

    Shopify API Access:

  • LeadMachine uses Shopify Admin API
  • Version 2024-10 (or latest stable)
  • REST and GraphQL endpoints
  • Follows Shopify rate limits
  • Extend Functionality:

  • Build custom sync scripts
  • Add additional data points
  • Create custom reports
  • Integrate with other tools
  • 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:

  • Has placed orders → "Customer" tag
  • No orders but accepts marketing → "Newsletter" tag
  • Neither condition → "Customer" tag (fallback)
  • 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?

  • 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
  • Support Channels:

  • In-app support tickets
  • Email support
  • Documentation (this guide)
  • Knowledge base articles
  • 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:

  • 🛒 Customer = Has placed orders
  • ✉️ Newsletter = Accepts marketing but hasn't purchased yet
  • Use tags to create targeted campaigns and measure conversion

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!