Using NetSuite Custom Segments in Boomi – Part 2
Due to limitations in the NetSuite API which Boomi utilizes, Custom Segments are unable to be returned from a standard connector shape. A profile imported with Boomi’s standard NetSuite connector and operation will not contain any Custom Segments. To work around this, a SOAP connector is needed in order to send a modified HTTP request that includes requests for the custom segment.
The examples in this tutorial will being using the Inventory Item base entity in NetSuite to show the use of item level custom segments. The principles in this tutorial could be applied to any NetSuite entity.
Two shapes are needed to replace a NetSuite connector in a Boomi process: a message shape and a SOAP connector. The HTTP request will be set in the message shape. The SOAP connector will require a connection and operator with two SOAP profiles. The profiles will specify the structure of the request and response XML.
1. First, a saved search containing the desired custom segment is created, which will be called by Boomi. In NetSuite create the appropriate Saved Search and take note of the search ID. The ID can be found in the Edit Search page, as shown below, or in the saved search URL.
2. To retrieve custom segments in a SOAP request the XML structure of the request is needed. Thankfully Boomi’s NetSuite connector already generates a SOAP request to access the NetSuite web services, so the request structure can be copied from that HTTP request. In a process create a NetSuite connector using the standard NetSuite connector. The process will only be used once and no actions will be performed on the data, so no other shapes are needed. The connector will be calling a Saved Search, so a Filter will be needed to specify the saved search ID.
3. The final step of configuration for the connector is to set the parameters. Only one parameter is needed in this case, the saved search ID as a static value.
4. Run this process to have Boomi generate the SOAP request. It doesn’t matter if the connector ends execution with an error due to the data limits of Boomi’s Test mode. In NetSuite, navigate to Setup > Integration > Web Services Usage Log.
5. In the log, location the search action that was just performed by Boomi. Click on “View” to download the SOAP request that NetSuite received. The XML will be split into a header and body. The header should have the same email listed as the connector in Boomi.
6. In the request XML, the “columns” element will specify the structure of what is returned from NetSuite. Locate the sub-element under “columns” which will contain the custom segment. Because this tutorial is focused on custom segments at the item level, the “itemJoin” XML element will contain the custom fields. If it does not already exist, add an element under the correct parent element named “customFieldList”, then a customField element under that. See the example below.
All entities in NetSuite (including custom segments) have both an internal ID and script ID. The script ID is used by external applications to reference entities. For each custom segment, there will be several script IDs; the exact ID needed is dependent on what type of entity is using the segment as a field. In this example, the segment “cseg_family” is going to be a field in the itemJoin element. The exact script ID can be found in the details of the segment, and in the tabs Application & Sourcing > Items.
7. In the header of the XML ensure that the application ID, email, and password fields have the appropriate information. Then copy and paste the entire XML file into a message shape.
8. Add a Web Services connector to the process. From the configuration panel, create a new connection. Set security to “Basic” and enter a valid username and password. No SSL Certificates are needed. The application ID can be found (or a new one created) in Setup > Integration > Web Services Usage Log. The WSDL URL will be in the format [NetSuiteURL]/wsdl/v2015_2_0/netsuite.wsdl and the SOAP Endpoint URL will be in the format [NetSuiteURL]/services/NetSuitePort_2015_2 (the same URL used in the standard NetSuite connection).
9. Next, create a new operation from the connector configuration panel. Check the boxes to expose both Request and Response Envelopes. Then click Import to get the envelopes from NetSuite. In the Import Wizard, select the NetSuite SOAP connection already made and check the boxes to expose both envelopes. In the next screen, select “search” from the drop down list. Boomi will automatically generate a request and response profile from NetSuite.
10. Now connect the message and connector shapes, such that the message forms the input for the Web Services connector. The process is ready to test. The output of the connector shape will use the XML Response profile that was generated. Depending on your needs, the Response profile may need to be modified to add the specific element structure from the XML response under the searchRow element. As shown below, the custom segment value is returned as an internal ID. This ID would need to be correlated to the actual value for most use cases. The cross reference tables show in in Using NetSuite Custom Segments – Part 1 can be used to convert the internal IDs of custom segments to their actual values.
Dell Boomi AtomSphere
The Dell Boomi AtomSphere integration platform is a shared-everything, multi-tenant platform that supports cloud-to-cloud, SaaS-to-SaaS, cloud-to-on-premises, on-premises-to-on-premises and B2B integration. Boomi AtomSphere supports real-time integration and elastically scales to meet high-volume needs in mobile, batch (ETL) and EDI environments. Easily accessed via a browser, it delivers an impressive range of integration, master data management (MDM) and platform extension capabilities.
Tallan Integration Solutions for Dell Boomi
Tallan is a certified Dell Boomi Partner specializing in iPaaS platform integrations. We specialize in Integrations using EDI and Dell Boomi as the iPaaS platform of choice. Leverage Tallan’s vast integration experience for your AtomSphere platform needs. Our certified architects and developers provide the expertise, best practices, and guidance to deliver a successful integration solution.
We hope this guide will help you in your use of AtomSphere. If you have any questions or comments, or need assistance with any Integrations or development questions, please contact us at email@example.com.