Skip to content
Coritan Docs

Win back shoppers with marketing emails

Turn on the emails your store sends when a shopper leaves a cart, a checkout goes unpaid or an order ships, add discount codes, and manage who gets none.

View as Markdown

The Flows tab of Promotions, in the Store section, holds the store's flows: emails the store sends on its own when something happens to a shopper's cart or order. There are three. The abandoned cart flow reminds a shopper who left items in a cart, the unpaid checkout flow writes when a checkout's payment fails or is not finished in time, and the restock flow asks a shopper to order again some days after their order shipped. Every flow is off until you turn it on.

Every flow email carries an unsubscribe link. A shopper who uses it goes on the store's Suppression list, and no flow emails them again. Order and shipping emails still reach them.

To write to your own audience, with campaigns, automations and signup forms, use email marketing. It shares this suppression list: an address that unsubscribes from a campaign gets no flow email, and the reverse.

  • Every member of the organization sees the flows. You need the Admin role to change a flow or send a test, Tier 1 support or higher to read the message log and the suppression list, and Tier 3 support or higher to add or remove an address.
  • Set the Storefront address in Settings. The emails link to the shopper's cart and to the unsubscribe page on your storefront. Without the address, the abandoned cart and unpaid checkout emails have no cart link, and the unsubscribe link opens a Coritan page instead.
  • Your storefront needs two pages for those links: /cart/recover, which opens the cart, and /unsubscribe, which takes the shopper off the list. Build a checkout with the Store API shows both.
  • To give a discount code in an email, create a promotion with a code first in Discounts. Each email then gets a code of its own, made from that promotion.
Abandoned cart
Starts when a cart that has items and an email address has not changed for the time set in A cart counts as abandoned after, from 5 to 1,440 minutes. It sends up to five emails, each after its own wait. Every wait counts from the shopper's last change to the cart, so a shopper who comes back and changes the cart starts the unsent emails again from that moment. An email that has gone out is never sent twice. A cart whose shopper started a payment after the items last changed gets no abandoned cart email, because the unpaid checkout email follows it up.
Unpaid checkout
Sends one email when a shopper's checkout goes unpaid: the payment was declined or failed, or the shopper did not finish paying within Unpaid checkouts end after in Settings. It goes out after the wait set in Send after the checkout goes unpaid, and links back to the cart so the shopper can pay. It is skipped when the shopper has placed an order with the same email address since the checkout started. Follow up unpaid checkouts lists each checkout with its email.
Restock
Sends one email per order, a set number of days after the order's first parcel shipped, from 1 to 365. It counts orders that ship after you turn it on.

When a cart is checked out, emptied or expires, its scheduled emails are cancelled. When an order is cancelled, its restock email is skipped.

Space out the emails to one address

Section titled Space out the emails to one address

A shopper with several carts could get the same email more than once. Pause between emails to one address, on the Flows card, stops that. It is 3 days unless you change it, from 0 to 30, and 0 turns the pause off. Within the pause:

  • An address gets at most one unpaid checkout email.
  • An address gets abandoned cart emails about one cart only. While one cart's emails are within the pause, another cart's series does not start.

The restock flow has no pause. Change the number, then select Save changes on the Flows card.

  1. In the partner dashboard, open your organization. In the sidebar, select Promotions under Store, then the Flows tab.
  2. On the flow's card, turn on its switch.
  3. Set its timings. For the abandoned cart flow, select Add email to add a reminder, up to five, or select the bin beside one to remove it. Each email must wait longer than the one before it.
  4. Choose a Discount code for any email that should carry one, and decide whether to lock it to the shopper's email, as in the next section.
  5. Select Save changes. Discard puts the card back as it was saved.

The flow starts on its next run, within a minute. It does not write to shoppers about carts that were already idle for more than a day when you turned it on: an email more than a day late is skipped, not sent.

Give a discount code in an email

Section titled Give a discount code in an email

In Discount code, choose one of the store's promotions, then set Code works for in hours, from 1 to 720. When the email is sent, the store makes a single use code from that promotion and puts it in the email. The code works for one order, and only for that many hours.

Only promotions with a code can be chosen, and not the codes other emails already made. If the promotion is deleted later, the email goes without a code and the message log says so.

Lock the code to the shopper's email

Section titled Lock the code to the shopper's email

Once you choose a Discount code, Lock the code to the shopper's email appears under it. It is ticked unless you change it. While it is ticked, only the address that got the email can use the code, and a shopper who checks out with another email is told the promotion is for other email addresses.

Untick it to let a shopper use the code with any email, for example a shopper who reads the email at one address and checks out with another. The code still works once: whoever uses it first uses it up. With the box unticked, the code keeps the conditions of the promotion you chose, so an Email addresses list on that promotion still limits who can use it. The setting belongs to each email of a flow. A code that already went out keeps the setting it had when the store made it, and your change applies to the codes made from then on.

Send a test to me sends the flow's email to your own address, with sample products, a sample code and the subject starting [TEST]. For the abandoned cart flow, choose which email to send. You can send 10 tests an hour. A test makes no code and does not appear in the message log.

Carts and orders made with a test publishable key get no flow email. To try the flows end to end in test mode, turn on Email test carts and orders in the Flows card. Test emails carry the [TEST] subject start too. Turn it off again before going live.

Messages lists every email the flows scheduled, newest first, with the shopper's address, the email it is, its status, the cart or order it is about, the code it carried and when it was due or sent. Filter it by flow, by status and by part of an address. The filters are kept in the page address, so a reload or a shared link opens the same list.

Status What it means
Scheduled The email waits for its time.
Sent The email went out.
Skipped The email was not sent, and the row says why.
Failed The email could not be sent. It is not tried again.
Cancelled The cart was checked out, emptied or expired before the email was due.

A skipped row gives one of these reasons, or one that explains itself, such as The cart is empty.

The row says What happened
The customer ordered since. The shopper placed an order with the same email address after the checkout started, so the unpaid checkout email would be out of date.
Already emailed in the last 3 days. Another of the shopper's checkouts got the unpaid checkout email within the pause. The number is the store's pause.
Paused: this address got a series in the last 3 days. Another cart's abandoned cart emails went to the address within the pause, so this cart's series did not start.
The shopper started a payment after the cart last changed. The shopper got as far as paying, so the unpaid checkout email follows the cart up instead.
The address is on the suppression list. The shopper unsubscribed, or you added the address.
The flow was turned off. The flow was off when the email came due.
It was due more than a day ago, so it was not sent late. The email was more than a day late, such as for a cart that was idle long before you turned the flow on.
A later step was due at the same time, so only that one was sent. Two abandoned cart emails came due at once, and only the later one went out.

The Suppression list holds the addresses no flow emails. An address lands there when a shopper unsubscribes from a flow email or turns marketing off in their account, when you turn it off for them, and, with the EmailOctopus webhook, when they unsubscribe, bounce or complain at EmailOctopus. You can add one yourself.

An address on the list is no longer subscribed: the customer's Marketing turns off, and the store marks them unsubscribed at EmailOctopus when that integration is on. A shopper who turns marketing back on in their account comes off the list if they had unsubscribed. An address that bounced or complained, or that you added, stays until you remove it.

To add an address:

  1. Select Add address….
  2. Enter the email address and select Add address.

To take an address off the list:

  1. Select the address's actions menu, then Remove from the list….
  2. The dialog names the address. Select Remove address.

The flows email that address again from their next run. Search the list by part of an address, or filter it by reason. Each change is recorded in the organization's audit log.

Each flow email has an unsubscribe link at its foot and the List-Unsubscribe and List-Unsubscribe-Post headers, so mail apps that offer their own unsubscribe button can use it. Either way the address goes on the list at once, with the reason Unsubscribed. The link never expires, and it works only for your store.

Opening the link does not unsubscribe by itself. The page asks the shopper to confirm, so a mail scanner that follows links cannot take a shopper off your emails.

  • A flow that is on schedules its emails within a minute of a cart or order qualifying, and Messages lists each one.
  • A shopper who unsubscribes gets no further flow email, and their scheduled emails are cancelled. An address you add gets none either: its scheduled emails are skipped when they come due.
A flow is on but Messages stays empty
The cart has no email address, has no items, or has not been idle long enough. Test carts send nothing unless Email test carts and orders is on. The store must be live or in test mode, not suspended.
A shopper got no unpaid checkout email
Find their address in Messages. A skipped row says why: they ordered since, another of their checkouts got the email within the pause, or the address is on the suppression list. With no row at all, the cart has no email address, it is a test cart, or the flow stayed off for two days after the checkout went unpaid.
A shopper with two carts got reminders about only one
The pause keeps an address to one cart's abandoned cart emails. Lower Pause between emails to one address, or set it to 0 to turn the pause off.
The emails have no link to the cart
The store has no Storefront address. Set it in Settings.
Save changes reports that a promotion cannot be used
The promotion belongs to another store, or it is a code another email made. Choose one of the store's own promotions.
A shopper is told the promotion is for other email addresses
The code is locked to the address that got the email, and the shopper checked out with another one. Ask them to check out with that address. To let shoppers use later codes with any email, untick Lock the code to the shopper's email under the email's Discount code and select Save changes. Codes already sent keep their lock.
Send a test to me says to try again later
You sent 10 tests in the last hour.
The flow cards cannot be changed
Changing a flow needs the Admin role.

GET https://api.coritan.com/api/v1/orgs/{org_slug}/commerce/flows answers the flows setting with every default filled in. Change it with PATCH /commerce/store and {"settings": {"flows": {...}}}, which replaces the whole setting. The API calls the unpaid checkout flow failed_payment, and the pause is pause_days, from 0 to 30 and 3 when the setting leaves it out.

An email's code is null or {"promotion_id": 12, "valid_hours": 48, "lock_to_email": false}. lock_to_email is true or false and means true when you leave it out. The store keeps and answers it only when it is false, so a locked code has no lock_to_email key. Any other value answers 422 and names the field, such as settings.flows.abandoned_cart.steps.0.code.lock_to_email, settings.flows.failed_payment.code.lock_to_email or settings.flows.restock.code.lock_to_email. GET /commerce/flows/messages lists the messages with the filters flow, status and email, and POST /commerce/flows/{flow}/test sends a test to the member calling it; an API key cannot send one. GET, POST and DELETE /commerce/email-suppressions read and change the suppression list.

Shell
curl -X PATCH "https://api.coritan.com/api/v1/orgs/acme/commerce/store" \
  -H "Authorization: Bearer $CORITAN_TOKEN" -H "Content-Type: application/json" \
  -d '{"settings": {"flows": {"abandoned_cart": {"enabled": true, "idle_minutes": 30,
       "steps": [{"delay_minutes": 60, "code": null},
                 {"delay_minutes": 1440, "code": {"promotion_id": 12, "valid_hours": 48,
                                                  "lock_to_email": false}}]}}}}'

API operations on this page

MethodPathWhat it does
GET/api/v1/orgs/{org_slug}/commerce/flowsThe flows setting with every default filled in, and each flow email's name
GET/api/v1/orgs/{org_slug}/commerce/flows/messagesList messages
POST/api/v1/orgs/{org_slug}/commerce/flows/{flow}/testSend the flow's email to the calling member, with sample data and a sample code
GET/api/v1/orgs/{org_slug}/commerce/email-suppressionsThe addresses no marketing email goes to, newest first
POST/api/v1/orgs/{org_slug}/commerce/email-suppressionsAdd an address by hand (reason manual)
DELETE/api/v1/orgs/{org_slug}/commerce/email-suppressions/{suppression_id}Take an address off the list; the flows email it again