# Give Kustomer agents Shopify order facts on every new ticket

> When a shopper opens a Kustomer conversation about an order, we add an internal note with their recent Shopify purchases, shipping status, and tracking links.

- Workflow type: agent
- Services: Kustomer, Shopify
- Categories: Customer Support, Operations
- Published: 2026-08-07

## What it does

- Watches for new Kustomer conversations and reads the opening messages to work out what the shopper is actually asking about.
- Only acts on order, delivery, return, and refund questions, and stays quiet on everything else so your timeline does not fill up with empty notes.
- Looks the shopper up in your Shopify store by email and pulls their three most recent orders with payment status, shipping status, and tracking links.
- Posts one internal note with the facts, flags any order that shipped but is running late, and ends with a suggested reply your agent can adapt.

## What you'll need

- A Kustomer account you can administer, so new conversations can notify this workflow.
- A Shopify store with permission to read customers, orders, and shipments.
- Shoppers who email in from the same address they used at checkout, since that is how the two systems get matched.

## Prompt

When a new conversation is created in Kustomer, a webhook fires this workflow with the conversation id. Configure a Kustomer outbound webhook on the Conversation Create event and point it at this workflow.

Start by reading the ticket. Use Kustomer Get Conversation by ID to load the conversation, then Get Messages by Conversation to read the opening messages the shopper sent.

Apply a topic gate before doing anything else. Only continue if the shopper is asking about an order, a delivery or shipment, a return, or a refund. Judge this from the actual message text rather than a rigid keyword list, but treat phrases like where is my order, tracking, has not arrived yet, wrong item, send it back, exchange, and refund as strong signals. If the conversation is about anything else, such as a product question, a partnership pitch, a general enquiry, or spam, stop immediately and write nothing at all. Most conversations will not be order questions, and an empty note is worse than no note.

If the gate passes, resolve the shopper's identity. Take the customer referenced by the conversation and call Kustomer Get Customer by ID to read their email address. If the customer record carries several emails, prefer the primary one and keep the others as fallbacks.

Look the shopper up in the store. Call Shopify Search Customers with that email address. If nothing comes back, retry with any alternative emails on the Kustomer record before giving up. Once you have a Shopify customer, call Get Customer Orders to pull their recent purchases and sort them newest first.

For the orders that matter, meaning the three most recent plus any order the shopper mentions by number or by product name, call Shopify List Fulfillments for Order to get shipment status, carrier, tracking numbers, and tracking URLs. Skip this step for orders that were never fulfilled.

Write exactly one internal note back on the conversation with Kustomer Create Note by Conversation. Notes are internal to your team, so the shopper never sees them. Creating a Kustomer message would instead put content on the customer timeline, so always use the note operation and never the message operation.

The note should contain: the matched Shopify shopper and how the match was made; the three most recent orders with order number, order date, total, financial status such as paid, partially refunded, or refunded, and fulfillment status such as unfulfilled, partially fulfilled, or fulfilled; the carrier, tracking number, and clickable tracking link for each shipment; and a clear flag on any order that has shipped but is past its expected delivery window. Use the estimated delivery date on the shipment when the carrier provides one, and otherwise flag any shipment that has been in transit for more than seven days without a delivery confirmation. Keep it scannable, with short lines and one block per order, rather than prose.

End the note with a short suggested reply the agent can adapt before sending. It should answer the specific question the shopper asked, reference the real order and tracking details rather than placeholders, and propose a concrete next step when something is late or refunded. Label it clearly as a draft for the agent, not something that has already been sent.

If no matching Shopify shopper is found, still write the note, but say so plainly. State the email address that was searched, say that no matching store customer was found, and suggest the agent ask the shopper for an order number or the email used at checkout. Never guess at a nearby customer and never invent order details.

If Kustomer or Shopify returns an error, write a brief note naming which lookup failed, so the agent understands the context is missing rather than assuming the shopper has no orders. Write at most one note per conversation.

## How to customize

- Change which topics count as order questions, for example adding exchanges, cancellations, or warranty claims.
- Show more or fewer past orders, or limit the note to purchases from the last few months.
- Set your own late delivery window so the flag matches the shipping speeds you promise your customers.

## Example output

Shopify order context (auto-generated)

Matched shopper: maya.tran@example.com, Shopify customer since Mar 2024, 7 orders, $842 lifetime spend

1. #1042, placed 12 Jun 2026, $128.00, Paid, Fulfilled
   Shipped 13 Jun via UPS, tracking 1Z999AA10123456784
   FLAG: expected 17 Jun, still not delivered 6 days later

2. #1031, placed 28 May 2026, $64.50, Paid, Fulfilled
   Delivered 2 Jun via USPS, tracking 9400111899223197428490

3. #1018, placed 4 May 2026, $210.00, Refunded, Fulfilled
   Refund issued 19 May

Suggested reply (draft, not sent): Hi Maya, thanks for checking in. Your 12 June order shipped on 13 June with UPS and was due to arrive on 17 June, so it is running late. Here is the tracking link. I have asked the carrier for an update and will come back to you by tomorrow, and if it has not moved by then I will get a replacement out to you right away.

## FAQ

### What happens if the shopper is not found in Shopify?

The note says so plainly. It tells your agent which email was searched and suggests asking the shopper for an order number or the address they used at checkout. It will never guess at a close match or invent order details.

### Will the customer see the note?

No. It is an internal note on the conversation, visible only to your team. Nothing is sent to the shopper and no reply goes out until an agent chooses to send one.

### Does it write a note on every single conversation?

No. It reads the opening messages first and only writes when the shopper is asking about an order, a delivery, a return, or a refund. Product questions, general enquiries, and spam are left alone.

### How does it know an order is running late?

It checks the shipment against the expected delivery date the carrier provides, and where there is no estimate it flags anything that has been in transit for a while with no delivery confirmation. You can set that window yourself.

### How quickly does the note appear?

Within moments of the conversation being created, so in most cases the order context is already waiting by the time an agent opens the ticket.

Use this prompt in General Input: https://www.generalinput.com/prompts/give-kustomer-agents-shopify-order-facts-on-every-new-ticket