Question:
Does integrator.io recognize how to map multiple orders and multiple items on said orders in a single request?
Answer:
There are two scenarios to consider, realtime and scheduled, and the answer to both is no.
To understand why, you need to understand how the NetSuite Export Adapter generates data and how the REST Import Adapter maps data. integrator.io flows are composed of two steps, an export and an import. The export step generates a list of data and the import maps the data and sends it somewhere.
The NetSuite Export Adapter exports lists of data in one of three ways. The Realtime Export generates a list of size 1 with one record in it. That one record can contain multiple items. The Scheduled Export can either generate a list of data where each element is a search result or a list of search results. In a transaction search, this usually means either a list of items, or a list of transactions, where each transaction can have many items.
The REST Import Adapter maps each element of the list and then generates a RESTful request. The emphasis here must be on the "each element of the list" part. For the realtime export, the list would only have one order in it. That would not map multiple orders, it would map one order with many items. The ungrouped scheduled export would generate a request for each item, which would be very wrong. The grouped scheduled export would generate a request for each transaction. This scenario is similar to the realtime export, but would generate one request per transaction instead of one request with one transaction.
NOTE: Be cautious about chaining related flows like customers and sales orders. When flows are chained together, there are 2 separate exports that run at different times. In this case, there will be a request to get a list of customers and then a later request to get sales orders. Alternatively, there could be a request to get sales orders (and use the sales order to create a customer) followed by a later request to get sales orders again to create sales orders. The problem occurs when an order is placed between when the customer export runs and when the sales order export runs. Since the order is created after the customer flow generates a list of data, no customer will be created. However since the order is created before the sales order export runs, it will be included in the sales order export. That will cause an error since the customer won't be created when the sales order is to be created.
Comments
0 comments
Please sign in to leave a comment.