Pipelet GetNearestStores
Pipelet GetNearestStores
This pipelet gets the list of stores, for the current site, that are within a configured distance of a location on the earth. The stores and their distance from the specified location are returned as a Map of Store objects to doubles. The distance is interpreted either in miles or kilometers depending on the "DistanceUnit" input or configuration parameter. The location can be specified by either directly providing a latitude/longitude coordinate pair or by providing a country and a postal code: * If a postal code is passed, the pipelet looks in the system's geolocation mappings to find the coordinates for this postal code. If no matching geolocation is found, the pipelet will return an empty list of stores. If a match is found then the name of the city and the state will be stored in the pipeline dictionary in addition to the map of stores. * If coordinates are passed, the values for country and postal code are ignored. * If neither of the two input pairs is provided the pipelet will throw an exception.
Configuration Properties
DistanceUnit  :  String (Required)
The distance unit to be used for the calculation.
Permissible Values:
Input Parameters
PostalCode  :  String (Optional)
Customers postalCode
CountryCode  :  String (Optional)
ISO Country Code.
MaxDistance  :  Double (Optional)
Area (radius) in DistancUnit where Stores will be searched for.
DistanceUnit  :  String (Optional)
The distance unit to be used for the calculation. Supported values are 'mi' and 'km' (for miles and kilometers respectively). Overwrites the configuration value.
Latitude  :  Number (Optional)
Current latitude.
Longitude  :  Number (Optional)
Current longitude.
Output Parameters
Stores  :  LinkedHashMap  :  (Required)
A map containing Store objects as keys and their distance to the provided location.
City  :  String  :  (Optional)
The city matching the provided CountryCode and ZipCode.
State  :  String  :  (Optional)
The state matching the provided CountryCode and ZipCode.