# Answer Zendesk tickets with NetSuite order and invoice history

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

- Workflow type: agent
- Services: NetSuite, Zendesk, Slack Bot
- Categories: Customer Support, Operations
- Published: 2026-08-07

## What it does

- Reads every new support ticket the moment it lands and matches the person who wrote in to their customer record in NetSuite
- Pulls their last 90 days of orders, any open invoices, and whether they are carrying an overdue balance
- Leaves a private internal note on the ticket, visible only to your agents, naming the order the ticket is most likely about with its status and ship date
- Messages your account team in Slack when the ticket comes from a high value or overdue account, so it never sits unnoticed in the queue

## What you'll need

- A Zendesk account with admin access, so new tickets can notify this workflow
- A NetSuite login that can read customers, sales orders, and invoices
- A Slack workspace and the channel your account team watches
- The revenue number you treat as a high value account (this starts at $50,000 over the last twelve months)

## Prompt

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.

## How to customize

- Change the high value threshold, or alert only on overdue balances and ignore revenue
- Widen or narrow the ninety day purchase history window to match your sales cycle
- Send the alert to a different channel, or to the account owner directly instead of a shared channel
- Add extra detail to the note, such as open support tickets, renewal dates, or the assigned account manager

## Example output

Internal note on ticket #48213

Account: Redwood Fabrication Inc (NetSuite customer 10482), matched on the requester email ops@redwoodfab.com.

Last 90 days: 4 sales orders totalling $71,340. Most recent is SO10992 for 2 pallets of hex bar, $18,200, placed 22 days ago.

Accounts receivable: $12,480 overdue. Invoice INV8871 for $12,480 was due 19 days ago. Two other invoices totalling $9,100 are open but not yet due.

Likely subject of this ticket: SO10992. The customer writes that "the hex bar shipment still has not arrived" and this is the only open order with hex bar. Status is Pending Fulfilment, expected ship date was 6 days ago, so it is running late. Confidence: high.

Trailing twelve month revenue: $284,600. Account team has been notified in Slack.

## FAQ

### Will the customer see the note we add to their ticket?

No. The summary is added as an internal note, which only your agents can see inside Zendesk. It is never sent as a public reply, because it contains revenue and outstanding balance information that should not leave your team.

### What happens if the person who wrote in is not a customer in NetSuite?

The note still gets added, and it says plainly that no matching customer record was found for that email address. It will not guess at a similar looking company or invent an order history, so your agents can trust what they read.

### What if someone emails from a different address than the one on their NetSuite record?

It checks both customer records and individual contact records for that email, and follows a contact back to the company they belong to. If nothing matches, it reports no match rather than picking the closest looking account.

### How does it know which order the ticket is about?

It reads what the customer actually wrote and looks for clues such as an order or invoice number, a product name, a delivery date, or an amount, then picks the single most likely match and notes how confident it is. If the ticket is too vague, it says so instead of forcing a guess.

### Does this work with a NetSuite sandbox account?

Yes. You can connect a sandbox account while you test the wording and thresholds, then switch to your production account when you are happy with the notes it writes.

Use this prompt in General Input: https://www.generalinput.com/prompts/answer-zendesk-tickets-with-netsuite-order-and-invoice-history