# 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.

- Workflow type: agent
- Services: Freshdesk, Shopify
- Categories: Customer Support, Operations
- Published: 2026-07-11

## What it does

- 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 you'll need

- 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.

## Prompt

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.

## How to customize

- 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.

## FAQ

### 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.

Use this prompt in General Input: https://www.generalinput.com/prompts/add-shopify-order-context-to-new-freshdesk-tickets