NetSuite Suitelets play a vital part in integrating 3rd party web applications with the NetSuite. Writing a suitelet is as easy as writing a simple javascript except that it runs on the server side. Here are a couple of examples of how to write a suitelet. The first example creates a customer of a type LEAD-Unqualified from a POSTed web submission.

Suitelets are extensions of SuiteScript that allow developers to write custom NetSuite pages and backend logic. Suitelets are server-side scripts that operate in a request-response model. They are invoked by HTTP GET or POST requests to system-generated URLs, and by default, they are invoked by making a GET request from a browser.

Netsuite purposely disallows a user from establishing two separate sessions to the NetSuite portal. That is, you cannot have a session established on Firefox and Chrome or Internet Explorer at the same time, and this is true for any user including the one being used by the Netsuite Web Service. This causes a potential problem where your visitors may be submitting forms at the roughly same time which triggers a second web service call to be made to Netsuite while the previous one is still running. When the second web service call is made before the first one is completed, the first call terminates without completing its task potentially losing a lead or whatever the task the first one was designed to do.

Netsuite provides a soap-based web service interface called SuiteTalk to allow 3rd-party applications to interface with the Netsuite ERP system. Netsuite also provides Toolkits written in PHP, .NET, and Java programming languages, which will make Netsuite integration easier. We'll use PHPToolkit to create a customer record in Netsuite.