How to apply ignored to false in postResponseMap function

Comments

7 comments

  • Stephen Brandt Documentation Manager Community moderator
    Celigo University Level 4: Legendary
    Engaged
    Great Answer
    Top Contributor

    Kiruba Devarajan,

    I encourage others who might have gotten around this error to share their tips, but as you're probably aware the scope of this question is best treated with consulting help: 

    If you would like to work with someone more closely to help you through your custom flows, you could consider consulting hours. Also, we have the integrator.io Office Hours program where you can call in and get a free consultation. 

    Also, are you familiar with a recently released feature, Debug your scripts in integrator.io? You can print the value of your data arrays or indices, above, to the script’s execution log at any point – before, during, or after the for() loop. 

    0
  • Yvonne Nemes
    Engaged
    Awesome Follow-up

    Hi Kiruba,

    We came across the same issue today. You might've already figured it out but just in case anyone else sees or comes across this, it seems like returning options.postResponseDataMap was what we needed to do. So we just modified each of the options.postResponseDataMap's array items (instead of creating a new array) with the data we needed and returned that same exact object back, i.e do this:

    return options.postResponseMapData;

    I hope this helps - good luck!

    1
  • Akber Ali Strategic Partner

    I have been running in the same issue, but I believe when you build the flow, make sure in postResponseDataMap you will have the same details as your request object.

    Also, can you share your details if you solve the issue?

    0
  • Anitha Abraham Community moderator Principal Technical Writer
    Celigo University Level 3: Master

    Akber, you could check this updated article.

    0
  • Steve Klett Strategic Partner
    Celigo University Level 4: Legendary
    Answer Pro
    Great Answer
    Top Contributor
    Awesome Follow-up
    Engaged

    Anitha Abraham I went looking a the linked article but I don't see why you posted that link. It doesn't describe the `postResponseMap` function, it parameters or other requirements. Maybe I'm misunderstanding something. It would be nice if that article DID describe the function though because I'm here on the community pages trying to learn about how to use this function.

    0
  • Steve Klett Strategic Partner
    Celigo University Level 4: Legendary
    Answer Pro
    Great Answer
    Top Contributor
    Awesome Follow-up
    Engaged

    Interesting. The UI process to create a post response map function is odd. It seems you need to create the script record in the resource panel first, then come back and click the script icon on the export. Then you select the script file you created earlier. There is also a button to insert the function stub, which is nice because these are the docs I was wanting. Anyway, thought I'd share in case anyone else is struggling to create a postResponseMap script.

    0
  • Bhavik Shah Senior Product Manager
    Answer Pro
    Great Answer

    Here's the correct link for the article. 


    https://docs.celigo.com/hc/en-us/articles/5926315530139-Import-hooks#postResponseMapHook

    The function needs to return the responseData array provided by options.responseData. The length of the responseData array must remain unchanged. Elements within the responseData array can be modified to enhance error messages, modify the complete _json response data, etc...

     

    0

Please sign in to leave a comment.