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.
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.
Example output
What does this prompt do?
- 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 do I need to use this?
- 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.
How can I customize it?
- 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.
FAQs
What happens if the shopper is not found in Shopify?
Will the customer see the note?
Does it write a note on every single conversation?
How does it know an order is running late?
How quickly does the note appear?
Related templates
Every weekday morning, harmless address typos get fixed on unshipped orders, and anything undeliverable is held while the customer confirms it.
Every weekday morning, unfulfilled orders get an address check: harmless typos fixed automatically, risky addresses held with a note to the customer.
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.
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.
Every new order queues a Trustpilot review invitation timed to land about a week after checkout, and logs it to your tracking sheet.
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.
Stop tab-switching to answer "where is my order?"
Let every new Kustomer conversation arrive with the shopper's recent Shopify orders, shipping status, and tracking already attached.