NetSuite update based on JSON payload rather than lookup criteria

Comments

5 comments

  • David Gollom Strategic Partner
    Top Contributor
    Celigo University Level 4: Legendary
    Answer Pro
    Great Answer
    Engaged

    Hey Mike,

    Sounds like a NetSutie import using the One to Many option should work.  Or, on your lookup step, you can use the Once Type option and you'll  therefore mark those serials as having been processed.  Would those work?

    0
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Mike Branch one-to-many like David suggested may work, but it looks like you may need to adjust your response mapping for the lookup to NetSuite to get serial numbers because one-to-many only support a single deep array. Right now, your serial numbers is an array of arrays which is messy and I assume it could just be one array with several serial objects. In your lookup, are you grouping results and then have a response mapping of "data" to "serialnumber"? If so, change the response mapping to "data.0" to serialnumber" OR don't group by results because you probably don't need to here. After that, you should have an array of objects and then you can specify a one-to-many path on your NetSuite import to serial custom record.

    0
  • Mike Branch Strategic Partner

    Thanks David Gollom and Tyler Lamparter. It seems like that should solve my problem. It's no problem pushing the serial number array to the top level. However I'm having a little trouble configuring the lookup correctly and can't find any clear documentation on this. Assuming I have an array as shown below, how would I specify the "path to many" and a filter to match on the "internalid"? I've tried a few things but the debug info doesn't show any lookup attempts at all, which leads me to believe Celigo doesn't see this info in the JSON.

        "serialnumbers": [
          {
            "serialnbr": "44232900048",
            "internalid": "5396499"
          }
        ]

    0
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Mike Branch here is a screenshot and an article that can help.

    https://docs.celigo.com/hc/en-us/articles/12581994146843-Create-a-one-to-many-import-including-nested-arrays

    0
  • Mike Branch Strategic Partner

    Success - thanks!

    0

Please sign in to leave a comment.