Subtotal, discount and shipping in order templates now add up to the total

Published
App version
v0.2.76

In Flex message order templates, the meaning of the subtotal, discount and shipping values has been revised so that they add up to the total. The magic designer's "Order confirmation" now lists "Subtotal → Discount → Shipping → Total".

Preview of a template made with the magic designer's order confirmation. The amounts are listed as subtotal, discount, shipping, then total (the sample discount is 0 yen)
Preview of a template made with the magic designer's order confirmation. The amounts are listed as subtotal, discount, shipping, then total (the sample discount is 0 yen)

In Flex message order templates, the meaning of the insertable values “Subtotal”, “Discount” and “Shipping” has been revised. Until now, they were filled in directly from fields of the Shopify order, which mixed values before and after discounts, so adding and subtracting the lines did not always give the total. From now on, the values add up to the total when you go down the lines.

Also, the amount lines in the “Order confirmation” template of the Magic designer (Flow only) are now in the order “Subtotal → Discount → Shipping → Total”. The discount line shows a minus sign.

What changed

Meaning of the values

Value Before Now
Subtotal Subtotal after product discounts Subtotal before product discounts
Discount Product discounts plus shipping discounts Product discounts only (shipping discounts not included)
Shipping Shipping before shipping discounts Shipping after shipping discounts
Total Order total Unchanged

For example, for an order whose items total 10,000円, with a coupon that takes 500円 off the items and makes 800円 shipping free, the breakdown looks like this:

  • Subtotal 10,000円
  • Discount -500円
  • Shipping 0円
  • Total 9,500円

The shipping discount is reflected in the shipping line as the amount after the discount.

The magic designer’s “Order confirmation”

In “Order confirmation” templates you newly create with the Magic designer (Flow only), the amount lines are in this order:

  1. Subtotal
  2. Discount (with a minus sign; the whole line is hidden when the discount is 0)
  3. Shipping
  4. Total

How to use it

When you create a new template

  1. In the app’s “Templates”, create a new template.
  2. From the “Magic designer (Flow only)” samples, choose “Order confirmation”. The amount lines are created in the order above.
  3. Check how it looks with “Test send” in the editor, then save.

Templates you have already made

The layout of templates you have already saved, and of Flex messages saved in Flow steps, does not change on its own. However, the subtotal, discount and shipping values are sent with their new meaning. With the old layout, the message may not look the way you intended, so fix it as follows:

  1. Open the order template (or the Flex message of the Flow step) on its editing screen.
  2. Reorder the amount lines to “Subtotal → Discount → Shipping → Total”.
  3. Add “-” before the discount value (for example, -{{orderDiscount}}).
  4. Check how it looks with “Test send”, then save.

💡 The subtotal, discount and shipping values are sent with their new meaning even if you do not change your template. If a template used “Discount” as “product and shipping discounts combined”, review it.

Notes

  • In shops whose prices include tax, “Subtotal − Discount + Shipping” equals the total. In shops whose prices exclude tax, tax is added on top of that in the total. Templates have no tax line.
  • Amounts are in your shop’s currency, as before.
  • To include order values, specify which order to use in the Flow action “LINE で Flex メッセージを送る”, as before. See the shipping address article for details.

Back to all articles

View on the Shopify App Store