Adding the Google Business Messaging Channel¶
Warning
Google announced the discontinuation of the Google Business Messages channel from July 31st. This channel will be phased out in the coming weeks. If you have alternative chat channels, consider inviting your customers to continue conversations there. For more details, please refer to the Google announcement.
Modern business applications require agent integrations on web/mobile devices to enable seamless customer communication via SMS/chats.
The Kore.ai XO Platform now helps a Google Business Messaging Partner to create rich and asynchronous messaging experiences within apps and during calls through the GBM channel enablement. This feature helps seamlessly integrate real-time business agents to Virtual Assistants.
Google Business Messaging (GBM) is a mobile conversational channel that combines digital customer touchpoints or entry points on Google Maps, Search, and brand websites.
How does it work?¶
When Google Business Messaging is configured as a Channel on the XO Platform, the conversations between the customers and brands is enabled by creating agents. You can manage agents with either your own account or a GBM Partner Account. The process to create an agent differs in each scenario.
-
If you have a GBM Partner Account, the XO Platform registers each Business as a partner. You can enable conversations for brands you manage by creating Business Messages agents directly on GBM Developer Console.
-
If you have your own account, you can enable conversations for brands you manage by creating Business Messages agents using Business Communications APIs.
Important Information on Agents and GBM’s Messaging Infrastructure
-
An Agent is a conversational entity that users interact with.
-
You must create one agent for each brand you manage.
-
You can create and manage agents with the Business Communications API.
-
You can control messaging for your agents with the Business Messages API.
An agent encompasses a brand’s business functions, such as online support, and physical locations (if any).
-
Each message contains the context from which the user initiated the conversation.
-
Your message routing infrastructure can detect if the user viewed a specific business location or looked for general support, and it can route messages to the correct destination.
Customers can send messages to your brand or its locations through these agents.
With Business Messages, you can place messaging buttons for brands managed by Kore AI within organic Google search results.
The Messaging Flow
- When a customer clicks the button, a conversation is initiated with the brand’s virtual agent on the device.
- Google delivers the message defined as a JSON payload to the Webhook that Kore.ai provides.
- The agent uses this Webhook and the Conversational Agent API to receive and respond to the customer’s messages.
Set up on the GBM Channel¶
The important steps to set up the GBM channel are summarized below:
- Creating a Google Cloud Platform (GCP) project.
- Submitting the partner information to Google.
- Enabling the Conversational Agent API.
Prerequisites
- An active Google account.
- The Partner Name field appears in the Google My Business (GMB) Console for locations associated with the agents you manage.
- A webhook endpoint URL that can accept messages (Kore.ai generates the webhook URL, which will be associated with a virtual assistant built on the platform).
Create a Google Cloud Platform Project
You must create and register a Google Cloud Platform (GCP) project to enable the Google Cloud API service for your partner account. Learn more.
Tip
Please note the project number to register as a partner.
GBM Channel Enablement on the Platform¶
To set up the GBM channel on the Kore.ai XO Platform and launch the agent, follow the steps below:
- Register as a Google Business Messaging Partner.
- Create an agent for your account.
- Set up the Webhook for the agent.
- Create a Service Account Key.
- Configure the Virtual Assistant for the service account.
Step1: Register as a GBM Partner¶
To integrate with the GBM channel, you need to register as a partner for Google Business Messaging with the steps below:
- Open the Business Communications Developer Console.
-
Enter the values for the following fields in the Create a Business Messages partner account window:
- Your Name: Your full name.
- Partner Name: Your organization’s name.
- Partner Website: Your organization’s website.
- Region: The region you want to host the Business Messages service.
Note
To launch a production agent with Business Messages, please register with a corporate email, not a personal email.
-
Review and Accept the Business Messages Terms of Service.
You are now registered as a Business Messages partner and have access to the Business Messages and Business Communications APIs. The Business Messages API sends messages to users, while the Business Communications API manages agents.
Step 2: Create an Agent for your Account¶
After you register as a partner, you can enable conversations for brands you manage by creating Business Messages agents for them.
When creating an agent, you can enable the Business Messages Helper Bot that lets you quickly start a conversation with your agent by leveraging the available features and resources. This is especially useful when creating your first agent.
Also, to create an agent for your GBM Partner account, you must submit information on the brand and the agent on the Business Communications Developer Console.
Note
To manage multiple brands, you must create an agent for each brand.
Expectations Before Creating Agents
- Agents should follow the design guidance outlined in Conversation design for Business Messages.
- Agents should have human representatives available to answer questions when automation is unable to fulfill a request or when requested by users.
- Without human representatives, your agent can’t be launched from location-based entry points or non-local entry points. Specify a human interaction type for your agent, so it can surface on Google-managed entry points.
- Agents should maintain a customer satisfaction rating (CSAT) of at least 80% and a merchant response rate (MRR) of at least 95% as outlined in Metrics.
Prerequisites
- If you registered for a partner account before March 7, 2022, you need to enable the Business Messages API before creating your first agent. See Enable the Business Communications API and Business Messages API.
- Please ensure you have the following values for each brand you manage before you create an agent:
- Brand name
- Agent name to appear in conversations with users.
Steps to Create an Agent
Once you’ve gathered the above information, to create an agent follow the steps below:
Note
If you manage multiple brands, repeat the steps to create an agent for each brand.
-
Sign in to your account on the Business Communications Developer Console.
-
Enter the values for the Brand name and Agent name fields.
-
Do one of the following:
- To experience a conversation with your agent by leveraging the rich features of the GBM Platform, select Enable Business Messages Helper Bot. The Helper Bot allows you to Explore rich features, learn how to implement features, and find resources for agent setup. When the Helper Bot is enabled, it sends and receives messages for your agent, and No Webhook is required.
- To customize your agent and prepare it for message handling, deselect Enable the Business Messages Helper Bot.
- Click Create Agent.
If you enabled the Business Messages Helper Bot, you can start a conversation with your agent immediately. Otherwise, proceed to set your Webhook (Step 3).
Note
Once your agent is available, you can add the business and branding information.
Step 3: If Business Helper Bot is Disabled, Set an Agent-level Webhook¶
To customize your agent and how it handles messaging, you must set an agent Webhook on the Google Business Messages platform. You will receive messages sent to your agent at this Webhook. For setting up the Webhook, you must copy the Webhook URL from the XO platform and generate the Client Token for the agent to integrate for messaging and events.
- Open the Business Communications Developer Console and sign in with your Business Messages Google account.
- Click on the panel with your agent’s name.
- On the Business Communications page, click Integrations on the left menu.
-
Copy the Webhook URL from the Kore.ai XO Platform under Channels & Flows > Channels > Digital > All > Google Business Messaging > Configurations.
-
Paste the copied link for the Webhook endpoint URL field in the Configure your webhook window on the Business Communications Developer Console.
-
Click the Refresh icon for the Client token field to generate the Client token.
The GBM platform sends a POST request to the Kore.ai XO Platform’s webhook with the ClientToken and Secret Key parameters for verification before sending/receiving messages.
Step 4: Create a Service Account Key¶
To send messages and events as your agent, you need to authenticate API calls with a service account key. The Business Communications Developer Console creates a service account for you, but you need to create a unique key to access your agent with the steps below:
-
Click Create on the confirmation window to download the JSON file with the service account key.
-
Rename the downloaded file to rbm-agent-service-account-credentials.json.
-
Store the key securely to recover it if required.
Step 5: Configure the Virtual Assistant for the Service Account¶
To configure the virtual assistant for the service account on the Kore.ai XO Platform, follow the steps below:
Tip
For the private key, please copy only the key value within the BEGIN PRIVATE KEY and END PRIVATE KEY header tags. The XO Platform adds these tags by default.
-
Copy the client_email, client_id, client_token (alphanumeric value), and private_key values from the downloaded JSON file.
-
Paste the values in the respective fields under Channels & Flows > Channels > Digital > All > Google Business Messaging > Configurations.
-
Select Yes for the Enable Channel option.
-
Click Save
After enabling the channel and verifying all the configurations, you can optionally publish the assistant for the new channel. Learn more about Publishing your Virtual Assistant.
To learn more about working with Channels within the Kore.ai XO Platform, please see Channel Enablement.