Thank customers for making a large purchase (Shopify)

Use this hook as a reminder to personally thank a customer who has made a big purchase. Customer will also be tagged, so you can better learn who your "power users" are.

The minimumPurchase variable is useful for setting a dollar amount, over which, you want to be notified about the order.

module.exports = async (order, actions, { shopUrl }) => {

  // Adjust these variables to customize
  const minimumPurchase = 100 // in dollars
  const tag = 'big-spender'
  const to = '[email protected]'
  const subject = `(${shopUrl}) Large order created`
  const body = `<p>
    ${} just made a large order of $${order.total_price}. 
    Maybe you want to thank them personally? 
    Order: <a href="${shopUrl}/admin/orders/${}">${refund.order_id}</a>

  if (parseInt(order.total_price) > minimumPurchase) {
    await actions.shopify.tagCustomer(, tag)
    await{ to, subject, body })

Try Cloudhooks on your shop