GlobalTypeAhead Example - Spectrum_OnDemand - Latest

Spectrum OnDemand Web Services (REST)

Product type
Product family
Spectrum > Quality > Context Graph
Spectrum > Spatial > Spectrum Spatial Analyst
Spectrum > Spectrum Platform
Spectrum > Quality > Addressing
Spectrum > Quality > Spectrum Quality
Spectrum > Web Services
Spectrum > Dataflow Designer
Spectrum > Discovery
Spectrum OnDemand
Spectrum > Spatial > Spectrum Spatial Insights
Spectrum > Spatial > Spectrum Spatial
Spectrum > Geocoding > Enterprise Tax
Product name
Spectrum OnDemand
Spectrum OnDemand Web Services (REST)
First publish date

InstanceKey determines the number of typeahead sessions that the user has consumed. It ensures that users are charged each time they look up a new address and not each time a call is made to the Spectrum OnDemand server with their keystrokes as they use the typeahead feature.

Let us see this with an example, where Taylor is using the typeahead feature for address validation.
  1. Taylor starts to type the address. On the first keystroke, the InstanceKey is set to empty string. The call goes to the Spectrum OnDemand server and the return value has an InstanceKey.
  2. As Taylor keeps typing, the call is made to the Global Type Ahead service, which returns the list of addresses.
  3. Taylor selects a address and a call is made to the server (to validate the address) assuming the application is configured to use Address Validation service.
  4. This InstanceKey is passed every time a call is made to the server to validate the address. It determines the uniqueness and differentiates the addresses used. You cannot use same InstanceKey for two different addresses.

    For example, Ship to address will have a different InstanceKey than the Ship from address.

  5. Taylor finds the required validated address and selects it, or for some reason, Taylor cancels the operation. In both the scenarios, as soon as the operation ends, the InstanceKey is discarded.
  6. Taylor (or any other user) starts typing another address. On the first keystroke, the InstanceKey is set to empty string and the value is returned with a new InstanceKey.

    Use a new InsanceKey, every time you discard or look for a new address.