---
sourceDocument: Brazil Sales Customer Relationship Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/order-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Sales Customer Relationship Management

ft:clusterId :

    - omgmt

bundleId :

    - omgmt

workflow :

    - Customer and Industry


---

# The LocationLookup field

# The LocationLookup field {#ariaid-title1}

Release version: Brazil  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of The LocationLookup field

The LocationLookup field in ServiceNow enables you to integrate Google's Places API to automatically pull detailed address data into text fields.
This feature allows customers to configure unique location information and pricing by mapping Google's address components directly to fields within their ServiceNow forms.
Show full answer Show less  

## Key Features

* **Flexible Field Integration:** Any text-type field can be set as a LocationLookup component display type using the layout editor or by editing layout CSV files.
* **Google Places API Integration:** Utilizes Google's Places and Maps JavaScript APIs to retrieve address data for enhanced location configuration.
* **API Key Configuration:** Requires a valid Google API key with permissions for Maps JavaScript API and Places API.
* **Custom Field Mapping:** Allows mapping of returned place data to specific fields via a `fieldMapping` property. This mapping can be a simple string or a key-value object to precisely assign Google API response data to form variables.
* **Support for Complex Address Components:** Supports mapping of nested address components such as city, state, postal code, and sublocality using JSON path notation (e.g., `addresscomponents.locality`).
* **Set Compatibility:** Mapping works in sets, provided all mapped fields are included within the set (cross-index or global fields are not supported in sets).

## Practical Use and Configuration

To implement a LocationLookup field, you must:

* Obtain and configure a Google API key for both Maps JavaScript API and Places API.
* Define the field's value in JSON format specifying the API key and the `fieldMapping` that pairs ServiceNow field variable names with Google API response data.
* Use the mapping to extract address components such as formatted address, city, state, postal code, street number, and street name for precise location data capture.

This setup enhances user experience by auto-filling address information and supports accurate location-based configuration and pricing workflows.  
Any text type can be defined as a LocationLookup component display type, which lets you use Google's API to pull address data.

The LocationLookup field component display type leverages Googleʼs Places API to pull address data that can be used for unique location configuration and pricing. Any text field type can be defined as a LocationLookup component display
type by using the layout editor or by directly editing a layout CSV file.


To see it in action, view the following video:

[Location Lookup Field Component Display Type](https://www.youtube.com/watch?v=Ofuq7Vza-wU)

To use a LocationLookup field, you first need to have a valid API key from Google with permission to access Google Places. The API key must be configured for both the Maps JavaScript API and the Places API.

The value of the field requires two properties: key and fieldMapping.

    {
      "key": API-Key-string,
      "fieldMapping": {"[field1VariableName]":"[returnedPlaceType]","[field2VariableName]":"[returnedPlaceType]"}
    }

The key property refers to the API key.

Use the fieldMapping property to instruct the UI to map the returned place data to different fields in the configuration. This property can take either a string or an object of key:value pairs (both strings).

If a string is provided:

* The string should be the variable name of a field in the configuration
* The returned data from the API will be converted to a string and mapped to the field's value

{#the-location-lookup-field__ul_zwf_mtf_fhc}

If an object is provided:

* The keys will be the variable name of the field in the configuration
* The values will be the JSON path to the data from the API that should be mapped to the field

{#the-location-lookup-field__ul_lcb_4tf_fhc}

For more details on what that data looks like, see: [Place Details](https://developers.google.com/maps/documentation/places/web-service/details#Place)

When you map address components, these come back as an array of the different component values, so there is no straightforward path. The UI expects something in the following format:

    address_components.[component type]

Note that not every type listed is guaranteed to be returned by the place details API. To find the supported types, see the following Google website:

[Place Types](https://developers.google.com/maps/documentation/places/web-service/supported_types)

Example field value:

    {
        "key": "*********",
        "fieldMapping": {
            "formattedAddress": "formatted_address",
            "sublocality": "address_components.sublocality",
            "city": "address_components.locality",
            "stateForLocation": "address_components.administrative_area_level_1",
            "zipCode": "address_components.postal_code"
        }
    }

This mapping also works in sets. Note that the location field, and all of the fields listed in the mapping, must also be part of the set. Cross-index or global fields are not supported in a set.

Some common mappings from the Google Places API include:

* formatted_address (returns the whole address in human-readable form)
* address_components.locality (returns the city)
* address_components.administrative_area_level_1 (returns the state)
* address_components.country
* address_components.postal_code
* address_components.street_number
* address_components.route (returns only the street name)
{#the-location-lookup-field__ul_kc1_ttf_fhc}

