Send order emails with another email app

SAKU Receipts: Sending the order confirmation email with another email app

  • Invoice-ready

  • Hydrogen-ready

  • From $4.99/mo

SAKU Receipts: Sending the order confirmation email with another email app

App features

  • Customers issue documents themselves from the Thank you page, order status page and emails
  • Invoice registration number (Japan) and tax breakdowns by rate (8% / 10%)
  • Set your company logo, stamp and theme color
  • Print from the admin one order at a time or in bulk
  • Documents in Japanese and English
  • Pro plan: remarks by payment method or tag, issued tags and issue limits
  • Hydrogen plan: issue documents on headless (Hydrogen) stores too

*Note
Supports new customer accounts.
Partially supports classic customer accounts (supported themes: Dawn, Rise and Studio).

This article explains how to add links to receipts and other documents in order confirmation emails sent with another email app or with Shopify Flow.

What you need before you start

  • SAKU Receipts is installed
  • The email app (or the Shopify Flow email action) you use lets you put Shopify's Liquid variables (the order ID and the order confirmation number) in a link in the email body (you check this in step 1)
  • For Hydrogen (headless) stores: you are on the Hydrogen plan

Overall flow

  1. Check with your email app that Liquid variables can be used
  2. Learn the format of the receipt link URL
  3. Put the code that matches how you send the email into the "Receipt" link in your email body (another email app: the standard Liquid code; Shopify Flow: the Flow code)
  4. If needed, change the document type or language
  5. Check with a test order that the document opens

In this article

  • The format of the receipt link URL and the parameters you can set
  • The code for standard Liquid and for Shopify Flow
  • How to link to other documents or English documents
  • What happens for unpaid orders


1️⃣ Check whether your email app supports it

Sending a SAKU Receipts link from another email app has one requirement: the email app must let you use the Liquid variables that Shopify provides.

Ask your email app's help center or support team something like this:

"Can I use Shopify Liquid variables (order.id and confirmation_number) in a URL in the email body?"

If the answer is yes, continue to the next step. We're unable to answer whether Liquid variables can be used in third-party apps.


2️⃣ Understand the link URL format

The receipt link URL has the following format.

[store URL]/apps/saku-print?orderId=[order ID]&confirmationNo=[confirmation number]&type=receipt&locale=en
Parameter Description
orderId Order ID (required)
confirmationNo Order confirmation number. Required for customers who aren't logged in to open the document.
type Document type. If omitted, a receipt is shown.
locale (or lang) Document language. Set "ja" or "en". Either parameter name works.
shop Used only in links for Hydrogen stores. Your store's myshopify domain (e.g. example.myshopify.com).

For Hydrogen (headless) stores (Hydrogen plan)

On Hydrogen stores, [store URL]/apps/saku-print links don't open. Use a link in the following format instead.

https://receipt.saku-apps.com/document?shop=[your store's myshopify domain]&orderId=[order ID]&confirmationNo=[confirmation number]&type=receipt&lang=en

If the shop= value is wrong, documents won't open. The safest way is to copy the "Order confirmation email link" with "Copy link" in the "Hydrogen store" section at the bottom of the left column on the app's "Settings" page. For details, see "Setup guide for Hydrogen (headless) stores".


3️⃣ Add the code written in Liquid

The code below is this format written in Liquid. Use it as the URL of the receipt link in your email body. Choose the code by how you send the email.

  • Sending with another email app: "Code using standard Liquid"
  • Sending with Shopify Flow: "Code using the Liquid available in Shopify Flow"

Code using standard Liquid (the same syntax as Shopify's notification emails; see also "Adding a receipt link to notification emails")

{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=receipt&locale=en

Code using the Liquid available in Shopify Flow

{{ shop.primaryDomain.url }}/apps/saku-print?orderId={{ order.legacyResourceId }}&confirmationNo={{ order.confirmationNumber }}&type=receipt&locale=en

In your email editor, paste the code into the link field for the "Receipt" button or text, and save. Variable names such as {{ id }} may differ depending on your email app. Check your email app's list of variables and replace them with the names for the order ID and the order confirmation number.

On Hydrogen stores, use the link copied from the Settings page. The copied link uses the same variables as the standard Liquid code above ({{ id }} and {{ confirmation_number }}). If your email app uses different variable names, replace them in the same way.


4️⃣ Change the document type or language

Near the end of the code, change only the receipt part of type=receipt (the word after the =) to one of the following values to link to a different document. Leave everything else as it is.

Document Value for type= Result
Receipt receipt type=receipt
Delivery note delivery_note type=delivery_note
Invoice invoice type=invoice
Quote quotation type=quotation

Here is a full example of the link after the change (standard Liquid code, for an invoice):

{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=invoice&locale=en

The code above opens English documents. For Japanese documents, change only the en part of locale=en at the end of the code (the word after the =) to ja (lang=ja works the same way). Here is a full example of the link after the change (a receipt in Japanese):

{{ shop.url }}/apps/saku-print?orderId={{ id }}&confirmationNo={{ confirmation_number }}&type=receipt&locale=ja

If a link for Hydrogen stores has no language, add &lang=en (or &lang=ja) to the end.


5️⃣ Check with a real order

Place one test order, click "Receipt" in the email you actually receive, and check that the document opens. You're done when the document opens. The "test send" feature of email apps uses a sample order, so documents won't open from those emails.


What it looks like

Clicking the link in the email opens the document for that order, even without logging in. It's shown only when the order ID and confirmation number match, so other people's documents can't be opened.

For orders that haven't been paid yet, such as bank transfer or cash on delivery, clicking the "Receipt" or "Delivery Note" link shows "Payment has not been completed for this order." "Invoice" and "Quotation" can be shown.

Troubleshooting

  • Clicking the link shows "Order not found."
    The variables for the order ID or confirmation number may not be replaced correctly. Check the variable names in your email app. Test sends (sample orders) may not be able to open documents.
  • Clicking the link shows "Login is required. Please log in again."
    The confirmationNo= part of the code may be missing, or the variable may not be replaced.
  • On a Hydrogen store, "This link cannot display the document." appears
    The variables for the order ID or confirmation number may not be replaced correctly. Check the variable names in your email app.
  • Can I keep locale=ja from older code?
    Yes, it works as is. Both locale= and lang= are accepted.