The Lookup step allows you to get data from an app cache on the AppNetwork.
The Lookup step is used when additional data is required or useful before performing the next flow steps. This could be because related data is required for the flow or to validate source data before making a change in the target system.
Step Inputs
In the Edit Step menu, you can add details about the step configuration as needed for your flow.
Step Details
App
Select the app (the third-party system) you want to retrieve data from. The list of apps populates with all of the third-party systems involved in the integration.
Examples of apps: Vista, ProjectSight
Configuration
Object
Use the drop down list to select the data being looked up, as defined in the service.
Fail the Step if
Select the option to explain the expected results of the step. The default is N/A.
Note: If something other than N/A is selected and the step fails, there’s no way to evaluate or make additional decisions based on the step result. To prevent this, select N/A, and follow the Lookup step with a Conditional step to inspect the output for the number of results and stop the flow if the Conditional step fails.
Exactly one result isn’t found
More than one result is found
N/A, the number of results is irrelevant.
Include Metadata
Make this option active if you want information on the ID, the time of the results, and other information from the results.
Filter Expressions
If you add multiple properties, the Lookup step includes all of them in the flow. In our example, the Lookup step would evaluate both the ID and the cache ID in the filter expression.
Property Name
Use the drop down list to select which available cached data will be used for the flow.
Operator
Select the operator to use to compare the property and the value.
Value
The result to compare to the property name.
Properties
Properties to Select
The exact fields to retrieve. Used to narrow down the data.
If no properties are selected, the flow will return all properties.
Step Status
You may see one of the following statuses after running the Lookup step:
Successful
Occurs when:
Data is successfully returned from the service (even if empty)
The specified Expected Results conditions are met
Failed
Occurs when:
You expect exactly one result and zero or more than one result is returned
You expect exactly zero or one result and more than one result is returned
If your flow step failed and you didn’t choose N/A, there’s no way to evaluate or make additional decisions based on the step result.
Step Outputs
The output of the Lookup step is the filtered data results.
The output of a Lookup step is an array of objects. This array can have zero, one, or many objects in it. To access the property of a specific object, you will need to include the index of the object. [0] is the first element, [1] is the second element, and so on
Use Cases and Examples
Use the Lookup step when additional data is required or advisable before performing next flow steps. For example, you may need to retrieve required vendor data when trying to post an invoice.
The Lookup step can also be used to validate source data before attempting to make changes in the target system; for example, to ensure that a particular job isn’t locked or doesn’t have inactive phases in the source system before trying to make budget updates in the target system.
In this example, you’re looking up a company’s headquarter information. This is useful if you need to confirm an employee in two systems has the same address in each.
Note: Follow this step with a Conditional to confirm the results or stop the flow.