AnsweredAssumed Answered

Search NetSuite Customer in Multiple Ways

Question asked by hwatson221955 on Oct 15, 2017
Latest reply on Nov 2, 2017 by Sjaak Overgaauw

I am trying to lookup a NetSuite customer. I would like to be able to create the following logic:

1) Is there an exact match on Entity ID? If yes, hold on to the Internal ID of the customer for future mapping. If no, then Step 2.

2) Is there an exact match on Company Name? If yes, hold on to the Internal ID of the customer for future mapping. If no, then Step 3.

3) Is there an exact match on Email Address? If yes, hold on to the Internal ID of the customer for future mapping. If no, then Step 4.

4) Is there an exact match on Billing Address Line 1? If yes, hold on to the Internal ID of the customer for future mapping. If no, then create new customer and pass that Internal ID to the future mapping.

 

My initial thought was to use document caching with dynamic document properties to get all customers and then perform a lookup in step by step fashion. However, if there are any duplicates, the process errors.

 

Then I tried querying NetSuite directly for each of these, only to find that I can't query for email address (the request XML shows nothing and so the query returns all records). I never tried billing address, so it's possible I can't query for that either.

 

Just trying to query company name, I tried using a saved search to give me a count of the records returned so I could determine whether to use the document cache. However, I received an error that Boomi can't handle a saved search that returns an aggregate.

 

Does anyone have any idea how this could work?

Outcomes