I am trying to find out where to start. We have a ...
# suitescript
s
I am trying to find out where to start. We have a RESTLET that syncs data to an external shipping service and writes back to netsuite to the body and line level of a Sales Order. When we update values in our external system it POSTs back to Netsuite but it causes another update to send back to external system (stuck in a loop). I want to understand how to prevent this?
b
how does the data get from netsuite to your external system
s
via restlet.... that part is all working correctly
b
that sounds like its missing a piece
s
yes
b
restlets require something to make a http request to it
s
it has been working properly, I only provided a snippet of the code
b
thats not really the issue
you say that there is a 2 way integration
s
so it exports from data correctly
b
but a restlet by itself cannot do that
s
lets restart... restlet is working fine, we export sales order data to an external system
we write back data to netsuite on the line level of the sales order (tracking number)
that was all working fine
we added updating 3 body fields on the sales order
when we write back to NetSuite it triggers an update of the original data back to our external system
make sense?
b
nope, still missing what ive been asking for
what does the
we export sales order data to an external system
s
How does that update from NS to the external syste happen? something in the restlet? A user event script? A scheduled script? What is doing the export? There is a piece missing.
s
we sync data from netsuite to external system
b
thats the part you need to understand or fix
s
But how? What does that sync? An ETL tool outside of Netsuite?
s
yes, its a drupal drush command
we have it setup in jenkins that manages a queue to import data into external system and then send it back to netsuite
all of that has been working correctly for years
b
again, you need to understand how the data gets from netsuite to your external system
it sounds like its based off of a last modified date
which is inappropriate for a 2 way sync
🤔 1
for the reason you are seeing
s
yes, last modified date
got it