Shopify Integration

Connect your Shopify store to LeadMachine for automatic customer and order syncing, AI-powered insights, behavioral segmentation, and a full CRM experience embedded directly inside Shopify admin.

What You Get

  • Automatic customer and order syncing with real-time webhooks
  • Smart auto-tagging based on purchase behavior and marketing consent
  • AI briefings that surface important customer moments
  • RFM scoring that segments customers by value and engagement
  • Abandoned checkout tracking with automatic follow-up tasks
  • Auto-created deals and tasks from order events
  • Background enrichment via Hunter.io and Google Places
  • Bi-directional marketing consent sync with your email campaigns
  • An embedded dashboard inside Shopify admin with inline editing
  • A full Shopify welcome page inside LeadMachine with KPIs, segments, and persistent Ledo chat

Setting Up

Prerequisites

  • Shopify store owner or staff account with app install permissions
  • LeadMachine Admin or SuperAdmin access

Install from Shopify App Store (New Users)

If you're installing LeadMachine from the Shopify App Store for the first time:

  1. Click Install in the Shopify App Store
  2. You'll be redirected to the LeadMachine onboarding wizard
  3. Create your account (Google, Facebook, LinkedIn, or email sign-up)
  4. Complete your profile and create your company
  5. Start your free trial (14 days, no credit card required)
  6. After onboarding, you'll be redirected back to authorize the Shopify connection
  7. Review permissions and click Install app

If you already have a LeadMachine account, you'll see a "Connect Store to This Account" option instead.

Connect from LeadMachine (Existing Users)

  1. Go to Company Settings > Integrations
  2. Click Connect Shopify Store
  3. Enter your store URL (e.g. yourstore.myshopify.com)
  4. Click Connect — you'll be redirected to Shopify
  5. Review the permissions and click Install app
  6. You'll be redirected back to LeadMachine

Initial Sync

After connecting, click Sync Now to import existing customers and orders. Time depends on data volume:

  • Under 100 customers: ~30 seconds
  • 100-500: 1-2 minutes
  • 500-1,000: 2-5 minutes
  • 1,000+: 5-10 minutes

After the first sync, all subsequent syncs are incremental — only pulling customers and orders that changed since the last sync.


What Gets Synced

Customer Data

  • First name, last name, email, phone
  • Company name (if provided)
  • Full address including country and country code
  • Shopify customer ID, total orders, total spent
  • Account creation date, tags, and notes
  • Marketing consent status

Customers are created as leads in LeadMachine with email and phone saved as contacts.

Order Data

  • Order number, date, total price, subtotal, tax, shipping, currency
  • Financial status (paid, pending, refunded, etc.)
  • Fulfillment status (fulfilled, partial, unfulfilled, etc.)
  • Discount codes used
  • Referring site (traffic source)
  • Source name (web, POS, mobile, etc.)
  • Cancelled date (if applicable)
  • All line items stored individually with product ID, variant, SKU, quantity, price, and discount

Test orders from Shopify are captured but automatically excluded from all KPIs, segments, and RFM scoring.

Real-Time Webhooks

Once connected, LeadMachine registers webhooks for instant updates:

  • customers/create — new customer added
  • customers/update — customer info changed
  • customers/marketing_consent_update — marketing opt-in/out changed
  • orders/create — new order placed
  • orders/updated — order status changed
  • refunds/create — refund issued (creates a follow-up task)
  • checkouts/create and checkouts/update — abandoned checkout tracking
  • app/uninstalled — automatically soft-deletes the connection

All webhooks are HMAC-verified for security.


Smart Auto-Tagging

LeadMachine automatically applies tags based on customer behavior. Tags are applied during sync, webhooks, and order processing.

Behavior-Based Tags

  • Customer — has placed at least one order
  • Newsletter — no orders yet but accepts marketing emails
  • New Customer — exactly 1 order, placed within the last 7 days
  • VIP — 3+ orders AND total spend is 2x or more the company average
  • High Value — total spend is 3x or more the company average
  • Abandoned Cart — started checkout but didn't complete (automatically removed when they complete the order)

Tag Transitions

  • Newsletter subscriber makes a purchase: gets "Customer" tag added, keeps "Newsletter"
  • New customer places more orders over time: "New Customer" tag is replaced by VIP or High Value when thresholds are met
  • Abandoned checkout is completed: "Abandoned Cart" tag is automatically removed

Tags persist across syncs and can be manually removed, but will be re-applied on the next sync if conditions still apply.

Using Tags for Segmentation

  • Filter by Newsletter to find subscribers who haven't purchased — send first-purchase incentives
  • Filter by VIP to identify your best customers — create loyalty campaigns
  • Filter by Abandoned Cart to see open recovery opportunities
  • Combine tags with other filters for precise targeting

RFM Scoring

LeadMachine scores every Shopify customer using Recency, Frequency, and Monetary analysis. Scores are recomputed nightly.

How It Works

Each customer gets a score from 1-5 on three dimensions:

  • Recency — how recently they last ordered
  • Frequency — how many orders they've placed
  • Monetary — how much they've spent in total

Scores are relative to your company's own customer base using percentile breakpoints (20th/40th/60th/80th), so a "5" means top 20% for that dimension.

Customer Segments

Based on the combined RFM score, customers are assigned a segment:

RFM scores and segments are visible in the customer slide-out panel on the embedded dashboard.


AI Briefing Engine

The briefing engine runs every 15 minutes and generates proactive insight cards about your customers. Briefings appear on both the embedded Shopify dashboard and the LeadMachine welcome page.

Briefing Types

  • Milestone — a customer crosses $1,000+ lifetime value
  • Buying Pattern — a customer has 3+ orders in the last 6 weeks (buying streak), or weekly revenue shifts 20%+ week-over-week
  • Re-engagement — a customer returns after 60+ days of inactivity
  • Notable New Order — a new order is 2x+ your company's average order value
  • All Clear — everything is steady, nothing needs attention

Managing Briefings

  • Briefings expire after 24 hours automatically
  • Click Dismiss to remove a briefing
  • Click Snooze to hide it temporarily (default 4 hours)
  • The same briefing type won't fire for the same customer within 7 days

Automation Features

These features are toggled per-company in your settings. When enabled, they run automatically on every relevant Shopify event.

Auto-Deal Creation

Setting: Auto-create deals from orders

When a new order arrives, a deal is automatically created in your company's default pipeline at the first stage. The deal is named "Shopify Order #XXXX" with the order total as the value, linked to the customer lead.

Auto-Task Creation

Setting: Auto-create tasks from events

Automatically creates follow-up tasks for four event types:

Auto-Enrichment & Lead Scoring

Setting: Auto-enrich new customers

New customers from orders are queued for background enrichment. A cron job runs every 5 minutes and processes up to 10 leads at a time using:

  1. Hunter.io — finds professional email and verifies contact info
  2. Google Places — enriches company data (industry, size, address, website)

Up to 3 attempts per lead before marking as failed.

After enrichment completes, each customer automatically receives an AI lead score (0-100) and grade (A/B/C/D). Scores are also recomputed nightly alongside RFM scores. See Lead Scoring for details on how scores work and how they drive automated nurturing.

Marketing Consent Sync

Marketing consent syncs bi-directionally between Shopify and LeadMachine:

Shopify to LeadMachine: When a customer unsubscribes in Shopify, LeadMachine automatically:

  • Adds unsubscribe records to all active company email campaigns
  • Sets active campaign enrollments to "unsubscribed"
  • Removes the "Newsletter" tag

When they re-subscribe, unsubscribe records are removed.

LeadMachine to Shopify: When a lead unsubscribes from a campaign inside LeadMachine, the consent state is pushed back to Shopify via their API.


Abandoned Checkout Tracking

LeadMachine tracks abandoned checkouts from your Shopify store automatically.

How It Works

  1. Customer starts checkout but doesn't complete it
  2. Shopify sends a webhook to LeadMachine
  3. The checkout is recorded with email, total price, line item count, and recovery URL
  4. The customer lead is tagged Abandoned Cart
  5. If auto-tasks are enabled, a follow-up task is created

Recovery

When the customer completes their purchase:

  • The checkout is marked as recovered
  • The Abandoned Cart tag is automatically removed
  • The order is synced normally

The Embedded Shopify Dashboard

Access LeadMachine directly inside Shopify admin by going to Apps > LeadMachine.

First-Time Setup

New stores see a login/register screen. Log in with your LeadMachine account (or create one), then authorize the Shopify connection. The embedded app uses secure token-based authentication to work around third-party cookie restrictions.

Dashboard Layout

  • KPI Bar — customer count, weekly revenue, weekly orders (scoped to the current store)
  • Active Briefing — the top insight from the briefing engine with dismiss/snooze actions
  • Recent Orders — last 5 orders with links to Shopify admin
  • Top Customers — top 7 by lifetime value
  • Ask Ledo — inline AI chat for quick questions and actions

Customer Slide-Out Panel

Click any customer name to open a detailed profile panel showing:

  • Lead fields (name, email, phone, company, title, address)
  • Order stats (total orders, total spent, average order value)
  • Last 5 orders with details
  • Tags
  • RFM score and segment
  • Notes

Inline Editing

From the slide-out panel you can edit fields directly without leaving Shopify:

  • Name, company, title
  • Address and country
  • Lead status
  • Add notes

Changes save automatically and sync back to the main CRM.

Ask Ledo in Shopify

Chat with Ledo from within Shopify to take quick actions:

  • "Who are my top customers this month?"
  • "Tag Sarah Johnson as VIP"
  • "Add a note to John Smith about his last order"
  • "Create a task to follow up with Mike tomorrow"
  • "Mark Brad Harvey as qualified"

Ledo can add notes, apply tags, update statuses, and create tasks — all from the chat.

Store Filtering

Toggle between This Store (only customers from the current Shopify store) and All Stores (all Shopify customers across your LeadMachine account).


The Shopify Welcome Page

When you log into LeadMachine with a connected Shopify store, the welcome page shows a purpose-built Shopify dashboard.

KPIs with Week-over-Week Comparison

Four metric cards with delta indicators:

  • Customers — total count with WoW change
  • Orders — weekly count with WoW change
  • Revenue — weekly total with WoW change
  • Average Order Value — with WoW change

Below the KPIs, LeadMachine generates plain-English interpretations based on the trends. For example: "Revenue up but order count flat — your AOV is climbing."

Daily Briefings Carousel

Active briefings from the AI engine appear as cards you can browse, dismiss, or snooze.

Customer Segments

Four segment tabs with customer counts and lists:

SegmentCriteriaWhat It Means
---------
ChampionR>=4, F>=4, M>=4Recent, frequent, high-spending
LoyalF>=3, M>=3Regular buyers with solid spend
NewR>=4, F<=2Recently acquired, early in journey
At RiskR<=2, F>=3Used to buy often, gone quiet
LostR<=2, F<=2Haven't bought in a long time
PromisingR>=3, avg>=3Showing potential, worth nurturing
AverageFallbackEveryone else
EventTaskPriority
---------
First order"Welcome new Shopify customer [name]"Normal
High-value order (2x+ company average)"High-value order from [name]"High
Abandoned checkout"Follow up on abandoned checkout from [email]"Normal
Refund issued"Review Shopify refund for order #[number]"High
SegmentDefinition
------
VIP Candidate3+ orders and spend >= 2x company average
At RiskHas ordered before but nothing in 60+ days
Rising Star2+ orders in the last 30 days
One-and-DoneExactly 1 order, placed 30+ days ago

Click any customer in a segment to view their full profile.

Persistent Ledo Chat

The welcome page includes a Ledo chat with saved conversation history. Your last 50 messages load when you open the page, and Ledo uses the last 20 as context. This is different from the embedded Shopify dashboard where chat is ephemeral.

The chat is rate-limited to 30 messages per minute and has full CRM action capabilities (tagging, notes, tasks, status changes).

Feature Integration Status

A panel shows which automation features are enabled or disabled for your company:

  • Auto-create deals from orders
  • Auto-create tasks from events
  • Auto-enrich new customers

Managing Multiple Stores

Connect Additional Stores

  1. Go to Company Settings > Integrations
  2. Click Connect Another Store
  3. Follow the same authorization process
  4. Each store syncs independently

All customers go into the same lead database. If the same customer exists in multiple stores, LeadMachine matches by email and updates the existing lead rather than creating a duplicate. Order history shows orders from all connected stores.

Disconnect a Store

  1. Find your store in the Connected Stores card
  2. Click the three-dot menu and select Disconnect Store
  3. Confirm in the modal

On disconnect:

  • A final sync captures the latest data
  • The access token is securely removed
  • All webhooks are deleted from Shopify
  • Existing leads and orders remain in your database
  • Source shows "Shopify - Store Name (Disconnected)"
  • You can reconnect at any time

If the Shopify app is uninstalled from within Shopify admin, the connection is automatically soft-deleted.


Troubleshooting

Connection Issues

Can't connect to Shopify

  • Verify your store URL is correct
  • Make sure you're logged into Shopify with install permissions
  • Clear browser cache and try again

Login loop in embedded dashboard

  • First-time setup requires logging in — this is normal
  • After login you should be redirected to Shopify OAuth
  • If redirect fails, click the "Connect to Shopify" button that appears
  • The embedded app uses token-based auth to handle third-party cookie restrictions

Connection lost

  • Check if the app was uninstalled in Shopify (triggers automatic disconnect)
  • Verify the connection in Company Settings > Integrations
  • Reconnect the store if needed

Sync Issues

Customers not syncing

  • Check connection status in Integrations
  • Try a manual sync
  • Verify webhooks are registered in Shopify admin under Settings > Notifications

Orders missing

  • Ensure the order has customer data attached
  • Check if it's a test order (test orders are synced but excluded from KPIs)
  • Try manual sync

Duplicate leads

  • LeadMachine matches by email — different emails create separate leads
  • Merge duplicates manually from the Leads page

Data Questions

Why don't I see lead scores or RFM scores?

  • Both lead scoring and RFM scoring run nightly — scores appear after the first overnight computation
  • New stores need at least one night after connecting
  • Leads enriched during the day are scored immediately after enrichment

Briefings not showing up?

  • The briefing engine runs every 15 minutes
  • Briefings require enough order history to detect patterns
  • Check if briefings were dismissed — they won't repeat for the same customer within 7 days

Auto-tasks or auto-deals not creating?

  • Verify the features are enabled in your company settings
  • These only trigger on new webhook events, not during manual sync

FAQ

Q: Will this sync all my historical customers? A: Yes, the initial sync imports all existing customers and orders. After that, syncs are incremental.

Q: How often does data sync? A: Real-time via webhooks for new and updated customers, orders, checkouts, and consent changes. Manual sync available anytime.

Q: What are the auto-tags and how do they work? A: LeadMachine applies Customer, Newsletter, New Customer, VIP, High Value, and Abandoned Cart tags automatically based on purchase behavior and marketing consent. See the Smart Auto-Tagging section for thresholds.

Q: How does RFM scoring work? A: Customers are scored 1-5 on Recency, Frequency, and Monetary value relative to your company's customer base. Scores update nightly and place customers into segments like Champion, Loyal, At Risk, etc.

Q: What happens if I disconnect? A: Syncing stops but all existing lead and order data remains. You can reconnect anytime.

Q: Can I remove auto-tags? A: Yes, but they'll be re-applied on the next sync if the conditions still apply.

Q: Does this work with Shopify Plus? A: Yes, works with all Shopify plans.

Q: Are there additional costs? A: No additional costs from LeadMachine. Standard Shopify API usage applies.

Q: Will this slow down my Shopify store? A: No. The integration uses webhooks which don't impact store performance.

Q: How does marketing consent sync work? A: Bi-directionally. Unsubscribes in Shopify propagate to LeadMachine campaigns, and unsubscribes in LeadMachine push back to Shopify.

Q: What happens with abandoned checkouts? A: They're tracked automatically. The customer is tagged "Abandoned Cart" and optionally gets a follow-up task. When they complete the purchase, the tag is removed.

Q: Can I control which automations are active? A: Yes. Auto-deal creation, auto-tasks, and auto-enrichment are each toggled independently in your company settings.

Frequently Asked Questions

Go to Company Settings > Integrations and click Connect Shopify Store. Enter your store URL, authorize in Shopify, and run an initial sync.

Customers, orders, line items, abandoned checkouts, and marketing consent sync automatically via real-time webhooks. Order data includes discount codes, traffic source, and fulfillment status.

RFM (Recency, Frequency, Monetary) scores each customer 1-5 on three dimensions relative to your customer base. Scores update nightly and assign segments like Champion, Loyal, At Risk, and Lost.

The briefing engine generates proactive insight cards every 15 minutes about customer milestones, buying patterns, re-engagement, and notable orders. They appear on both the embedded dashboard and the LeadMachine welcome page.

Yes, the embedded app adds a full CRM dashboard inside Shopify admin with KPIs, briefings, customer profiles with RFM data, inline editing, and Ask Ledo chat.

Toggle auto-deal creation from orders, auto-task creation for key events (first order, high-value order, abandoned checkout, refund), and auto-enrichment via Hunter.io and Google Places.