Skip to main content
Join our team! We're hiring great PMs, developers, QA, sales & marketing and many more. Check out open careers.

Response mapping, results mapping, and advanced lookups example for NetSuite

Comments

7 comments

  • METER Group
    Celigo University Level 1: Skilled

    The text of this says:

    "Lookup steps always require response mappings to be useful later in the flow."  

    What does it mean for the response mapping to be "useful"?  That I have to use the output as the source in a mapping or filter?  And if I don't have it included yet, what will the consequences be?  will it a) not show up in the SOQL query inputs of the next step, or the filter inputs  b) not show up as a picklist value, or c) not show up in the retry data, or d) all of the above?

    1
  • Stephen Brandt Documentation Manager Community moderator
    Engaged
    Great Answer
    Top Contributor
    Celigo University Level 3: Master

    Hi, METER Group power user. 

    The answer to all of the above is yes, as you inferred. To add the records returned in the lookup step to your flow's data, you must map the response. And then, you'll have access to them in all of the flow steps/options mentioned. 

    We'll see what we can do to remove any ambiguity. To paraphrase a subject-matter expert here, "It's not that the response mapping will be useful, it's that the lookup step will have no use without response mapping."

    0
  • METER Group
    Celigo University Level 1: Skilled

    Oh. I understand now.

    "Lookup steps always require response mappings in order to be useful later in the flow."  

    That said, I was actually unclear in my question - I was trying to figure out some rhyme or reason to response mappings.  Some values  in the 'Lookup Response Field'  work for me, and some don't. I was hoping that the answer was that the 'Source Record Field (New/Existing field)' actually had to be _used_ in a subsequent mapping in order to get populated by the response mapping. In my write bubble (to Salesforce), here are the response mappings I used, with the results:

    body[0].id  ->  SFOpportunitybodyID_KW   appears in the retry data (only)
    id  ->  SFOpportunity_id_KW                      appears in the filter/SOQL data (only)
    body[*].id     does not show up anywhere

    In an ensuing lookup bubble (looking up Opportunity Products in Salesforce):

    data  ->  opportunitydata_kw               works for the filter/SOQL data, Retry data
    body.id       does not show up anywhere
    body[0].id       does not show up anywhere
    id                 does not show up anywhere

    0
  • Stephen Brandt Documentation Manager Community moderator
    Engaged
    Great Answer
    Top Contributor
    Celigo University Level 3: Master

    METER Group, I'm going to submit that question as a support ticket for you. body[0] might be a little suspect, instead of data[0], but it's not ideal to try to troubleshoot the mapping and subsequent flow steps in this format. 

    0
  • Andre Flaeschen

    Hi, Stephen Brandt. Could you share here the solution for this matter? I'm facing the same problem. I'm trying to use the data coming from a lookup, name "Rateio", in the next lookup, but it's not return the value of {{Rateio[*].u_carteira}} This expression was selected among the mapping available, I did the response mapping.

    Message:
    "Failed to generate request url from template: https://xxxxxx.service-now.com/api/now/table/x_jam_special_oppo_x_carteira/{{{Rateio[*].u_carteira}}}.

    Details: Parse error on line 1:\n..._oppo_x_carteira/{{{Rateio[*].u_carteira\n-----------------------^\nExpecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'."

    Thanks

    0
  • Stephen Brandt Documentation Manager Community moderator
    Engaged
    Great Answer
    Top Contributor
    Celigo University Level 3: Master

    Thanks for this search and comment, Andre Flaeschen. I pored through Kenneth's ticket above, and I didn't see a resolution or a problem statement that would help with the error you're getting. Can I suggest bringing up your flow in Office Hours, and entering a support ticket if you don't get resolution there? 

    0
  • METER Group
    Celigo University Level 1: Skilled

    the Help Desk was pretty helpful to me on this. There are some things that play into it like 'one to Many', and others that I still might not fully understand; and, what you are trying to do makes a difference e.g. Are you trying to pull out an array, or just a single value?

    One suggestion they gave me was to use the variable name _json instead of data (I saw no effect from this one)

    Holly did some testing:

    - data is used in Response mapping from the Lookup step and can be used in input filters

    - id is used in Response mapping from the Import step and can be used in input filters

    - body is only available on the retry data and has only the following values:

    "testbody": [    {
          "id": "xxxxxxxxx",
          "success": true,
          "errors": []
        }
      ]

    -- to get the body id, use body[0].Id

    I did some more testing and found that data.0.Id is the same as data[0].Id      

    ​Hopefully that helps some.

    0

Please sign in to leave a comment.