Google Business Messaging
Business Messages is a mobile conversational channel that combines entry points on Google Maps, Search, and brand websites to create rich, asynchronous messaging experiences that delight customers and drive business results.
Logicdialog allows you to connect your digital assistant to this platform so that as soon as someone searches for your business, they can chat directly to the bot and get the answers they need. This page will help guide you through the integration of the two platforms.

Overview
To setup Google Business Messaging (GBM) there are a few steps that you'll need to follow, which are outlined below :
More detail on each of these steps are given below.
Register as a GBM Partner
In order to use GBM, you first need to register as a partner. By registering as a partner you can create agents for brands and enable messaging experiences for customer services, sales, and other business applications. The registration is a simple process, as follows :
Under Business Messages, click Create partner account.
You will then be prompted to complete a few bits of information about your Partner account. Following that, click Create to create the account.
Create a Service Account
Once registered as a partner, you'll need to create a Service Account. This service account is used to securely authenticate API calls to the Business Messages and Business Communications APIs.
On the Business Communications Partner Console home page, click Partner account settings.
In the left navigation, click Service account.
Click Create key, then click Create.
Following these steps will prompt your browser to download the service account key. Store your service account key in a secure, private location. As you need its content for the next steps.
Create an Agent
Now that you are registered as a partner and have a service account, we can proceed to create an Agent. An agent is the interface between your customers and you. It'll have a brand, including a name and an avatar, and various other settings.
Creating an agent is straight forward and can be done from the partner console.

Click on the Create Agent
link here and follow the resulting dialog windows to create the agent. You can always adjust settings at a later date if needed.
On the Overview screen, please make sure you copy down the Agent ID as you'll need this for steps in the process later on.

Also, on the Agent Information page (visible in the left menu), please ensure that the Welcome Message
is set appropriately, and that the Primary Interaction
is set to Bot
.

Finally, ensure that you have added some Locations to your Agent via the menu on the left hand side. These locations are how Google will map a search result to your bot and so it's important you add Locations that you are responsible for, and where you want the bot to reside.

Configure a webhook
When messages arrive into GBM from your users, these need to be forwarded on to the Logicdialog platform so that we can handle them. This is done through a mechanism called a Webhook
. This is essentially an address that will be sent data.
Before configuring this, you'll need to set some credentials on channel settings within Logicdialog. To do this, visit the LogicDialog Channels page (it's part of Settings page) and click Connect on the Google Business Messaging option :

A new window will open with the settings that you need to change in order to configure GBM.

The Agent ID was copied in the steps above when you created an agent, and Service Account is downloaded to your computer so you just need to copy its content and paste there.
To set Client Token you need to go to the Integrations section on the Agent page from Business Communications Partner Console.

Firstly disable Helper Bot, afterwards click Configure on the Webhook section. It should show a small window like the one below:

As you can see the client token is hidden so click the rotate arrow and a new token will be shown. Afterwards copy its value and go to LogicDialog to paste it at the field of Client Token on the GBM Configuration, then click submit.
Now to verify the webhook, go to the open window of Webhook integration from Business Communications Partner Console and for webhook endpoint put the URL that was shown at GBM Configuration with this format (e.g. if the client is webuildbots-customer-service):
https://backend.logicdialog.ai/input/gbm/callback/webuildbots-customer-service
Afterwards, click Verify.
When Business Messages verifies your webhook, the dialogue closes.
Test and verify your agent
With everything now setup, you can test your solution works as expected. To do this you'll need to send yourself unique URLs that allow you to talk to your bot before it has been verified and published. These URLs are at Agent Test URLs which you'll find at the Agent Information on the Overview page of the agent you wish to test - Android
, iOS
and Send
.

The first two of these will show a QR code you can scan with your mobile's camera to take you to the bot. The Send
button will email you links, which again will take you directly to the application.
Once you have confirmed that the bot is working as you'd expect, you'll need to verify the application. This can be done using the Verify menu in the left hand menu.

You will need to verify the locations you've added to your agent as well as the general configuration. Once verified you'll then be able to go through the Launch process which is again available from the left hand menu.
Last updated