We will be winding down Google Business Messages on July 31, 2024. Read more
here.
Code samples
Stay organized with collections
Save and categorize content based on your preferences.
Get a jump start on development by using one of our samples.
Business Messages
Send and receive messages from users.
Agent |
Description |
Language |
Kitchen Sink |
This agent provides an interactive way to explore Business
Messages's features on your device. |
Java
|
Echo Agent |
When the user sends a message, this agent echos the message back to the
user. Includes the full SDK for the Business Messages API. |
Node.js
Java
Python
|
Appointment Setting Agent |
This agent demonstrates how to support a customer with setting up an
appointment with a business. The chat bot uses a custom Dialogflow
conversational agent to power the conversation. |
Node.js
|
Bonjour Meal Agent |
This agent demonstrates a buy online purchase in store customer user
journey. The user can view shop items, add items to a shopping cart, and
then pay for the items through a web-based checkout experience. See a
screencast of the demo
here.
|
Python
|
gCal Assistant |
This agent demonstrates the integration of OAuth 2.0 on Business
Messages with an identity provider. This sample showcases the integration
with
Google OAuth 2.0.
|
Python
|
Shopping Cart |
This sample showcases how to create a shopping cart experience on
Business Messages.
|
Java
|
Live Agent Transfer |
This sample demonstrates how to hand off conversations
between automation and live agents. |
Node.js
|
Virtual Pet Simulation Game |
This sample demonstrates a virtual pet simulation game built in
Business Messages. See a screencast of the demo
here.
|
Node.js
|
Bootstrap |
This sample demonstrates how to receive and validate messages, and how
to reply to users with rich card, carousel, image, links, suggestion
chips and more.
|
Node.js
|
Business Communications
Manage your Business Messages agents.
Agent |
Description |
Language |
Command Line Sample |
Demonstrates the Business Communications API features. Includes
the full SDK for the Business Communications API. |
Node.js
Java
Python
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-14 UTC."],[[["\u003cp\u003eJumpstart development with pre-built Business Messages samples showcasing features like rich cards, carousels, and suggestion chips.\u003c/p\u003e\n"],["\u003cp\u003eExplore various Business Messages agent samples including an echo agent, appointment setter, and a virtual pet simulation game.\u003c/p\u003e\n"],["\u003cp\u003eLeverage the Business Communications API to manage your Business Messages agents, with command-line samples available in Node.js, Java, and Python.\u003c/p\u003e\n"],["\u003cp\u003eAccess full SDKs for both Business Messages and Business Communications APIs, enabling comprehensive agent development and management.\u003c/p\u003e\n"],["\u003cp\u003eDiscover how to build engaging user experiences with features such as live agent transfer, shopping carts, and OAuth 2.0 integration.\u003c/p\u003e\n"]]],[],null,["# Code samples\n\nGet a jump start on development by using one of our samples.\n\nBusiness Messages\n-----------------\n\nSend and receive messages from users.\n\n| Agent | Description | Language |\n|-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Kitchen Sink | This agent provides an interactive way to explore Business Messages's features on your device. | [Java](https://github.com/google-business-communications/bm-java-kitchen-sink) |\n| Echo Agent | When the user sends a message, this agent echos the message back to the user. Includes the full SDK for the Business Messages API. | [Node.js](https://github.com/google-business-communications/bm-nodejs-echo-bot) [Java](https://github.com/google-business-communications/bm-java-echo-bot) [Python](https://github.com/google-business-communications/bm-python-echo-bot) |\n| Appointment Setting Agent | This agent demonstrates how to support a customer with setting up an appointment with a business. The chat bot uses a custom Dialogflow conversational agent to power the conversation. | [Node.js](https://github.com/google-business-communications/bm-nodejs-appointment-bot) |\n| Bonjour Meal Agent | This agent demonstrates a buy online purchase in store customer user journey. The user can view shop items, add items to a shopping cart, and then pay for the items through a web-based checkout experience. See a screencast of the demo [here](/static/business-communications/business-messages/files/bonjourmeal-screencast.mp4). | [Python](https://github.com/google-business-communications/bm-bonjour-meal-django-starter-code) |\n| gCal Assistant | This agent demonstrates the integration of OAuth 2.0 on Business Messages with an identity provider. This sample showcases the integration with [Google OAuth 2.0](/identity/protocols/oauth2). | [Python](https://github.com/google-business-communications/bm-gCal-bot) |\n| Shopping Cart | This sample showcases how to create a shopping cart experience on Business Messages. | [Java](https://github.com/google-business-communications/bm-shopping-cart) |\n| Live Agent Transfer | This sample demonstrates how to hand off conversations between automation and live agents. | [Node.js](https://github.com/google-business-communications/bm-nodejs-live-agent-transfer) |\n| Virtual Pet Simulation Game | This sample demonstrates a virtual pet simulation game built in Business Messages. See a screencast of the demo [here](/static/business-communications/business-messages/files/virtual-pet-sim-game-screencast.mp4). | [Node.js](https://github.com/google-business-communications/bm-gotchi-litpet-bot) |\n| Bootstrap | This sample demonstrates how to receive and validate messages, and how to reply to users with rich card, carousel, image, links, suggestion chips and more. | [Node.js](https://github.com/google-business-communications/bm-bootstrap-nodejs) |\n\nBusiness Communications\n-----------------------\n\nManage your Business Messages agents.\n\n| Agent | Description | Language |\n|---------------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Command Line Sample | Demonstrates the Business Communications API features. Includes the full SDK for the Business Communications API. | [Node.js](https://github.com/google-business-communications/bc-bm-nodejs-command-line-examples) [Java](https://github.com/google-business-communications/bc-bm-java-command-line-examples) [Python](https://github.com/google-business-communications/bc-bm-python-command-line-examples) |"]]