Does NS Search Snap call getList action internally?


Hope you are doing good.

We are using NS Search, NS Update, NS Get, and NS Upsert Snaps in most of our integrations. We would like to know if any one of the above snaps uses getList action?

When we verify the logs we are always seeing an extra connection or connections were made to NS with the action as “getList” even though we are not explicitly using the NS GetList Snap.

Can someone help me here on why there are extra connections are being made to NS?

Below is the screenshot for reference

We are mostly seeing this extra connectivity along with the Search action.

Let me know if you need more information.

Thanks in advance

Hi Teja,

We use getList to retrieve metadata about custom fields.

Hope that helps,

Hi Patrick,

Thanks for your response. Yes it is clear now.

And one more question, does this getList makes n no.of connections to NS for retrieving n no.of custom fields? Because we are seeing 2 extra getList records in the log for one NS search

Thanks in advance.

This has me a bit stumped. Are there any other NetSuite snaps in the same pipeline, or in a separate pipeline that might be executing at the same time? Like a NetSuite Create or Update?

Also, please tell me more about your Search. Is it an advanced search?

We are using NS search with advanced option enabled. Our pipeline is having NS search, NS Update , NS Get Snaps. It is a single pipeline with more than 2 NS snaps .

And let’s say if we have got 3 records from the saved search , does the snap uses getList action per record basis or is it going to be a single getList for those 3 records ?

The two rows at the end with getList and otherCustomField are happening after the search. I think those calls are coming from a snap that follows – probably the Update.

Can I please see a screenshot of your pipeline?

And to answer your question:

A single snap should retrieve the metadata only once during a single execution, and use it to process every input document regardless of how many there are.

However, if you have multiple snaps in the same pipeline that use the same metadata for the same custom fields, they might both try to retrieve the metadata in parallel. We cache the metadata when we get a response, but if the second snap attempts to get the metadata while the request started by the first snap is still executing, it won’t be in the cache so the second snap will start an identical request. That might be what you’re seeing here. That’s something we could fix with a bit more optimization – the second snap could realize that there’s a request in progress for the metadata it needs so it should wait for it rather than start another request to get the same metadata.

Also, the caches expire after a few minutes, since the metadata might change over time, so you’ll see the same fetches happen again later when you run the pipeline again.

Also, there’s a big difference in what happens with metadata depending on if you’re validating or executing your pipeline. Validating will retrieve more metadata so that it can populate the input schema for each NetSuite snap where it would be relevant. For example, we add the custom fields that are available for the relevant object type to the input schema of the Update so that in the attached Mapper you can see which custom fields can be updated. When you’re executing the pipeline, however, input schemas aren’t relevant so it only needs to retrieve metadata for the fields you’re actually using in the pipeline.

Thanks for the detailed explanation, Patrick.

This is really helpful and my doubts are clear.

And yes we are using 4 NS snaps in a single pipeline as below

If I get any questions then I will post here.

Good day