Component: LOCATION

Abstract

This component allows setting location of the product; where is this product taking place.

Values for this component can be set via ExperienceComponentsDto.location which is of GooglePlaceDto type.

Location is optional but it is highly recommended to be set as various other features (such as Google TTD).

Send null value in order to unset any presence of location like so:

{
   ...
   location: null,
   ...
}

Note: the above has different semantics to omitting location; the latter option prevents the system from making any location changes.

Attributes of GooglePlaceDto

Attribute JSON path
Data type
Mandatory
Settable
Notes
id
long
Mandatory on update, should be omitted on create
ID of this place object
countryCode
string
ISO 3166-1 alpha-2 country code. Upper case
city
string
Name of this city, preferably in English
state
string
Name of the state
name
string
Name of the place or address, e.g. “Victoria train station”
placeId
string
Google Place ID. Must be valid place id if passed
latitude
double
longitude
double
lookupLang
string
Language to use for location normalization by placeId. Supported languages are listed in https://developers.google.com/maps/faq#languagesupport. The parameter, if passed, is used in order to initialize the name (and possibly other parameters) in requested language. Note: this parameter is only used for incoming data when creating or updating the location and is never returned back to the client.

Data normalization

The system might attempt to do location normalization on each create and/or update operation providing data had changed.

The normalization algorithm is as follows:

  • If the object has placeId, the system will attempt to do an internal Place API lookup and backfill/overwrite all other fields, including name
  • Otherwise, if the object has latitude and longitude but not placeId then the system will attempt to do an internal Place API lookup and backfill/overwrite the following fields:
    • Country code
    • City
    • State

The partial backfill is used because it is impossible to resolve other elements such as name reliably.

  • Otherwise if neither placeId nor latitude/longitude are set, the system will not attempt any backfill and keep the fields as they are supplied

Note: we highly recommend using placeId above all other alternatives as this option uniquely identifies the place and allows better product placement in areas such as Bokun Marketplace, Google TTD and so on. Note that individual features, such as Google TTD, might have their own recommendations on placeId specifics which are not described in this manual.

 
Did this answer your question?
😞
😐
🤩