One-to-Many Import not importing any records

Hello,

I am currently running a flow that extracts contact record from an HTTP connection and imports them into NetSuite. This flow has been running fine for some time.

Recently, I attempted to add two steps to the flow: a lookup against the HTTP connection to retrieve the contact's notes, and a step to import these notes into NetSuite. I selected "One-to-Many" on the NetSuite import, and chose the path to the response mapping for the lookup step, but every time the flow runs, it shows zero records for this step, regardless of how many contacts were exported:

 

 

I am not sure if this has anything to do with it, but the HTTP connection does allow for URL parameter filtering, and so I cannot run a delta flow against it. I have a transform script in the Lookup Notes step that filters the notes based on their dates.

 

 

My response mapping is here:

 

My NetSuite import is here:

 

(It uses notes.notes because the HTTP returns a notes array, which then gets put integrator.io's notes object. I did try it the other way, using data[0].notes in the response mapping and simply notes here, but there was no difference.)

Any insight is appreciated.

 

0

Comments

4 comments
Date Votes
  • Tuesday's Admin I'm guessing your transform script is not pushing anything into the array and thus there is an empty array for the one-to-many to run off of. I would remove your transform script and see if it works without your transform script. If it does work, then your logic isn't working properly. You can also use TEST mode to run the flow while off and utilize mock data and then you can see all the ins and outs of every single step of the flow.

    0
  • Tyler Lamparter Thank you for your suggestions.

    I commented out the script and the flow is working successfully.

     

    Is the transform record the right place to put filtering scripts, or should I be doing this a different way?

    Basically, the problem is that I need to perform a delta flow on this data, but the HTTP connection does not support filtering the data via URL parameters. Rather, it always returns all results, so I believe any filtering will have to be done inside integrator.io.

    The way I tried to work around this was by setting the export as a delta flow, putting the {{lastExportDateTime}} in an unused parameter, and filtering through transform, but it seems like there is probably a more straightforward way to work around this problem.

     

    The issue I kept running into is that there seems to be no way to utilize the {{lastExportDateTime}} in a non-Delta flow.

    Thank you again for your help!

    P.S. I am the original poster; I was using our admin account due to login issues.

    0
  • Ezriah I would actually use an output filter script. You should first add a "Path to records in HTTP response body" so that IO interprets each note in the array as a record. Doing this will let you use the output filter because it gets rid of the array and will filter on each object within the notes array.

     

    After that, add an output filter.

     

    Lastly, you should remove the [0] from data[0] on your response mapping.

    0
  • Tyler Lamparter Thank you again for your help.

    The "Path to Many" really was the key piece I was missing; the flow is working perfectly now.

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post