NetSuite Cash Refund Values not passed from mapping to request

Comments

5 comments

  • Scott Henderson CTO
    Celigo University Level 1: Skilled
    Answer Pro
    Top Contributor

    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
  • PaulS
    Celigo University Level 1: Skilled
    Awesome Follow-up
    Engaged

    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
  • Scott Henderson CTO
    Celigo University Level 1: Skilled
    Answer Pro
    Top Contributor

    "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
  • PaulS
    Celigo University Level 1: Skilled
    Awesome Follow-up
    Engaged

    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
  • PaulS
    Celigo University Level 1: Skilled
    Awesome Follow-up
    Engaged

    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.