Give Kustomer agents Shopify order facts on every new ticket

By General Input

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.

Integrations

  • Kustomer
  • Shopify

Type

Agentic Task

Categories

  • Customer Support
  • Operations

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.

Related prompts

Explore more prompts
Receiving dock console for inspecting and restocking Loop returnsSee which influencer creators actually drove Shopify salesMorning dispatch board for your local delivery runsAnswer Instagram and Messenger DMs with the order on screenWhite glove queue for the VIP customers waiting on youFind the customers stuck contacting support again and againReturns and warranty claim desk that follows your policyFraud lookup desk for any email, phone, IP address or linkReview high risk Shopify orders before anything gets pickedFraud review desk for the Shopify orders you should hold