This article explains how to use the lookup handlebar at the record level to implement static and dynamic lookups in an HTTP import application.
This article contains the following sections:
- Understand Lookups
- Create a dynamic lookup
- Create a static lookup
- Lookup handlebar syntax
- Static and dynamic lookups for JSON
- Static and dynamic lookups for XML
Get more information on configuring advanced lookups and handling lookup failure during response mapping.
Understand Lookups
If the data available in your source application is insufficient or incomplete for the purposes of your integration, but the required information can be retrieved from a secondary source, you can use a lookup to supplement source application's export data. You can use static and dynamic lookups at the record level for an HTTP import of JSON and XML media types. For more information, see Lookup field mapping.
Note: You must have the JSON/XML template for the HTTP import.
Create a dynamic lookup
Use the following steps to create a dynamic lookup:
- Click the mappings icon on the lookup step. The Settings window opens.
- Click the gear icon next to the field you are mapping.
- In the Field mapping type section, click Lookup.
- Select Dynamic search in the Options section.
- Enter the Relative URI.
- Select an HTTP Method.
- Enter the Resource Identifier Path.
- Click Save.
Create a static lookup
Use the following steps to create a static lookup:
- Click the mappings icon on the lookup step. The Settings window opens.
- Click the gear icon next to the field you are mapping.
- In the Field mapping type section, click Lookup.
- Select Static search in the Options section.
- Enter the appropriate values for Export Field and Import Field.
- Click Save.
Lookup handlebar syntax
You can reference data retrieved from existing lookups in a flow with the following syntax.
Dynamic mapping:
{{lookup <lookup name> this}}
Static mapping:`
{{lookup <lookup name> this.<Export Field Name>}}
For more information on handlebars syntax, see Handlebars Syntax.
Comments
1 comment
For more information on how you can use advanced lookups in tandem with response mappings, take a look at this article: Response mapping and advanced lookups.
Please sign in to leave a comment.