# Shopify + HubSpot Customer Sync

> Keep your CRM in sync with your store. Push Shopify order data, lifetime value, and customer tags into HubSpot without manual data entry.

Source: https://cotera.co/solutions/customer-success/shopify-hubspot-customer-sync

---

- **Team:** Customer Success
- **Tools:** Shopify, HubSpot
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 2-3 hrs/sync

## How it works
1. **Pull Shopify Data** — Get customer profiles, order history, and lifetime spend from Shopify
2. **Match to HubSpot** — Find the corresponding HubSpot contact by email or name
3. **Update CRM Records** — Push lifetime value, order count, and tags into HubSpot fields
4. **Log & Report** — Create sync notes in HubSpot and flag any mismatches or missing contacts

## Example requests
- Sync our top 50 Shopify customers by lifetime spend into HubSpot
- Update HubSpot contacts with Shopify order data for everyone who bought this month
- Find Shopify customers that are missing from HubSpot and create contacts for them

## Prompt

```markdown
## Task

Sync customer data from Shopify into HubSpot. Use @Shopify/Search Customers and @Shopify/Get Customer to pull customer profiles and order data from Shopify. Match them to HubSpot contacts using @HubSpot/Search Contacts. Update HubSpot records with @HubSpot/Update Contact to reflect current order history, lifetime value, and tags. Log sync notes with @HubSpot/Create Note.

**Example:** "Sync our top 20 Shopify customers into HubSpot. Update their lifetime spend and last order date."

## Input

The user will provide:
1. Which customers to sync (top N by spend, recent buyers, all, or a specific list)
2. Which Shopify fields to push into HubSpot (lifetime value, order count, tags, last order date)
3. Whether to create new HubSpot contacts for customers that do not have a match

## Context

### Matching Strategy

**How to match Shopify customers to HubSpot contacts:**
1. Search HubSpot by the customer's email address (primary match)
2. If no email match, try matching by full name + company
3. If no match found, flag the customer for manual review or create a new contact

### Fields to Sync

- Lifetime spend from Shopify (total_spent field)
- Total order count
- Last order date and status
- Customer tags from Shopify
- Default shipping address (city, state, country)
- Account creation date

### Sync Rules

- Never overwrite HubSpot fields that the sales team manages (deal stage, owner, lead status)
- Only update Shopify-sourced fields (lifetime value, order data, tags)
- Add a HubSpot note documenting what was synced and when
- Flag any email mismatches or duplicate contacts found during matching

## Output

**Sync Report:**
- Total customers processed
- Matched to existing HubSpot contacts (count)
- New contacts created (count, if enabled)
- Unmatched customers requiring manual review (list)
- Fields updated per contact
- Any errors or conflicts encountered
- HubSpot notes created for each synced contact
```

## Related reading
- [Shopify + CRM: Sync Customer Data Automatically](https://cotera.co/articles/shopify-crm-customer-sync.md)
- [How to Build an AI Shopify Support Agent](https://cotera.co/articles/ai-shopify-support-agent.md)

