On this page
- When to send business thank you cards by API
- What a business thank you card says, by Marketing Mail via API
- Code: mail business thank you cards to yesterday’s new customers by API
- What business thank you cards cost by API
- How to tell whether thank you cards by API bring customers back
- Business thank you card questions from API senders
When to send business thank you cards by API
Every business has a moment worth a thank-you, and most already record it somewhere. These are the events Mailr’s integration pages use:
| System | The event | What it sends |
|---|---|---|
| Shopify | orders/paid on a first order | The 6x9 thank-you card |
| WooCommerce | A first order marked completed | The 6x9 thank-you card |
| HubSpot | A deal moves to Closed won | A welcome letter, mailed flat |
| Salesforce | An opportunity changes to Closed Won | A welcome letter, mailed flat |
| Jobber | JOB_CLOSED | A card a few days after the job |
| GoHighLevel | A tag such as send-thank-you | The 6x9 thank-you card |
No code at all? Zapier can send the card from a new paid order. And if a customer came to you through someone else, thank the person who sent them too: a card to the referrer when the referred customer’s first order ships.
What a business thank you card says, by Marketing Mail via API
Mailr’s thank-you template is a 6x9 card with two fields: the first name on the front, up to 14 characters, and a code for the next order on the back, up to 12. Your own design can say more, within what USPS Marketing Mail allows:
- The name and a thank-you printed the same for everyone are fine on any card.
- Details about one customer, such as the product they bought or the job you did, count as personal information. Marketing Mail allows them only on a card that advertises something for sale, such as the code for next time, and only when the details are there to support that offer.
- Handwritten or typewritten notes have to go First-Class Mail, which Mailr doesn’t send. A handwriting-style font is printed, so it’s fine.
Which fields are worth changing on each card is in personalized direct mail, and what goes on each side in direct mail design.
Code: mail business thank you cards to yesterday’s new customers by API
If your system can call a webhook, send each card from the event itself, as in the Shopify guide. If it can only export, run this once a day: it takes yesterday’s first-time customers, skips anyone already thanked, and mails the 6x9 template with a code of their own.
# Nightly. new_customers.csv: yesterday's first-time customers, exported from your store, CRM or billing system:
# id, name, first_name, line1, line2, city, state, zip
# thanked.csv: ids already sent a card (this script appends to it)
import csv, datetime, os, requests
today = datetime.date.today().isoformat()
thanked = set()
if os.path.exists("thanked.csv"):
with open("thanked.csv", newline="") as f:
thanked = {row[0] for row in csv.reader(f)}
with open("new_customers.csv", newline="") as f:
todo = [c for c in csv.DictReader(f) if c["id"] not in thanked]
for n, start in enumerate(range(0, len(todo), 1000)):
chunk = todo[start:start + 1000]
r = requests.post("https://api.mailr.dev/v1/batches", timeout=120,
headers={"Authorization": f"Bearer {os.environ['MAILR_API_KEY']}",
"Idempotency-Key": f"thanks-{today}-{n}"}, # a re-run the same day never sends twice
json={"kind": "postcard", "size": "6x9", "template": "tmpl_thank_you", "verify": True,
"recipients": [{"to": {"name": c["name"][:40], "line1": c["line1"], "line2": c["line2"] or None,
"city": c["city"], "state": c["state"], "zip": c["zip"]},
"merge": {"first_name": (c["first_name"] or "friend")[:14],
"promo_code": f"THX-{c['id']}"[:12]}}
for c in chunk],
"description": f"Thank-you cards {today}"})
if r.status_code == 422: # the error names the row to fix; nothing in this batch was sent
print("batch", n, r.json()["error"]["message"])
continue
r.raise_for_status()
with open("thanked.csv", "a", newline="") as f:
csv.writer(f).writerows([c["id"]] for c in chunk)
print(r.json()["id"], r.json()["count"], r.json()["price"])mlr_test_ key first: every card is checked, priced and proofed, and nothing prints or charges.What business thank you cards cost by API
| New customers a month | 4x6 | 6x9 |
|---|---|---|
| 50 | $42.50 | $44.50 |
| 100 | $85.00 | $89.00 |
| 250 | $212.50 | $222.50 |
| 500 | $425.00 | $445.00 |
Pay as you go prices, with printing in full color on both sides, addressing and postage. Checking each address first with "verify": true is extra. Prices on plans are on the pricing page.
How to tell whether thank you cards by API bring customers back
Give every card its own code, as the script does with THX- and the customer id, and count the codes used at checkout. To see what the cards add on top of customers who’d have come back anyway, leave a random tenth of new customers without a card for a month and compare, the way direct mail campaign sets up a holdout.
Business thank you card questions from API senders
When should a business send a thank you card?
Soon after the moment you're thanking them for: the first order, the signed contract, the finished job. A daily job or an event handler sends it the same day, and USPS Marketing Mail takes 3 to 10 business days from there.
Should a thank you card include a discount?
It doesn't have to. A code on the card is how you tell who came back because of it, and it's what lets the card mention what they bought when it goes by Marketing Mail.
Can the cards be handwritten?
Mailr prints them, in any font you choose, including a handwriting-style one. Notes written by hand have to go First-Class Mail; the trade-offs are in handwritten letter services.
Can I send thank you cards to other businesses?
Yes. Add the company name to the address, and send a card when a deal closes or a contract renews.
How much do business thank you cards cost?
$0.85 for a 4x6 and $0.89 for a 6x9 on pay as you go, printing and postage included. Plans cost less per card.