How Gatemi List Sync Works

A customer ticks a box at the checkout, the order reaches the sync status, and a moment later their address is in your Mailchimp audience or Brevo list. Four rules govern what happens in between, and both editions keep all four.

The four rules

Consent. Nobody reaches your list without having said so. The box starts unticked, and what is saved on the order is the answer, the wording exactly as it was shown and the time. Asked in two years what somebody agreed to, you have the sentence. And a new contact is only subscribed if the provider has never seen the address: somebody who unsubscribed stays unsubscribed.

Off the request. Nothing is written to the provider from the request that caused it. A contact is put in a queue and written in a separate background request, so a slow provider is never a slow checkout. A failure is kept and retried, not dropped.

One destination. Mailchimp's address is worked out from the datacentre at the end of your API key; Brevo's is fixed. The address is rebuilt and checked again — HTTPS, exact host — immediately before every request, so no stored setting can send your customers anywhere else.

The minimum. A marketing list is not a copy of your order book. The shipping address, phone number, line items and order numbers never leave your shop.

Step 1: asking at the checkout

When Sync customers to my list and Ask at the checkout are both on:

  • Classic checkout: a checkbox with your wording is printed just above the place-order button (woocommerce_review_order_before_submit). When the order is created, a ticked box is recorded on it.
  • Checkout block: the same checkbox is registered through WooCommerce's own additional-checkout-fields API (WooCommerce 8.9 or later), in the order section of the form. When the Store API finishes the order, a ticked box is recorded on it the same way.

The record is order meta _gmsy_optin: yes, the label as shown, and the time at (UTC). An unticked box records nothing.

Step 2: the order reaches the sync status

The plugin listens for order status changes. It acts only when:

  1. the store is set up — switched on, with a key and list that give a valid address;
  2. the new status is the sync status — Completed in the free edition, the Sync when an order reaches status in the full edition (default Processing);
  3. the order has a consent record (or Ask at the checkout is off — see the settings page);
  4. Full edition: the gmsy_should_sync filter does not say no.

Step 3: the claim

WooCommerce fires status hooks more than once in ordinary operation — an order moved back to Processing and completed again fires twice. So before anything is queued, the order is marked _gmsy_synced with the time and saved. An order that already carries the mark is never synced again.

Step 4: the queue

The contact is added to the queue, keyed by email address. A customer who orders three times before the queue drains is one row carrying the newest details. The queue holds at most 500 contacts in the full edition and 200 in the free edition; beyond that a new contact is refused rather than an older waiting one being pushed out.

A background write is then started straight away (a one-off WP-Cron event), and while anything is waiting a sweep runs every five minutes as a safety net.

Step 5: writing to the provider

Each run writes up to 25 due contacts (20 in the free edition):

  • Mailchimp: a PUT to the audience's member address for that email, which creates or updates the member. New members are created as subscribed; an existing member's status is not touched.
  • Brevo: a POST to /v3/contacts with update enabled, adding the contact to your list.

A 2xx answer removes the row from the queue. Anything else keeps it, with the provider's own reason (the API key redacted), and schedules the next try 1, 2, 4 and then 8 minutes later. At the fifth failure the row stops being retried and waits on the screen for you.

What is sent

Free edition Mailchimp merge field Brevo attribute
Email email address email
First name (billing) FNAME FIRSTNAME
Last name (billing) LNAME LASTNAME

The free edition omits the purchase fields entirely rather than sending zeros, so it never overwrites figures another tool wrote at your provider.

Full edition adds:

What Mailchimp merge field Brevo attribute
Number of orders (Processing and Completed, up to 200) ORDERS ORDERS
Total spent across those orders SPENT SPENT
Date of the order being synced (YYYY-MM-DD) LASTORD LASTORD
Your tags and category tags member tags TAGS (comma-separated)

With Their order count, total spent and last order date off, the full edition omits ORDERS, SPENT and LASTORD just as the free edition does, rather than sending zeros over what your provider holds. Mailchimp tags are written to the member's own tags endpoint after the contact, because Mailchimp applies tags sent with a contact only when it is creating that contact — a returning customer is given new tags too.

Create these merge fields (Mailchimp) or attributes (Brevo) with those exact names before you turn the purchase fields on. Order history is looked up by billing email, so a guest's orders count and an account created after the third order does not reset the count.

Worked example

You use Mailchimp with the full edition, sync at Processing, and the tag Shop customer.

  1. Ana orders on the Checkout block, ticks "Email me news and offers", pays by card. The order is created with _gmsy_optin saying so.
  2. The payment moves the order to Processing. The order is claimed and Ana is queued with 3 orders, £184.50 spent, today's date and the tag.
  3. A second later the background run writes her to us21.api.mailchimp.com.
  4. The next week the order is completed. Nothing happens: it is already claimed. Her next new order will update her figures.
Shopping Cart
Scroll to Top