Netsuite brands its web service integration services as SuiteTalk, and SuiteTalk allows third-party systems to communicate with NetSuite via SOAP-based APIs. To get started with Netsuite Webservice, you'll need a Netsuite account that you can use to communicate with Netsuite. You may sign up with the SuiteCloud Developer Network (SDN) as a Community member, and get a free Netsuite account for exploitation. It may take a day or two to get your account approved.
Virtually any programming language supporting SOAP standard can integrate with SuiteTalk, and Netsuite provides a toolkit and sample codes for Java, .NET, and PHP5 (limited). Since this is a PHP forum, I'll only discuss integrating SuiteTalk with the PHP programming language. Netsuite provides a PHP Toolkit which makes it easier to implement SOAP client calls. The toolkit includes a core file containing all SuiteTalk classes, core objects, and operations, as well as a client-side deserializer.
Login Info
In order to make web service calls to SuiteTalk, you'll need login credentials to SuiteTalk. Netsuite PHP Toolkit provides a login_info.php file, which you'll need to customize to gain access to SuiteTalk.
Here is a sample login_info.php file:
// Connect to live, beta, sandbox. Default is live. $myNSclient = new nsClient( nsHost::live ); $email = "john.doe@webtrafficexchange.com"; $password = "password"; $account = "9999999"; $role = "18"; // Full Access Role // set request level credentials. // (email, password, account#, internal id of role) $myNSclient->setPassport($email, $password, $account, $role);
1. You may connect to live, beta, or sandbox Netsuite hosts. Unless you've set up a beta or sandbox account with Netsuite, the default value of "live" will work.
2. You'll need an email address and password that you used to create a Netsuite account (or SDN account).
3. Find the Netsuite account number for Suite Talk (web service) login. You'll have to log in to the Netsuite portal to find your account number. Upon login, please follow the following steps to find your account number. Login as a Netsuite administrator.
4. You'll need an Internal ID of the user role to successfully query SuiteTalk. To do this, you'll first create a new role with the web services permission and assign the newly created role to a user. Alternatively, you may use standard NetSuite roles shown in the table below.
(a) Login to Netsuite with an administrator account.
(b) Go to Setup -> Users/Roles -> Manage Roles -> New to create a new role.
(c) Create a role with "Web Services Only Role".
(d) Go to Setup -> Integration -> Web Services Preferences. Select a User's Name, and Web Services Default Role, and the system will automatically pull the Internal ID of the selected role.
Once you have customized the login_info.php file, you may browse the "samples" folder and create a customer by running the sample_add_customer.php. You may have to slightly alter the script in order to make this work.
The table below lists the standard Netsuite roles and their associated Internal IDs. These roles do not appear in the Setup -> Users/Roles -> Manage Roles menu. You may use these internal IDs in the Passport object, which is used for the login operation. In addition to the Netsuite standard roles, you may create additional custom roles for your organization.
Note: The table above has been extracted from the SuiteTalk Web Services Platform Guide
Share this post
Leave a comment
All comments are moderated. Spammy and bot submitted comments are deleted. Please submit the comments that are helpful to others, and we'll approve your comments. A comment that includes outbound link will only be approved if the content is relevant to the topic, and has some value to our readers.
Comments (0)
No comment