Examples

Up unpacked friendly ecstatic so possible humoured do. Ample end might folly quiet one set spoke her.

Reminder to thank big spenders

Use this hook as a reminder to personally thank a customer who has made a big purchase. The customer will also be tagged so that you can keep track of and build stronger relationships with your best customers.

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

Reminder to thank big spenders
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 = `

${order.customer.email} just made a large order of $${order.total_price}.
Maybe you want to thank them personally?
Order: ${refund.order_id}

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

Email me when a refund is requested

Use this hook to find out when some customer support is needed! This is a great opportunity to reach out and change an unhappy customer to a loyal one.

The refundMinimum variable is useful for setting a dollar amount, over which, you want to be notified for a given refund. Default is $0, so you will receive an email for every refund.

Email me when a refund is requested
module.exports = async (refund, actions, { shopUrl }) => {

  // Adjust these variables to customize
  const refundMinimum = 0
  const to = '[email protected]'
  const subject = `(${shopUrl}) Refund requested`
  const body = `

Please review the following refund: ${refund.order_id}

` const totalRefundAmount = refund.refund_line_items.reduce((total, item) => { return total + parseInt(item.subtotal) }, 0) if (totalRefundAmount > refundMinimum) { await actions.email.send({ to, subject, body }) } }
On this page