Discover how a bimodal integration strategy can address the major data management challenges facing your organization today.
Get the Report →Configure a Receive Location for the CData BizTalk Adapter for NetSuite
Pull NetSuite data in BizTalk using the CData BizTalk Adapter for NetSuite. Use receive locations to execute SQL commands and automate actions in NetSuite.
You can follow the procedure in this article to connect to NetSuite data, configure a static one-way receive location, and use it to perform a simple test: retrieving NetSuite data and writing it to an XML file.
A receive location can execute SQL commands and create BizTalk messages that contain the results. If you want to execute updategram commands, use a send port.
About NetSuite Data Integration
CData provides the easiest way to access and integrate live data from Oracle NetSuite. Customers use CData connectivity to:
- Access all editions of NetSuite, including Standard, CRM, and OneWorld.
- Connect with all versions of the SuiteTalk API (SOAP-based) and SuiteQL, which functions like SQL, enabling easier data querying and manipulation.
- Access predefined and custom reports through support for Saved Searches.
- Securely authenticate with Token-based and OAuth 2.0, ensuring compatibility and security for all use cases.
- Use SQL stored procedures to perform functional actions like uploading or downloading files, attaching or detaching records or relationships, retrieving roles, getting extra table or column info, getting job results, and more.
Customers use CData solutions to access live NetSuite data from their preferred analytics tools, Power BI and Excel. They also use CData's solutions to integrate their NetSuite data into comprehensive databases and data warehouse using CData Sync directly or leveraging CData's compatibility with other applications like Azure Data Factory. CData also helps Oracle NetSuite customers easily write apps that can pull data from and push data to NetSuite, allowing organizations to integrate data from other sources with NetSuite.
For more information about our Oracle NetSuite solutions, read our blog: Drivers in Focus Part 2: Replicating and Consolidating ... NetSuite Accounting Data.
Getting Started
Create the Receive Port
To add a receive location to your application, you first need to add a receive port. Receive ports can receive data from multiple receive locations.
- If you have not already done so, open your application in the BizTalk Administration Console.
- In your application, right-click Receive Ports and click New -> Static One-Way Receive Port. The Receive Port Properties dialog is displayed.
- In the Name menu, enter a name for the receive port.
Create the Receive Location
After you create the receive port, create the receive location and configure it to use the NetSuite adapter as its transport type.
- Right-click Receive Locations and click New -> One-Way Receive Location.
- Select the appropriate receive port of which the new receive location will be a member. The Receive Location Properties dialog is displayed.
- In the Name menu, enter a name for the receive location.
- In the Receive Location properties, select CData.NetSuite in the Transport Type menu.
- In the Receive pipeline menu, select the default option, PassThruReceive.
Configure the Adapter
In the Transport Properties dialog, specify the command that the adapter will execute.
- In the receive location properties, click Configure. The Transport Properties dialog for the adapter is displayed.
- In the SQL Command property, enter the command. This example uses
SELECT Customer.FirstName AS CustomerName, SalesOrder.Total AS SalesOrderTotal FROM SalesOrder, Customer
Configure the Connection String
Set credentials and other connection properties in the Connection String Options dialog.
- In the receive location properties, click Configure. The adapter properties dialog is displayed.
- Click the button in the Connection String property.
- Click the box in the Connection String property. The Connection String Options dialog is displayed.
- Enter connection properties. Below is a typical connection string:
Account Id=XABC123456;Password=password;User=user;Role Id=3;Version=2013_1;
The User and Password properties, under the Authentication section, must be set to valid NetSuite user credentials. In addition, the AccountId must be set to the ID of a company account that can be used by the specified User. The RoleId can be optionally specified to log in the user with limited permissions.
See the "Getting Started" chapter of the help documentation for more information on connecting to NetSuite.
- Click Test Connection to verify the connection values and test connectivity.
Refer to the help documentation for a description of the various properties and their functions.
Use a Send Port to Write Data to an XML File
The Static One-Way Receive Location is now ready for use with a send port: A send port must be associated with the BizTalk message that is created by the receive location. To write data to a file, create a file send port.
- In the BizTalk Administration console, right-click Send Ports -> New -> Static One-Way Send Port.
Enter a name for the send port at the top of the configuration window and select FILE from the Type menu.
- Configure a destination folder; this will be the location where the files are created on disk.
For the file name, a macro can be used to easily identify what day the file was created. By default, %MessageId%.xml is used. However, this is not a very user-friendly name, as it is a randomly generated BizTalk Id. To produce a file in the format SalesOrder_yyyy-MM-dd.xml, enter SalesOrder_%Date%.xml.
Note: For additional information regarding macros, visit the BizTalk Configuration section in the help documentation.
- Click OK. The URI field should now contain a value.
- Click Filters in the left-hand side of the configuration screen for the send port.
- Set the following properties:
- Property: Select "BTS.InboundTransportLocation" from the menu.
- Operator: Select "==" from the menu.
- Value: Enter the URI of the receive location. The URI is shown in the receive location properties.
- Operator: Select "==" from the menu.
- Property: Select "BTS.InboundTransportLocation" from the menu.
You can now use the send port to write files that have been sent from the receive location.
Enlist and Enable the Locations and Ports
The final step is to enlist the send port and enable the receive location: Right-click the send port and click Enlist. Then right-click the receive location and click Enable.
Note: Enable the receive location last: This makes sure the file gets picked up for writing by the send port.
Troubleshooting
To check if errors are occurring, expand "Event Viewer (Local)" in the navigation tree in the Administration Console. Expand Windows Logs and click Applications.
The log will include error messages for all applications on the system, so it is important to check that the source of the error message is "CData BizTalk NetSuite Receive Adapter". Details of the error message should provide insight into why the error is occurring. For guidance on resolving the error, contact [email protected].