Sync Shopify orders to Marketo leads

EcommerceMarketing

What it does

When a new order arrives in Shopify, this automation checks if the customer email exists as a lead in Marketo. If not found, it creates the lead, then loops through line items to sum product quantities into custom fields.

Who it's for

Marketing operations teams who track product purchases in Marketo to segment and nurture customers.

How teams use this

Track product purchases by customer

Sync each Shopify order to Marketo so the team can see which customers bought specific product lines and how many units. Segment campaigns based on purchase history without manual entry.

Nurture customers based on order totals

Use the custom fields to trigger Marketo campaigns when a customer reaches a purchase threshold. Set up follow-up emails and upsell offers based on what they bought and how much.

Prevent duplicate leads in Marketo

Check for existing leads before creating new ones so the same customer email does not appear twice. Keep lead records clean and reporting accurate across both systems.

How it works

  1. Monitor new Shopify orders. A new order is placed in Shopify with a customer email address and line items containing product titles and quantities.
  2. Search Marketo for the customer. Check Marketo to see if a lead record already exists with that email address so duplicates are not created.
  3. Create the lead if missing. If no lead is found, create one in Marketo with the customer email so the purchase can be tracked and segmented.
  4. Sum quantities by product type. Loop through each line item in the order. For products with titles starting with AKC, add the quantity to the matching custom field on the lead record.
  5. Update the lead totals. Save the three custom fields with the summed quantities so Marketo has the latest purchase data for segmentation and campaign triggers.