Add Shopify order context to new Freshdesk tickets

Every 15 minutes, look up the customer's recent Shopify orders and drop a private note on new Freshdesk tickets so agents skip the alt-tab.

Agentic Task
FreshdeskShopifyCustomer SupportOperationsFeedback TriageLead Enrichment
PromptCreate

Build me an agent workflow that gives my Freshdesk support agents instant Shopify order context on every new ecommerce ticket, so they don't have to alt-tab into the Shopify admin to look up a customer's order history.

Trigger: cron, every 15 minutes.

On each run, do the following:

1. Use Freshdesk List Tickets to fetch tickets created in the last 30 minutes. Filter to tickets whose source is email or portal, and skip any ticket that already has the tag "shopify-context".

2. For each remaining ticket, take the requester's email address and call Shopify Search Customers on that email.

3. If no matching Shopify customer is found, use Freshdesk Add Note to Ticket to post a short private note that says "No matching Shopify customer found for this requester", then use Freshdesk Update Ticket to add the tag "shopify-context" so we don't re-check this ticket next run. Move on to the next ticket.

4. If a Shopify customer is found, use Shopify Get Customer Orders to pull their order history.

5. Compose a concise private agent note using Freshdesk Add Note to Ticket with private=true. The note should contain:

- A one-line header with the customer's lifetime order count and total spend so the agent can gauge VIP status.

- A callout at the very top of the note if the customer has 3 or more refunds in the last 90 days, or an open unfulfilled order older than 7 days. If neither is true, skip the callout.

- A short list of the customer's 5 most recent orders, each line showing order number, order date, financial status, fulfillment status, and total.

- A brief note highlighting any currently open or unfulfilled orders and any refunds in the last 90 days.

Keep the note tight and scannable. This is an internal cheat sheet for the agent, not a customer-facing reply.

6. After the note is posted, use Freshdesk Update Ticket to add the tag "shopify-context" so this ticket is not enriched again.

Guardrails: never post a public reply, only private notes. Never modify ticket status, priority, or assignee. If a Shopify or Freshdesk call errors on a specific ticket, log the error and continue with the remaining tickets. Do not send anything to the customer.

What does this prompt do?

  • Watches your Freshdesk inbox for brand new tickets from email or the customer portal every 15 minutes.
  • Looks the requester up in Shopify by email and pulls their last five orders, lifetime spend, and any open or refunded orders.
  • Posts a concise private note on the ticket so your agent sees the customer's order history the moment they open it, no alt-tab into Shopify admin.
  • Flags VIPs, unfulfilled orders older than a week, and repeat-refund customers right at the top of the note.

What do I need to use this?

  • A Freshdesk account with permission to read tickets, post private notes, and add tags.
  • A Shopify store connection with read access to customers and orders.
  • Roughly the last 30 minutes of new tickets already flowing into Freshdesk from email or your customer portal.

How can I customize it?

  • Change how often it runs (every 5, 15, or 30 minutes) or the window of tickets it looks back over.
  • Adjust the VIP rules, the refund threshold, or how many recent orders show up in the note.
  • Limit which ticket sources it runs on, for example email only, or add tags and groups to the filter.

FAQs

Will my customer see the Shopify order history?
No. The note is posted as a private note, so it is only visible to your Freshdesk agents. The customer sees nothing new on their end.
What happens when the ticket requester is not a Shopify customer?
The workflow adds a short private note saying no matching Shopify customer was found and moves on. It still tags the ticket so it is not re-checked on the next run.
Will it enrich the same ticket over and over?
No. Once a ticket has been enriched it gets a tag so future runs skip it. You can rename or change that tag if it conflicts with an existing one.
Can I match customers on something other than email?
Yes. Email is the default because it is what Freshdesk captures on every ticket, but the lookup can be adjusted to also match on phone number or a customer ID stored on the ticket.
Does this work on the Freshdesk free plan?
It works on any Freshdesk plan that allows API access, which includes the paid tiers. Free-plan accounts without API access will not be able to run it.

Related templates

Auto-correct address typos and hold the orders you can't fix

Every weekday morning, harmless address typos get fixed on unshipped orders, and anything undeliverable is held while the customer confirms it.

Shippo
Shopify
Gmail
+1
Agentic Task
Catch bad shipping addresses before you buy the label

Every weekday morning, unfulfilled orders get an address check: harmless typos fixed automatically, risky addresses held with a note to the customer.

Shippo
Shopify
Gmail
+1
Agentic Task
Send Yotpo review requests when Shopify orders ship

The moment an order is fulfilled, we register it with Yotpo so the review request is timed off real delivery, and we log every sync so failures never go unnoticed.

Shopify
Yotpo
Google Sheets
Deterministic Code
Reconcile Shopify sales against Zoho Books every night

Every night at 11pm we compare the day's Shopify orders with your Zoho Books invoices and payments, and flag only what does not match.

Zoho Books
Shopify
Google Sheets
+1
Agentic Task
Queue Trustpilot review invitations for every Shopify order

Every new order queues a Trustpilot review invitation timed to land about a week after checkout, and logs it to your tracking sheet.

Trustpilot
Shopify
Google Sheets
Deterministic Code
Send WhatsApp shipping updates when Shopify orders ship

Every hour, just-shipped customers get a WhatsApp message with their order number, carrier and tracking link, so they stop emailing to ask where it is.

WhatsApp Business
Shopify
Slack Bot
Agentic Task

Stop making support agents alt-tab into Shopify.

Connect Freshdesk and Shopify once, and every new ecommerce ticket lands with the customer's order history already attached.