How to Avoid Having a Lookup Replace Record Context

Here is my flow:

Salesforce Export → NetSuite Import1 (with response mapping of errors to ns_errors) –> Salesforce Lookup (using complex SOQL to retrieve multiple records related to the SF record, but these are NOT in a related list), which makes the data available via results mapping –> NetSuite Import2 –> Salesforce Import to write back the new NS ID (If Succeed) –> Salesforce Import (If Fail)

I only want NetSuite Import2 to run if NetSuite Import1 succeeds. I am trying to use an Input Filter based on ns_errors, but ns_errors is no longer available because the intervening lookup has replaced the record context. How can I overcome this? I only want the lookup to enrich the data from the original record not replace it.

I also want the final SF Imports to be triggered conditionally based on ns_errors.

I'm not sure what you mean by this "because the intervening lookup has replaced the record context". The lookup wouldn't override anything on the original record unless your response mapping for the lookup is the a field that already exists on the source record. For example, if you response mapped data to ns_errors, then that would override ns_errors on your source record.

I would agree that’s what should happen. But whether it’s an input filter or branching, ns_errors is no longer available after the lookups. :frowning:

Are you seeing it disappear while previewing data or during runtime as well?

when building the flow, the errors I have defined are not available either as input filters or as branching conditions. they are only available for the step that directly follows the step where the errors were defined in the response mapping.

Can you share your flow zip?