To use SuiteTalk (SOAP) UI effectively with NetSuite, follow these steps to set up, configure, and make SOAP-based web service calls to interact with your NetSuite instance:
1. Enable Web Services in NetSuite
- Ensure that the Web Services feature is enabled in your NetSuite account:
- Go to Setup > Company > Enable Features.
- Under the SuiteCloud subtab, enable the Web Services option.
- You’ll also need SOAP Web Services permissions for the roles involved in accessing NetSuite via SuiteTalk.
2. Set Up SOAP UI
- Install SOAP UI (if you haven’t yet): Download the free version or the paid version for advanced features.
- Add the NetSuite WSDL (Web Services Description Language):
- Download the WSDL file for your NetSuite account version (found in Setup > Integration > SOAP Web Services Preferences in NetSuite).
- Alternatively, use the WSDL URL in SOAP UI to generate all required SOAP requests.
3. Configure SOAP UI Project
- Open SOAP UI and create a new project by selecting File > New SOAP Project.
- Provide a name for your project and enter the WSDL URL:
- Example URL format:
https://<account_id>.suitetalk.api.netsuite.com/wsdl/v<version>/netsuite.wsdl. - After loading the WSDL, SOAP UI will auto-generate the requests for all available operations.
4. Authentication with SOAP Header
- To authenticate with NetSuite’s SOAP API, you need to use a SOAP header with user credentials or Token-Based Authentication (TBA).
- Token-Based Authentication is preferred for security:
- Create an Integration Record in NetSuite (Setup > Integration > Manage Integrations > New).
- Enable Token-Based Authentication for your Integration and save the Consumer Key and Consumer Secret.
- Use your user’s Access Token and Access Token Secret (create these under the user’s preferences).
- Update your SOAP request headers in SOAP UI with these tokens under the Auth tab or directly within the request XML.
5. Send Requests
- Use SOAP Requests generated in your project to interact with NetSuite. Some common requests include:
- login: Logs into NetSuite using the user’s credentials.
- search: Allows you to search for records.
- add: Creates a new record (e.g., customer, sales order).
- update: Updates an existing record.
- delete: Deletes a specific record.
- For each request:
- Fill in the required fields in the XML with data relevant to your records in NetSuite.
- Send the request, and observe the response to ensure the data is processed correctly.
6. View Responses and Troubleshoot
- Check the Response pane in SOAP UI to view NetSuite’s responses, which include information like success status, record ID, and error messages if any issues arise.
- Common errors include authentication issues, invalid data format, or permissions errors, which can be addressed by refining headers, reviewing the request XML, or checking user roles in NetSuite.
7. Testing and Troubleshooting
- Use SOAP UI assertions to test expected values in responses.
- Review NetSuite’s SuiteTalk SOAP API documentation for details on field requirements and response structures.
- Debugging tip: Use the SOAP UI log for details on any HTTP-level issues that may indicate problems with request structure or authentication.
Following these steps, you can leverage SOAP UI to interact with NetSuite’s SuiteTalk API for creating, updating, deleting, and retrieving records programmatically, making it an effective tool for testing and troubleshooting API calls.