How to Debug NetSuite SOAP API calls made from Boomi

Eric Popivker
ENTech Solutions
Published in
4 min readDec 14, 2022

When you are working with NetSuite connector in Boomi (or Mulesoft or Celigo), and you are not getting the expected results, what do you do?

WHAT DO YOU DO?

The first thing you can do is see full SOAP Request/Response directly in NetSuite.

The second thing you can do is make the same request in Postman, get it to work in Postman, and then update the Boomi call to do the same.

Let’s dive in, shall we!?

View SOAP Requests/Responses in NetSuite

Boomi uses SOAP API to connect to NetSuite. When it works, it is great, but when your operation fails, sometimes it is hard to figure out why it is failing. There is no way to see full SOAP requests/responses directly in Boomi, so to investigate the issue, it is best to go to the source (and solution) to all life problems: NetSuite.

Login to NetSuite as Admin and go to:

Setup > Integration > SOAP Web Services Usage Log.

Here you can see full SOAP requests and responses coming from Boomi.

Screenshot:

Some notes:

  • Only administrators can access the SOAP Web Services Usage Log.
  • In Prod, logs for SOAP requests and responses are available for 21 days
  • In Sandbox, logs for SOAP requests and responses are available for 7 days
  • The system does not save requests that are larger than 100 MB.
  • The system does not save responses that are larger than 10 MB.

So let’s say I want to run the same request that I did in Boomi, but in Postman

Call NetSuite SOAP API from Postman

The link below covers calling NetSuite SOAP API from Postman. It is a bit outdated and didn’t work for me right away.

https://www.zuar.com/blog/netsuite-api-exploring-soap/

I had to change the script to use HMAC SHA256 encryption instead of SHA1. I also changed token Passport tag names.

Here is the Postman collection that you can use for common SOAP API requests:

https://www.dropbox.com/s/uale11rk0ar3pnk/NetSuite%20SOAP%20API%20Demo.postman_collection.json?dl=0

It has some common operations like:

  • Get Customers
  • Get Sales Orders
  • Get InventoryItems

And here is the Postman environment import file:

https://www.dropbox.com/s/wv0n31926zkqkpk/NetSuite%20SOAP%20API%20Demo.postman_environment.json?dl=0

To use this postman collection:

  1. Import collection in Postman.

File: “NetSuite SOAP API Demo.postman_collection.json”

It will create a new collection with the name “NetSuite SOAP API Demo”

2. Import environment from file

“NetSuite SOAP API Demo.postman_environment.json”

To do it click on the same import link as in step 1.

3. Fill out Environment variables in the CURRENT VALUE column

ACCOUNT — the account’s ACCOUNT ID
CONSUMER_KEY — the integration record’s CONSUMER KEY
CONSUMER_SECRET — the integration record’s CONSUMER SECRET
TOKEN_ID — the role’s access TOKEN ID
TOKEN_SECRET — the role’s access TOKEN SECRET
WEBSERVICES_URL — the NetSuite WebServices URL in this format:

https://5512345.suitetalk.api.netsuite.com/services/NetSuitePort_2021_2

More info about these values:

https://community.boomi.com/s/article/howtoconfigurethenetsuiteconnectionwithtokenbasedauthentication

4. Make sure Environment is selected as current

5. Execute one of the Operations like Get Customers to make sure it works

Put it all together

The steps for debugging NetSuite SOAP API issues encountered in Boomi, Mulesoft, or Celigo.

  1. Find the SOAP request/response for the failed Boomi operation in NetSuite’s “SOAP Web Services Usage Log”
  2. Setup Postman to connect to NetSuite
  3. Copy SOAP Request from NetSuite SOAP Log to Postman

Get Customers request looks like this:

<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsg:searchPreferences soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:platformMsg="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformMsg:bodyFieldsOnly>true</platformMsg:bodyFieldsOnly>
<platformMsg:pageSize>200</platformMsg:pageSize>
</platformMsg:searchPreferences>
<ns3:tokenPassport soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns3="urn:messages_2021_2.platform.webservices.netsuite.com">
<ns1:account xmlns:ns1="urn:core_2021_2.platform.webservices.netsuite.com">XXXXXXX_SB1</ns1:account>
<ns2:consumerKey xmlns:ns2="urn:core_2021_2.platform.webservices.netsuite.com">****************************************************************</ns2:consumerKey>
<ns4:token xmlns:ns4="urn:core_2021_2.platform.webservices.netsuite.com">****************************************************************</ns4:token>
<ns5:nonce xmlns:ns5="urn:core_2021_2.platform.webservices.netsuite.com">nIX4YjqJBME2JoJrYnEH</ns5:nonce>
<ns6:timestamp xmlns:ns6="urn:core_2021_2.platform.webservices.netsuite.com">1670853104</ns6:timestamp>
<ns7:signature algorithm="HMAC_SHA256" xmlns:ns7="urn:core_2021_2.platform.webservices.netsuite.com">********************************************</ns7:signature>
</ns3:tokenPassport>
</soapenv:Header>
<soapenv:Body>
<platformMsg:search xmlns:platformMsg="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformMsg:searchRecord xsi:type="ns2:CustomerSearch" xmlns:ns2="urn:relationships_2021_2.lists.webservices.netsuite.com" xmlns:ns3="urn:common_2021_2.platform.webservices.netsuite.com"/>
</platformMsg:search>
</soapenv:Body>
</soapenv:Envelope>

The header is mostly same for all Query requests. It includes searchPreference with pageSize and tokenPassport which has auth information. The first time you copy it, you need to replace field values in tokenPassport with Postman merge fields so that request in Postman will look like this:

<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsg:searchPreferences soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:platformMsg="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformMsg:bodyFieldsOnly>true</platformMsg:bodyFieldsOnly>
<platformMsg:pageSize>200</platformMsg:pageSize>
</platformMsg:searchPreferences>
<ns3:tokenPassport soapenv:mustUnderstand="0" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" xmlns:ns3="urn:messages_2021_2.platform.webservices.netsuite.com">
<ns1:account xmlns:ns1="urn:core_2021_2.platform.webservices.netsuite.com">{{ACCOUNT}}</ns1:account>
<ns2:consumerKey xmlns:ns2="urn:core_2021_2.platform.webservices.netsuite.com">{{CONSUMER_KEY}}</ns2:consumerKey>
<ns4:token xmlns:ns4="urn:core_2021_2.platform.webservices.netsuite.com">{{TOKEN_ID}}</ns4:token>
<ns5:nonce xmlns:ns5="urn:core_2021_2.platform.webservices.netsuite.com">{{nonce}}</ns5:nonce>
<ns6:timestamp xmlns:ns6="urn:core_2021_2.platform.webservices.netsuite.com">{{timestamp}}</ns6:timestamp>
<ns7:signature algorithm="HMAC_SHA256" xmlns:ns7="urn:core_2021_2.platform.webservices.netsuite.com">{{signature}}</ns7:signature>
</ns3:tokenPassport>
</soapenv:Header>
<soapenv:Body>
<platformMsg:search xmlns:platformMsg="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformMsg:searchRecord xsi:type="ns2:CustomerSearch" xmlns:ns2="urn:relationships_2021_2.lists.webservices.netsuite.com" xmlns:ns3="urn:common_2021_2.platform.webservices.netsuite.com"/>
</platformMsg:search>
</soapenv:Body>
</soapenv:Envelope>

For other QUERY requests you can usually use same Header and just change the Body.

4. Execute Postman operation to reproduce the same error as in Boomi

5. Reference NetSuite SOAP documentation for this request to get it working

6. Update Boomi request to work the same way as Postman

Conclusion

It is not uncommon to be stuck on a call to NetSuite when creating integration in Boomi or another iPaas. In this article, I went over steps to get to the raw SOAP request/response and use Postman to find a solution.

--

--

Eric Popivker
ENTech Solutions

Living in .NET world for 20+ years. Founder of .NET Fiddle.