Skip to main content

The response I get from a HTTP callout I want to use from Flow looks like this JSON:

[{"attributes":{"key1":numvalue,"key2":"txtvalue","key3":"txtvalue"}}]

Because the values I want to use are enumerated under "attributes", currently the new "Transform" Flow element won't let you map these values directly to a record's fields:  

When mapping a field in a source collection to a field in the target collection, both collections must be at the same hierarchical level in their respective resource. For example, the 2XX collection and the Order collection aren’t within any other collection. Because they’re both the top collections in their respective resources, you can map fields between them.

How to map HTTP response from hierarchy?

 

Is there any sensible workaround to adjust the returned info so that it can be mapped to record fields with the "Transform" element? Or is Flow just not capable of that kind of thing yet, and I should just manually parse the JSON string myself? (Yes, there are USF tools that'll do that, it would be nice if I could just get past this one roadblock with native features, though.)

 

#Flow #Httpcallout #Integration

2 risposte
  1. 10 ott 2023, 01:14

    Hi Peter,

    i see that the data you are receiving is an array of objects, which contains attributes as object fields. So instead of using Transform which i think is in BETA currently, why not use a loop element to loop through the collection and use an assignment element to assign to the respective object? 

0/9000