Skip to main content

Places Module

Introduction

Let the user enter an address and calculate the distances to a set of destinations. The closest 4 destinations are shown as a list. Using addresses solely will always result in the point being snapped to the road nearest to those addresses instead of the location itself. As this process module integrates Google Maps, several API keys are mandatory. Furthermore, if you provide more than 25 different destinations, the latitude and longitude of each destination is required.

Places example chat screenshot

Typical Use Cases

Places offer a great addition to an experience, where for example, a product finder is used. You can display your products within the chat and can then show the retailers offering your products.

How to Use the Module

Acquire Google API keys

  1. Make sure you enable Places API, Distance Matrix API, Geocoding API and Maps Static API in your Google Cloud Console
  2. Create a new key in your Credentials Area in Google Cloud Console. Name this key "Places Server Key" and set the Application Restriction to "IP addresses (web servers, cron jobs, etc.)". Moreover, restrict the key to Places API, Distance Matrix API and Geocoding API.
  3. Create a new key in your Credentials Area in Google Cloud Console. Name this key "Places Browser Key" and set the Application Restriction to "HTTP referrers (web sites)". Moreover, restrict the key to Maps Static API.
  4. Copy the generated keys to the respective fields in LoyJoy's Places Module.

Google Sheets

Learn how to connect your Google sheet data via connectors.

See here for an example Google Sheet. The first row is expected to hold the column names.

Please note that the name and address columns are required in all cases. The latitude and longitude columns are only required when there are more than 25 entries.

Example sheet