Answer Zendesk tickets with NetSuite order and invoice history

By General Input

When a support ticket arrives, we look up the customer in NetSuite and leave a private note with their recent orders, open invoices, and any overdue balance.

Integrations

  • NetSuite
  • Zendesk
  • Slack Bot

Type

Agentic Task

Categories

  • Customer Support
  • Operations

When Zendesk sends a webhook for a newly created support ticket, look up the requester in NetSuite and leave an internal note on the ticket summarizing their account. Start by taking the ticket id from the webhook payload and calling the Zendesk Show Ticket operation to get the full ticket, including the subject, the description, and the requester's email address.

Find that requester in NetSuite using the Execute SuiteQL Query operation. Query the customer table for a record whose email matches the requester's email. If there is no direct hit, query the contact table for the same email and follow the contact back to the company it belongs to. Match case insensitively.

Once you have the customer's internal id, use SuiteQL again to pull their history: sales orders from the last 90 days with their status, total, and ship date; open invoices with the amount still outstanding and the due date; and the overdue balance, meaning open invoices whose due date has already passed. Also work out trailing twelve month revenue from their invoiced sales over the last 365 days. When you need fields a query did not return, fetch that specific order or invoice with the Get a Record operation, since NetSuite record collections come back as references rather than full record bodies.

Read the ticket subject and description and work out which order or invoice the customer is most likely writing about. Use whatever they give you: an order or invoice number, a product name, a delivery date, a complaint about a shipment, a dollar amount. Pick the single most likely transaction and state how confident you are. If nothing in the ticket points at a specific order, say that rather than forcing a match.

Post the summary back onto the ticket with the Zendesk Update Ticket operation, adding the comment as an internal note and never as a public reply. The note carries revenue and accounts receivable data, so it has to stay private to your agents. Cover four things in plain language: who the account is, what they have bought in the last 90 days, whether anything is currently overdue and by how much, and the specific order the ticket probably refers to with its status and ship date.

If the requester's email cannot be matched to a NetSuite customer, still post the internal note, and say plainly that no matching customer record was found for that email address. Do not reach for a near match on company name or email domain, and do not describe order history you could not actually read.

Finally, send a Slack message to the account team channel when the ticket comes from a high value account, meaning more than $50,000 in trailing twelve month revenue or any overdue balance at all. Use the Slack Bot Send a Message operation and keep it short: customer name, the revenue or overdue figure that triggered the alert, the ticket subject, and a link to the ticket, so a high value account never sits unnoticed in the queue. Tickets from customers below that bar get the internal note only, with no Slack message.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them