Connectors

/

WooCommerce

/

Sync WooCommerce refunds to Mailchimp store orders
Write
Cross-Connector

Stop Mailchimp counting revenue you refunded in WooCommerce

For marketers who want fully refunded and canceled WooCommerce orders updated in the Mailchimp store by asking their AI assistant.

Try PopdockAI free
Get a live demo
Sync WooCommerce refunds to Mailchimp store orders
Sync this week's WooCommerce refunds and cancellations to the Mailchimp store.
8 WooCommerce orders from the last 7 days need a status change in Mailchimp. - Refunded: 5 orders, including 1042 - Canceled: 3 orders - Left alone: 4 partly refunded orders - Note: Mailchimp may send notification emails Shall I update the 8 orders?
WooCommerce
Sample figures. Your results come from your own account.
mailchimp-get-store
woocommerce-get-refund
woocommerce-get-order
mailchimp-get-order-line
mailchimp-update-order

On this page

The problem

The problem

The prompt

Who it's for

How it works

Tools used

Connector

WooCommerce

WooCommerce
Run it on your own WooCommerce data.

Connect WooCommerce, pick your AI tool and paste the prompt.

Try PopdockAI free

The problem

Campaign revenue that counts refunded orders

When an order is refunded or canceled in WooCommerce, the Mailchimp store copy often keeps counting it, so campaign revenue looks better than it is. Fixing it means finding each full refund and changing its status by hand.

Without PopdockAI

  • List refunds and cancellations in WooCommerce
  • Work out which are full refunds
  • Find each order in the Mailchimp store
  • Change its status by hand

With PopdockAI

  • Only orders whose refunds equal the total count as refunded
  • Each order is confirmed in the Mailchimp store by order id
  • Partial refunds are left alone, with an email warning shown
  • Only the financial status changes after you confirm

The prompt

Use this prompt

Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.

Prompt
**Objective:** For WooCommerce orders refunded in full or cancelled in the last `{days-back}` days (default 7), set the matching Mailchimp store order's financial status to refunded or cancelled, after the user confirms, so Mailchimp stops counting that revenue.

**Step 1: Find the WooCommerce store in Mailchimp**

Call `mailchimp-get-store` with `platform` set to WooCommerce and note its `store-id`. If none comes back, report that no WooCommerce store is connected and stop. If several come back, list them and stop unless the user names one.

**Step 2: Read refunds and cancellations in WooCommerce**

Work out the start date as today minus `{days-back}` days. Call `woocommerce-get-refund` with `created-date.from` set to that date, and total the refunded `amount` per `order-id`. An order is **fully refunded** when that total equals its `order-total` within 0.01, and **partly refunded** otherwise. Then call `woocommerce-get-order` with `status` set to cancelled and `created-date.from` set to the same date for cancellations.

**Step 3: Confirm each order exists in Mailchimp**

For each fully refunded or cancelled order, call `mailchimp-get-order-line` with `order-id` set to the WooCommerce `order-id`, keeping rows on the Step 1 store. If nothing comes back, report the order as not in Mailchimp and skip it.

**Step 4: Confirm**

List the planned changes: WooCommerce order number, customer email, amount, and the new Mailchimp financial status (refunded or cancelled). List partly refunded orders separately as not being changed. Warn that Mailchimp may send order notification emails when the financial status changes. Wait for an explicit yes.

**Step 5: Update Mailchimp**

For each confirmed order, call `mailchimp-update-order` once with `store-id`, `order-id` and `financial-status` set to refunded or cancelled, and nothing else. Record each success or error and continue past failures.

**Step 6: Report**

Counts updated, skipped as not in Mailchimp, left alone as partial refunds, and failed, with the failures and their error text.

**Rules & Guidelines:**

* `woocommerce-get-refund` and `woocommerce-get-order` are on the woocommerce server. `mailchimp-get-store`, `mailchimp-get-order-line` and `mailchimp-update-order` are on the mailchimp server.
* `mailchimp-update-order` is the only write tool this prompt may call, after Step 4, and only to set `financial-status`. Do not change fulfilment or tracking. WooCommerce is the source of truth: never call `woocommerce-update-order`, `woocommerce-add-refund` or `woocommerce-add-order-note`.

**Validation:**

* Match on order id. Do not match on email or amount.
* Never mark a partly refunded order as refunded.
* If there are no full refunds or cancellations in the window, say so and stop.

Who it's for

One answer, three teams that use it

Email marketers

Report honest campaign revenue

Refunded and canceled orders stop counting, so campaign revenue reflects real sales.

Sync the last 14 days of WooCommerce refunds to the Mailchimp store.

Marketing analysts

Keep partial refunds as they are

Partly refunded orders are left alone, so they are never marked as fully refunded.

Which WooCommerce orders this month are fully refunded but still paid in Mailchimp?

Ecommerce managers

Fix cancellations in the email store

Canceled orders are updated in Mailchimp after you review the list.

Update Mailchimp for WooCommerce orders canceled in the last 7 days.

How it works

What PopdockAI does when you ask

You choose how many days back to look, and your AI assistant lines up Mailchimp order status with WooCommerce. Nothing is written until you confirm, and WooCommerce is never touched.

01

Ask

You choose how many days back to look.

Your AI tool

02

Read

It reads refunds and cancellations, counting only full refunds as refunded.

woocommerce-get-refund
woocommerce-get-order

03

Match

It confirms each order in the Mailchimp store by order id.

mailchimp-get-store
mailchimp-get-order-line

04

Confirm

You review the changes, then only the financial status is updated.

Your AI tool

What PopdockAI provides

The tools behind the answer

Ready made tools for WooCommerce and one secure connection to your AI tool. No code, no exports.

get-data

mailchimp-get-store

Returns the e-commerce stores connected to Mailchimp, with platform, domain, currency and linked audience.
get-data

woocommerce-get-refund

Returns WooCommerce refunds with amount, reason, who made them and whether the gateway returned the money. Filter by order, customer, amount range and date range.
get-data

woocommerce-get-order

Returns WooCommerce orders with status, totals, discounts, shipping, payment method and paid date. Filter by status, customer email or id, order number, created date range, total range or billing last name.
get-data

mailchimp-get-order-line

Returns the line items on e-commerce orders from the stores connected to Mailchimp: product, variant, quantity, price and discount.
run-action

mailchimp-update-order

Updates an e-commerce order in a store connected to Mailchimp, typically its payment or fulfilment status and shipment tracking.
Read only.Nothing in WooCommerce Changes

This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.

How Popdock AI secures your data

The outcome

Mailchimp revenue you actually kept

Try PopdockAI free
Get a live demo

Related use cases

More ways to put this data to work

All Ramp use cases

One prompt template with infinite possibilities.

‍

Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.

Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

Try PopdockAI Free
See Documentation