NetSuite Cash Refund Values not passed from mapping to request

I am trying to post a cash refund from Celigo into NetSuite.  I am getting an error stating that I must include values for "Customer, Date, and Location.  I have the values mapped correctly in destination map as I have a similar flow running in a production system.  I have included images of all the views of which one is the retry data that has the corresponding values sent from the previous flow; the field mapping; the view request and the view response.  I'm not sure what is "missing" in the map and the data coming over.  Hopefully some additional eyes may shed some light for me.
I added a picture of the flow.  Note that the same fields and almost identical mapping is used in the sale destination then if it is a "refund" it is passed onto the last destination.
 

0

Comments

5 comments
Date Votes
  • Looking at the retry data, you need to do "data.trans[*]" vs "trans[*]" in all your mappings.  This should fix your immediate issue.

    On a side note, I am not sure if you have control over the source system that posts the webhook data to the flow, but if you do, then you might be able to simplify things by changing the inbound structure of the HTTP request body to the following.  i.e. just send a simple top level array where each element in the array is a single transaction/record, and then you dont need to use 'one to many', etc...

    [ { HBTranType: "", ... }, { HBTranType: "", ... }, { HBTranType: "", ... }, ... ]

    vs what the retry data looks like now

    { data: { trans: [  { tran: { HBTranType: "", ... }},  { tran: { HBTranType: "", ... }},  { tran: { HBTranType: "", ... }}, ... ]

    Disclaimer: I havent tested sending batches of records to a webhook in a long time, but pretty sure it works. :)

    0
  • Thanks for the input, Scott.  I have the same mapping on the "sale" that comes through first as shown above with a different form and it completes 100% of the time without the "data" preamble.  Tech support said that the "data" is stripped before going into the destination, hence the inability to select it when you are doing the mapping.
    I can control the incoming API feed, but again it all works in the sale and not the refund.  The part that is "missing" the data is in the header that is then followed by the 1 + N items.  It's not even making it to the items in this case.  Also, the request shows that the "account" was passed the "123" from the data (HBAcctId) but none of the other mapped key/values.  And if you look at the mapping, not all of the "header" values or keys are passed that have been mapped.  I'll try your mapping suggestions...

    0
  • "123" is passed because this is a hard coded mapping (i..e per your screenshot above), and it is not looking at the data at all for hard coded mappings.

    Perhaps you are not setting this field consistently between the 2 import bubbles.  This might be the best thing to check.

    0
  • Thanks again... I went and checked, and the production version is also set to "No."  I put a debug trace on the production side and see if I can't pickup the equivalent of the sandbox side and post it.  Haven't had a chance to try your mappings, will do so and post results with the other data.

    0
  • I prepended the "data" to each of the mapping elements and it worked correctly - as you said in the first post! I'm still curious why it works without the "data" in the sales destination and not the refund.  I'm happy it's working.  Thanks again, Scott

    0

Please sign in to leave a comment.

 

Didn't find what you were looking for?

New post