Invoice and PO lookup for accounts payable self-service
Build an Accounts Payable self-service lookup tool. Its purpose is to let anyone with access answer "Has this invoice been received? Has it been paid? When will it be paid?" without logging into the accounting system or interrupting the AP team. Trigger it with two HTTP routes, both restricted to authenticated members of the tenant: A web page (GET) that serves the user-facing search interface. An API endpoint (POST) that the page calls to run the lookup. Build it as two steps: A single-page UI step. Render a clean, production-grade search page where the user types either an invoice number or a purchase order number. The page should render immediately and fetch results client-side (never blocking on the API), then show each match as a card — displaying whether an invoice was received, the vendor, amount, dates, purchase order links, payment-hold status, and expected or actual payment date. Show a clear "no invoice received" state for POs with nothing billed yet, and list all matches when there are several. A lookup API step. Accept a search term and query the accounting system for matching vendor invoices and purchase orders. Resolve the links between POs and their invoices, surface how much of a PO has been invoiced versus remaining, flag overbilling, and report payment status. For unpaid invoices, compute an expected payment date from the company's recurring payment-run schedule (a fortnightly cadence with simple calendar exception rules — make the cadence and anchor easy to edit). Return everything as JSON. Keep this step strictly read-only against the financial system. For data, query NetSuite via its SuiteQL REST API — or whatever accounting/ERP system your team uses (QuickBooks, Xero, Sage, etc.); connect it as a connector rather than hardcoding credentials. If you'd rather surface results elsewhere than a web page, you could instead post lookups to Slack or your team's chat tool, but a web page is the recommended primary interface. Tools used: 3B React (webpage) step, 3B TypeScript step, NetSuite SuiteQL REST API connector
What this prompt builds
An accounts payable self-service lookup tool that lets team members search NetSuite by invoice or purchase order number to instantly see receipt status, payment dates, PO balances, and holds without needing AP support or system logins. It computes expected payment dates from the company's fortnightly payment schedule and flags overbilling. Read-only and restricted to authenticated tenant members.
The problem
AP teams face constant interruptions from colleagues asking whether specific invoices have been received, paid, or when payment is scheduled. Answering these questions requires logging into NetSuite, navigating vendor bills, purchase orders, and payment schedules — a time-consuming process that blocks both the requester and the AP team. This workflow eliminates that friction with a self-service search interface: anyone with tenant access can instantly look up an invoice or PO number to see receipt status, vendor details, amounts, payment dates, PO balances, holds, and flags for overbilling, all without NetSuite credentials or interrupting AP.
Solution and impact
The workflow gives teams immediate, read-only access to invoice and purchase order data through a simple search box that queries NetSuite via SuiteQL. It automatically computes expected payment dates based on the company's fortnightly payment schedule, surfaces payment holds and due dates, shows how much of a PO has been invoiced versus what remains, and flags overbilling when invoices exceed PO totals. By letting anyone self-serve these answers, it reduces the load on AP teams and eliminates wait time for requesters.
