Google API


**Important Information**

Google has now removed all free unregistered user mapping and distance calculating services. It has however now introduced a ‘pay as you go’ service which includes a free quota for each registered account that may well cover the entire requirement for the average small business using this facility. Charging is very reasonable for these services so there should be no reason for any concern, but clients may see the service terminate without warning if they are not registered for these new charges.

The Sicon modules that are affected by this change are:

  • Sicon WAP Expenses
    • For distance calculations
  • Sicon Service
    • For travel from/to appointments
    • For Service Map showing cases and engineers.

This means that with the release of the Sicon v18, WAP and Service products will not have any default API keys built in and it will be necessary to register for your own API key. Both products already have the facility to enter an API key from v17, so when the mapping service stops working in either of these products please follow the links below to setup a google account and create an API key.

This information is correct as of October 2018

Contents


Sicon Service Google Maps Service Usage Explained

In Sicon Service, we use the following:

  • Distance Matrix API
    • SKU: Distance Matrix
  • Geolocation API
    • SKU: Geocoding
  • Maps Javascript API
    • SKU: Maps Javascript API

Sicon Service - where & when clicks are charged

There are two areas of Sicon Service that will use API credits:

1. Within a Work Appointment when travel is added and using the Travel Estimate “Calculate from To/From” button. This calculates the estimated travel time and mileage from the addresses/postcodes selected in the “To/From” section.

2. The MAP functionally: When a case is added, if it’s for a location /postcode that has not previously been used/calculated the module will require Google Geolocation API to capture the co-ordinates.

NB: at the time of this information being published (October 2018 for Sicon Service release 18.0.01) the function “Autocomplete” on a Travel Appointments uses the Google API’s, that is currently a free service and therefore would not use your API key, would not use credits and will not show on your dashboard. Sicon has however no control over when this may change and as a company we would recommend you keep an eye on your companies google dashboard account for any changes in this area. Sicon will also keep an eye on Google developers forums and if any changes are noted will keep the on line help and user guide and www.sicon.co.uk/google-api/ updated.

Sicon WAP Google Maps Service Usage Explained

In WAP Expenses, we use the following:

  • MAPS API
    • SKU: Dynamic Maps
  • Directions API
    • SKU: Directions Advanced Service
  • Places API
    • SKU: Places Basic Data
    • SKU: Autocomplete
    • SKU: Geocoding

WAP Expenses – where & when clicks are charged

Within the Expenses module, Google API charges apply when adding a new mileage line.

  • Sicon WAP Expenses Google API 1

If an API Key is enabled, when you click ‘Calculate distance between two locations’ (highlighted in the above screen shot), the following screen will open and clicks will be charged as follows:
Sicon WAP Expenses Google API 2

  1. When the screen opens, the map will focus in on your current location, Geocoding will charge once and Dynamic maps will charge once.
  2. Destination Starting Point
    • Start typing to find your address and for each keystroke, Autocomplete will charge per character you type.
    • (NB: there is an option in settings that will stop Autocomplete charging until you have entered a certain amount of characters, i.e. it will only start charging once per keystroke when you reach 4 characters).
    • Once you start typing, the system will start to bring up places starting with the characters you have typed (Only once you reach the characters specified as above if applicable):

Sicon WAP Expenses Google API 3

    • Once you click on the relevant address, Places will charge once for a places request.  Geocoding and maps will also charge once also.  If you drag or zoom the map, there will be no charge.
  1. Destination End Point
    • Start typing to find your address and for each keystroke, Autocomplete will charge per character you type.
    • (NB: there is an option in settings that will stop Autocomplete charging until you have entered a certain amount of characters, i.e. it will only start charging once per keystroke when you reach 4 characters)
    • Once you start typing, the system will start to bring up places starting with the characters you have typed:

Sicon WAP Expenses Google API 5

    • Once you click on the relevant address, Places will charge once for a places request.  Geocoding and maps will also charge once also.  If you drag or zoom the map, there will be no charge.
  1. Calculate Distance: once you have your start, finish and any waypoints completed, click on calculate distance. The map will add the journey points to the map, this will create directions and will charge for one directions request.Sicon WAP Expenses Google API 5

Pricing & Billing


Pricing Changes as of July 2018

Google states:

“On July 16, 2018, a new pay-as-you-go pricing plan went into effect for Maps, Routes, and Places. This new plan gives you more flexibility and control over how you use our APIs: You can use as much or as little as you need and only pay for what you use each month. We would also like to highlight that we’ve changed the pricing for our Maps, Routes, and Places products. For more information on what’s changing, you can review the API-specific billing changes and the guide to Understanding Billing. You can also estimate your monthly bill with the pricing calculator.

When you enable billing, you get $200 free usage every month for Maps, Routes, or Places. Based on the millions of users using our APIs today, most of them can continue to use Google Maps Platform for free with this credit.”

Source: https://cloud.google.com/maps-platform/pricing


'Pay As You Go' Pricing Plan

Google Maps now offer a ‘Pay As You Go’ option for the Maps API utility.

For those with an account, Google provide a $200 USD credit per month, which will cover up to 40,000 of the above type of clicks or c.10,000 case/appointments per month.

NB: in order to benefit from this credit, you must add payment card details onto your account.  Google will then charge that card if you go over the credit amount.

Click here to access the Guide for understanding Billing for Maps, Routes, and Places
Click here to access the Guide for How the Billing Works

Monitoring Usage

Usage can be monitored to see if the quotas are being exceeded by viewing the dashboard.


Obtaining a Google API Key

A Google account is needed in order to generate an API key – https://accounts.google.com/signup/v2/webcreateaccount?hl=en&flowName=GlifWebSignIn&flowEntry=SignUp

N.B a fee may be chargeable, please follow this link for information on pricing structure and for further information – https://cloud.google.com/maps-platform/pricing/ 


Creating and Configuring Google API key

If your organisation is using Google Business Apps, the administrator will need to enable API access first.  To do this, open the Admin console, click the Security icon (this may be located in the more controls section at the bottom of the screen).  Click on API reference and check the box next to Enable API Access and save changes.  At this point it is possible to enable the required APIs through the developer console, please find Google notes on generating API keys; https://developers.google.com/maps/documentation/javascript/get-api-key#key

Log into the Google API console using the created Google Account, a prompt will appear to create a new Project – enter a suitable project name (i.e. organisation name), the project name can be changed at a later stage if required.  There will be a prompt to enter credentials:

Google API - WAP Expenses - Add credentials to your project

Follow the link to create an API key and enter a description; any description e.g. Organisation Name API can be used.

Once created, the text string of the API key will be shown; take note of this as this key will need to be configured in WAP.

Specific APIs will need to be enabled from the Google API library.

Select the item from the list and enable the API.

  • For Service
    • Distance Matrix API
    • Google Maps JavaScript API
    • Geolocation API
  • For WAP
    • Google Maps Direction API
    • Google Places API Web Service
    • Google Maps JavaScript API
    • Google Maps Geocoding API
    • Google Maps Distance Matrix API