How to auto-print NetSuite pick tickets
Print a NetSuite pick ticket PDF from a user event or scheduled script. No PrintBase SuiteApp is provided; the script calls the API.
For NetSuite warehouse teams printing a pick ticket per order
Overview
NetSuite can render a pick ticket. It cannot, by itself, open a printer that sits behind the warehouse firewall. A user event or a Map/Reduce script that already runs on NetSuite's servers can POST the PDF to PrintBase. There is no SuiteApp in this product.
Render the advanced PDF or save the file in the file cabinet, then send content_type pdf with the location's printer_code. The agent runs on a PC at that location, outbound only. You do not build a site-to-site VPN for the printer.
Idempotency-Key should include the internal id of the sales order or the wave. Scripts retry. The same key must carry the same body or the API returns 409.
Integration steps
- 01
Store the API key in a script parameter
Do not hard-code it in a client script. A client script runs in the browser.
- 02
Render the pick ticket PDF
Use the template you already trust. Base64 it in the SuiteScript runtime.
- 03
Map location to printer_code
Keep a custom record of location id to printer_code. The API does not know NetSuite locations.
- 04
POST from the server script
Authorization Bearer, content_type pdf, printer_code, Idempotency-Key. SuiteScript's https module is enough.
- 05
Write the job id back to the order
A failed DOWNLOAD_FAILED or AGENT_OFFLINE is visible on the order instead of only in a script log.
Node.js
// Same JSON a SuiteScript https.post would send for a pick ticket
const res = await fetch('https://api.printbase.cloud/v1/print-jobs', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.PRINTBASE_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': `ns-pick:${orderId}`,
},
body: JSON.stringify({
printer_code: Number(process.env.PRINTER_CODE),
content_type: 'pdf',
content: pdfBase64,
copies: 1,
}),
});
if (!res.ok) throw new Error(`PrintBase ${res.status}: ${await res.text()}`);
const job = await res.json();
// { id: "job_abc", status: "queued" }
Details for this setup
PDF path for a NetSuite pick ticket
Use content_type pdf and exactly one of content (standard base64) or content_url (an http or https URL the agent can download). A private file must be fetched by your server and sent as base64, or exposed as a short-lived URL. On Windows the agent asks a PDF app to print to the named queue; if none is registered, the failure text names Adobe Reader or SumatraPDF as examples. macOS and Linux use lp.
No VPN for the printer path
The warehouse PC opens the agent WebSocket outbound. NetSuite only makes HTTPS to api.printbase.cloud. You still need whatever NetSuite already requires for its own access; this does not change that.
Questions
Is there a NetSuite bundle?
No. Integration is a script you own plus the print API. The call is still POST /v1/print-jobs with a Bearer API key, and HTTP 201 means queued rather than printed.
Can a client script print?
It should not hold the API key. Call a Suitelet or a user event on the server.
File cabinet URLs expire or require login.
Do not pass those URLs as content_url unless the agent can fetch them anonymously. Send base64.
How do I target one printer per location?
Look up printer_code from the location, then send that integer. One organization can have many computers and printers.
Free plan: 100 jobs a month on one computer, no card.