How to Sync WooCommerce Customers into Stripe and Klaviyo
Build a Spojit workflow that runs on a schedule, lists new WooCommerce customers, fans out in parallel to create a matching Stripe customer and a Klaviyo profile, then adds each new shopper to a welcome list.
What This Integration Does
When a shopper registers in your WooCommerce store, that record usually lives only in WooCommerce. To bill them through Stripe and market to them through Klaviyo, the same person has to exist in all three systems. Doing that by hand is slow and error-prone. This Spojit workflow keeps the three in step automatically: on a fixed schedule it pulls the customers created since the last run, and for each one it creates a Stripe customer (so an invoice or payment intent can be raised later) and a Klaviyo profile (so they can be segmented and emailed), finishing by enrolling them in a welcome audience list.
The run model is a Schedule trigger that fires on a cron expression, for example every hour. Each run reads a page of WooCommerce customers, loops over them, and inside the loop a Parallel node runs the Stripe and Klaviyo branches at the same time so neither waits on the other. The workflow writes new records into Stripe and Klaviyo and leaves WooCommerce untouched (read only). Because creating the same email twice is wasteful, you carry a high-water mark (the timestamp or customer ID of the last person you processed) so re-runs only pick up genuinely new customers rather than reprocessing everyone.
Prerequisites
- A WooCommerce connection in Spojit with read access to customers. See the WooCommerce connector article to set it up.
- A Stripe connection with permission to create customers.
- A Klaviyo connection with permission to create profiles and add them to lists.
- The Klaviyo
listIdof the welcome list you want new shoppers added to. Get it from your Klaviyo account or with thelist-liststool on the Klaviyo connector. - A place to store the high-water mark between runs (a small record in a database connector such as MongoDB or MySQL, or a manually updated workflow value). This tutorial uses a date filter approach you can adapt.
Step 1: Start the workflow on a Schedule trigger
Add a Trigger node and set its type to Schedule. Enter a 5-field cron expression and an IANA timezone. To check hourly during business hours, use:
0 9-17 * * 1-5 Australia/Sydney
A single Schedule trigger can hold more than one schedule if you need different cadences. The trigger output is {{ scheduledAt }}, which you can use to compute the window of customers to fetch. For a deeper walkthrough of cron fields and timezones, see the schedule trigger guide.
Step 2: List new WooCommerce customers
Add a Connector node in Direct mode, choose the WooCommerce connector, and select the list-customers tool. Set per_page to a manageable batch size (max 100) and use page if you expect more than one page. To narrow the results to a specific shopper while testing, the search and email fields filter by name/username/email.
{
"per_page": 50,
"page": 1
}
Name the output variable something clear like customers so later steps can read {{ customers }}. Keep this in Direct mode: it is a predictable single-tool call, so it is deterministic and spends no AI credits. See the Direct mode guide for input mapping details.
Step 3: Loop over each customer
Add a Loop node set to ForEach and point it at the customer list returned in Step 2 (for example {{ customers.data }}, matching the shape your WooCommerce response returns). Inside the loop body each iteration exposes the current shopper, which you can reference as {{ customer }} (use whatever item name the Loop node assigns). Everything you add inside the loop body runs once per customer. For iteration options and item variables, see the Loop nodes guide.
Step 4: Fan out to Stripe and Klaviyo in parallel
Inside the loop body, add a Parallel node. It splits the flow into concurrent branches that run at the same time, so the Stripe write and the Klaviyo write do not block each other. Create two branches: one for Stripe, one for Klaviyo. The Parallel node waits for both branches to finish before the loop moves to the next customer. For branch behavior, see the Parallel nodes guide.
Step 5: Create the Stripe customer (branch A)
In the first Parallel branch, add a Connector node in Direct mode, choose the Stripe connector, and select create-customer. Map fields from the current WooCommerce customer. The key inputs are email, name, optional phone, and address. Use metadata to store the originating WooCommerce ID so you can trace the record later.
{
"email": "{{ customer.email }}",
"name": "{{ customer.first_name }} {{ customer.last_name }}",
"metadata": {
"woocommerce_id": "{{ customer.id }}"
}
}
Name the output variable stripeCustomer. You can reference the new Stripe ID downstream as {{ stripeCustomer.data.id }} if you later raise invoices or payment intents.
Step 6: Create the Klaviyo profile (branch B)
In the second Parallel branch, add a Connector node in Direct mode, choose the Klaviyo connector, and select create-profile. This tool takes a single attributes object holding the profile fields. Map the same WooCommerce shopper into it:
{
"attributes": {
"email": "{{ customer.email }}",
"first_name": "{{ customer.first_name }}",
"last_name": "{{ customer.last_name }}",
"properties": {
"source": "WooCommerce",
"woocommerce_id": "{{ customer.id }}"
}
}
}
Name the output variable klaviyoProfile. The new profile ID is available as {{ klaviyoProfile.data.id }} and is needed in the next step.
Step 7: Add the new profile to the welcome list
Still inside the Klaviyo branch (after create-profile, so the ID exists), add another Connector node in Direct mode on the Klaviyo connector and select add-profiles-to-list. Set listId to your welcome list and pass the newly created profile in the profileIds array:
{
"listId": "YOUR_WELCOME_LIST_ID",
"profileIds": ["{{ klaviyoProfile.data.id }}"]
}
Once both Parallel branches complete, the loop advances to the next WooCommerce customer and repeats until the batch is done. If you want to be notified each run, add a Send Email node after the loop summarizing how many customers were synced.
Tips
- Track a high-water mark so each run only processes genuinely new shoppers. Store the largest WooCommerce customer
id(or registration date) you handled, and on the next run filter or skip anything at or below it. This keeps Stripe and Klaviyo free of duplicate writes. - Keep both writes in Direct mode rather than Agent mode. The mapping is fixed and predictable, so Direct mode runs deterministically and spends no AI credits.
- Tune the
per_pagebatch size and your schedule cadence together. A smaller batch on a more frequent schedule smooths out load on the WooCommerce, Stripe, and Klaviyo APIs. - If you are not sure how to wire the branches, ask Miraxa, the intelligent layer across your automation, something specific like: "Inside the Loop, add a Parallel node with a Stripe create-customer branch and a Klaviyo create-profile branch using {{ customer.email }}."
Common Pitfalls
- Timezone drift on the schedule. A bare cron expression without the right IANA timezone fires at the wrong local hour. Always set the timezone explicitly (for example
Australia/Sydney). - Duplicate profiles and customers. Without a high-water mark, every run reprocesses the same people. Filter on what you have already synced before writing to Stripe and Klaviyo.
- Pagination.
list-customersreturns at most 100 per page. If a run can produce more than one page, advancepageuntil the response is empty, or shorten the schedule window so each batch fits in one page. - Ordering inside the Klaviyo branch.
add-profiles-to-listneeds the profile ID fromcreate-profile. Put them in sequence within the same branch so{{ klaviyoProfile.data.id }}is resolved before the list step runs.
Testing
Before turning the schedule loose, validate on a tiny scope. Temporarily set per_page to 1 (or use the email filter in list-customers to target a single known shopper), then run the workflow with the Run button. Open the execution log and confirm the loop ran once, both Parallel branches succeeded, a Stripe customer was created, a Klaviyo profile was created, and the profile landed in your welcome list. Check Stripe and Klaviyo directly to verify the records. When the single-customer pass looks correct, raise the batch size, enable the workflow, and let the Schedule trigger take over.