Direct mail for growth teams, with an API underneath. Read the docs →

Ecommerce direct mail from your store's order events

Ecommerce direct mail with Mailr runs off the events your store already sends: a first fulfilled order mails a thank-you card, a checkout left open for two days mails the product left behind, and a nightly job mails win-back cards to customers who stopped ordering.

Who builds this

Ecommerce mail gets built by the solo developer who runs a Shopify or WooCommerce store's code, by the agencies and freelancers who build custom apps and automations for brands, by retention agencies that already run Klaviyo flows, and by the apps those brands install. They connect order, checkout and customer events to a postcard, start from a template, and keep a record on the order or customer so nobody gets the same card twice.

What to mail, and when

When this happensMail thisPrice
Shopify orders/fulfilled, on a customer's first orderA thank-you card with a code for the next order. (6x9 postcard, First-order thank you)$0.89
Shopify checkouts/create, still not completed 48 hours later and with a shipping addressThe product they left, with a short link back to the checkout. (6x9 postcard, Abandoned cart)$0.89
Nightly job: a customer's last order is 60 or more days oldA win-back card naming the last thing they bought, with a code. (6x11 postcard, Win-back)$0.99
21 days after delivery (BigCommerce store/order/statusUpdated to Shipped, or the Shopify fulfillment)A review request for the product they bought. (4x6 postcard, Review request)$0.85
Klaviyo flow webhook when a profile enters your VIP segmentA one-page letter from the founder to the store's best customers, mailed flat. (8.5x11 letter)$0.95

What ecommerce print

Printed and picked up free in Phoenix or shipped UPS Ground, ordered with POST /v1/prints.

PieceUsed forPrice
5x7 table cardBox inserts: a thank-you, care card or reorder code in every order.$0.29, from 100
24x36 posterPosters for pop-up shops, market booths and trade show walls.$19.20

Systems to connect

  • Shopify. Webhook topics orders/fulfilled, orders/paid, checkouts/create and customers/create (read_orders and read_customers scopes). The order's shipping_address maps straight to Mailr's to.
  • WooCommerce. The woocommerce_order_status_completed action, queued through Action Scheduler, calls Mailr from a small must-use plugin.
  • BigCommerce. Create webhooks with POST /v3/hooks. store/order/statusUpdated and store/customer/created send only the id, so fetch the order and its shipping address before mailing.
  • Klaviyo. A flow's Webhook action POSTs a JSON body you write, with custom headers, from any flow trigger: a segment, a metric or a date. Point it at your endpoint and call Mailr from there.

Code: win-back cards, box inserts and abandoned checkouts

// Customers whose last order is 60+ days old and who haven't had a win-back card yet.
// lapsedCustomers() and markWinbackSent() are your own queries.
const customers = await lapsedCustomers({ days: 60, limit: 1000 }); // one batch holds up to 1,000

if (customers.length) {
  const res = await fetch("https://api.mailr.dev/v1/batches", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.MAILR_API_KEY}`,
      "Content-Type": "application/json",
      "Idempotency-Key": `winback-${new Date().toISOString().slice(0, 10)}`,
    },
    body: JSON.stringify({
      kind: "postcard",
      size: "6x11",
      template: "tmpl_winback",
      merge: { promo_code: "COMEBACK15" }, // shared by every card, 12 characters max
      recipients: customers.map((c) => ({
        to: { name: c.name.slice(0, 40), line1: c.address1, line2: c.address2 || undefined, city: c.city, state: c.provinceCode, zip: c.zip },
        merge: { first_name: c.firstName.slice(0, 14), last_product: c.lastProduct.slice(0, 22) },
      })),
    }),
  });
  const batch = await res.json();
  if (!res.ok) throw new Error(batch.error.message); // all or nothing: nothing was created
  await markWinbackSent(customers.map((c) => c.id), batch.id); // tomorrow's run skips them
}

What it costs

Win-back cards to lapsed customers: 1,000 6x11 postcards at $0.99 each is $990.00 on pay as you go, or $710.00 on the Agency plan, printing and postage included. The tmpl_winback 6x11 card to 1,000 customers whose last order is 60+ days old, in one batch with a shared promo code. Test pieces are free. All prices.

Questions

Is there a Mailr app in the Shopify App Store?

No. Mailr is an API: a webhook handler in your own app or a custom app calls it. The Shopify guide has a working handler for orders/paid, and the WooCommerce page has a must-use plugin.

Can every abandoned checkout get a postcard?

Only the ones with a shipping address, which means the shopper reached the shipping step. Skip the rest, and skip any checkout that completed or whose email has ordered since.

Which templates fit a store, and what do they cost?

tmpl_thank_you and tmpl_abandoned_cart are 6x9 postcards at $0.89, tmpl_winback is a 6x11 at $0.99, and tmpl_review_request is a 4x6 at $0.85, pay as you go with printing and postage included. The Agency plan ($149 a month) brings them to $0.69, $0.71 and $0.66.

How do I stop a retried webhook from mailing twice?

Build the Idempotency-Key from the order or checkout id (thank-you-<order id>, cart-<token>). The same key within 24 hours returns the first postcard instead of printing another. Save the postcard id on the order too.

Can Mailr print the inserts that go in my boxes?

Yes. POST /v1/prints with product table_card and size 5x7 prints full-color cards from 100, at $0.29 each pay as you go, shipped UPS Ground to your warehouse or picked up in Phoenix.

ECOMMERCE

Build mail for ecommerce today

Get a free test key, send a test postcard or print order, and watch it move through every status.

  • Postcards, flats and folded mailers
  • A proof before anything prints
  • Free test mode: nothing prints, nothing charges
  • A status for every piece

Download the template kit?

mailr-kit.zip · about 310 KB · 65 text files

Only HTML, JSON and Markdown files. No programs, scripts or macros, nothing that installs or runs.