How can I pull the most recent product the person ordered in an email?

Topic summary

Goal: send a repurchase reminder email that includes the most recent product a customer bought, using Liquid in Shopify Email.

Key findings:

  • In Shopify Email, customer.* objects (e.g., customer.orders, customer.email) aren’t available; they return blank.
  • Supported variables are limited to the documented set (e.g., data.customer.first_name). Order history isn’t accessible via Liquid in Shopify Email.
  • Orderly Emails mainly customizes existing notification templates; it won’t add past-order lookups for a net-new email.

Alternatives suggested:

  • Build a custom service using Shopify’s APIs to fetch customer and order data, then send emails via your own/third‑party email service.
  • Use third‑party marketing apps/ESPs (e.g., Omnisend, Automizely) that support automated flows based on past purchases.
  • Consider order-related webhooks to trigger external processing and email sends.

Status/outcome:

  • No native Liquid-only solution in Shopify Email to pull previous order data or automate such emails to past customers.
  • Path forward: external app/ESP or a custom API + webhook-based solution. Discussion remains open without an in‑platform resolution.
Summarized with AI on January 15. AI used: gpt-5.

I’m trying to set up a custom liquid in an email template to send the customer a reminder to re-purchased the product that they previously ordered.

I’ve tried using customer.orders, but it comes up blank. In fact, even customer.name/customer.email comes up blank. How can I access the previous order information of the email recipient?

Alternatively, if there is no way to do this via Liquid, is there an e-mail API? I tried finding it but the closest thing I found was MarketingEvent but I don’t think I can schedule emails through that.

Thanks

Bump

Hi ShelHealth,

Which specific email notification are you looking to customise? As you noted it may not be possible to access previous order data via Liquid - it could be worth seeing if the Orderly Emails app might achieve the effect you’re looking for here.

Hope this helps!

I’m trying to create a flow with a new email notification to re-purchase the same product that the person last purchased. I need to pull which product they purchased and send it in an email.

The app you suggested seems to just offer different templates for already existing email options.

Okay - if it’s a net new email then you’d want to explore other options. How are you currently sending this reminder (eg via the Shopify Email app)? There’s no method to automate sending emails to previous customers, so if you wanted to leverage our API, you’d need to create a email service that pulls order and customer data via the API. Have you looked at other app solutions such as Omnisend or Automizely Email Marketing?

From what I can tell you can only use the variables listed here:

https://help.shopify.com/en/manual/promoting-marketing/create-marketing/shopify-email/create-email/custom-liquid#supported-variables

So something like {{ data.customer.first_name }} – You will not be able to gather order data. You may want to checkout notification Webhooks:

https://help.shopify.com/en/manual/orders/notifications/webhooks