How to Sync E-commerce Customers to Klaviyo Automatically

Keep your Klaviyo customer profiles in sync with your e-commerce store.

What This Integration Does

Marketing only works when Klaviyo knows who your customers are. This workflow keeps Klaviyo's profile list in lockstep with the customer list in your store. A new sign-up in Shopify or WooCommerce becomes a Klaviyo profile within seconds; an address change in the store propagates the same way; opt-outs handled in the store update Klaviyo's consent flag.

The workflow has two modes that work well together: a real-time webhook on customer create / update for fast propagation, and a daily catch-up schedule for any webhook deliveries that failed. Klaviyo's create-profile and update-profile tools are idempotent on email, so re-running the sync never creates duplicates.

Prerequisites

  • A Klaviyo connection with profile read and write access.
  • A Shopify or WooCommerce connection with customer read access.
  • A registered customer webhook endpoint in your store pointing at the Spojit trigger URL.
  • An agreed field mapping (which store fields map to which Klaviyo properties).

Step 1: Webhook Trigger on Customer Create or Update

Add a Trigger node set to Webhook. Register the URL Spojit gives you as the customer/create and customer/update webhook in Shopify, or the equivalent in WooCommerce. The payload includes the customer id, email, name, addresses, and consent flags.

Step 2: Fetch the Full Customer Record

Webhook payloads can be partial. Add a Connector node on shopify (or woocommerce) with list-customers filtered by id, so you have the full record including custom fields and tags.

Step 3: Transform - Map Store Fields to Klaviyo Properties

Add a Transform node that produces a Klaviyo-shaped profile:

{
  "email": customer.email,
  "first_name": customer.firstName,
  "last_name": customer.lastName,
  "phone_number": customer.phone,
  "location": {
    "city": customer.defaultAddress.city,
    "region": customer.defaultAddress.province,
    "country": customer.defaultAddress.countryCode
  },
  "properties": {
    "store_customer_id": customer.id,
    "accepts_marketing": customer.acceptsMarketing,
    "tags": customer.tags
  }
}

Keep custom fields under properties so they do not collide with Klaviyo's built-in fields.

Step 4: Decide Create vs. Update

Add a Connector node on klaviyo with list-profiles filtered by email. Follow with a Condition node:

  • If a profile exists, route to an update-profile step with the existing profile id.
  • If not, route to a create-profile step.

Step 5: Write to Klaviyo

Both branches end in a Connector node on klaviyo. Use create-profile on the create branch and update-profile on the update branch. The body in both cases is the object from Step 3.

Step 6: Daily Catch-up Schedule

Create a second workflow with a Trigger set to Schedule (daily 02:00). It calls shopify list-customers filtered to customers updated in the last 24 hours, loops over each one, and feeds them through the same Transform plus Condition plus write logic. This backstops any webhook deliveries the store failed to make.

Tips

  • Use store_customer_id as a Klaviyo custom property so you can always link back from Klaviyo to the store record.
  • Respect the consent flag - never write accepts_marketing: true into Klaviyo if the store says false.
  • Batch the catch-up job into 100-customer chunks to stay under Klaviyo's per-minute write quota.

Common Pitfalls

  • Email case sensitivity - Klaviyo treats USER@EXAMPLE.COM and user@example.com as the same profile, but your store may not. Lowercase emails before matching.
  • Phone formatting - Klaviyo requires E.164. Normalize phone numbers in the Transform step before sending.
  • Webhook retries - Shopify retries failed webhooks for hours. Make sure the Spojit handler is idempotent so duplicate deliveries do not create duplicate profiles.

Testing

Create a test customer in your store with your own email, then check Klaviyo to confirm the profile arrives with the correct fields. Edit the customer in the store, save, and confirm the Klaviyo profile updates in turn.

Learn More

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.