How to integrate Google Places API Find Place into a decision engine

Published on: 2024-08-10 18:48:28

Among many address validation and profiling tools, Google Places API stands out because of its quality of primary service – Google Maps. With the service, you can quickly evaluate whether the address provided exists and if it does, what is on the address.

1.

Get an API key Credential from Google Cloud Console

  • Google Places API is part of Google Maps Platform and as an API is part of Google Cloud solution. All of that means that it takes several more steps than other services, to obtain an API key. Good starting point is here

    https://developers.google.com/maps/documentation/places/web-service/cloud-setup
  • Once you get your Google Cloud account created head to your project’s Google Maps Platform Credentials page to get your API credential.
    Find button Create Credentials and hit API key from the drop-down menu that shows up. It will then take a few seconds and your new API key will get created.
    Google Places API Find Place Dashboard
    Once your API key gets created, it will show up in the list. Copy the API Key and have it ready for definition within Decisimo Portal.
    Google Places API Find Place Dashboard
2.

Create a data source in Decisimo Portal

  • Go into Data sources and hit new and create from template.
    FraudLabs Pro Dashboard
    Create Google Places API Find Place from template
  • Place the API Key you have from Google Cloud Console Credentials instead of the __YOUR_API_KEY__ in the Parameters part - the highlighted text in the screenshot below.
    Definition of Google Places API Find Place data source
  • Google Places API Find Place has the main parameter input. We have defined the template in such a way to be able to pass parts of the address separately and then be connected within the input parameter.
  • When you use the Google Places API Find Place data source template, it will include the definition necessary for it to work based on this guide.
3.

Add Google Places API Find Place data source to your decision flow

  • If you already have a decision step for data sources, you can add the call to Google Places API Find Place within the same step. The decision engine will call all the sources in the same step in parallel. Parallel calls ensure the fastest execution time. If you do not have a decision flow step for external data, add one.
  • Connect your decision flow step and by double-clicking, open the definition window. Define in the step the attribute with address-related attributes (street, city, zip, country) from your data object to be sent to Google Places API Find Place.
  • Google Places API Find Place within a decision step
GO

Run the decision making

  • Release your decision flow, deploy to an endpoint and make decisions using data from Google Places API Find Place.