The goal of this article is to demonstrate how to let the end-user type in an address, then choose between many suggested enriched addresses.
The implementation uses Rest Clients to
- suggest to the user many choices
- fill in the target enriched address according to the choice
1) Rest client configuration
In the Configuration screen add the Rest Client that will be used in enrichers :
Set information needed to configure the Rest Client (sample API):
And values retrieved from API Rest response with correct json path :
In our case, we will use 2 Rest Clients, one to normalize an address from Offical Data Base and a second to suggest 3 addresses proposals from an input address.
2) Form configuration
In addition, to address standard attributes we will add 3 boolean attributes. With these attributes, we will display the 3 address suggestions. And fill in standard address attributes with the selected choice (checkbox).
In the Helper text of the new boolean attribute, we will use SemQL expression and set attribute enriched by Rest Client who suggests 3 addresses propositions to be able to see the result.
3) API enrichers configuration
In Application Builder, add an API enriched on the correct entity for each Rest Client:
Set input (address) and output (enricher attribute and Rest Client output)
4) Stepper configuration
Set enriched On Data Change :
5) UI result
When we enter a new address, we can see 3 suggestions and select the correct one to fill in standard address attributes