In today’s digital marketplace, e-commerce brands strive to enhance customer service while managing operational efficiency. In this guide, we introduce Shia — an intelligent chatbot built using Dialogflow CX and Google Cloud, enabling customers to shop, track orders, and get support through natural conversations.
Online retailers often encounter the following issues when trying to scale:
Addressing repetitive customer queries (e.g., order updates, product availability)
Providing round-the-clock support without extensive hiring
Offering tailored shopping experiences to each customer
Maintaining a consistent tone and service across multiple platforms
Shia is a cutting-edge chatbot that creates an interactive, human-like shopping journey. Built on Google Cloud’s flexible and powerful tools, it can manage everything from browsing products to resolving issues seamlessly.
Smart Search – Filter products and get personalized suggestions
Order Updates – Track your purchases in real-time
Account Services – Manage user information and preferences
Issue Handling – Report complaints and escalate problems
Custom Deals – Receive offers and discounts based on behavior
Shia operates on a hub-and-spoke model consisting of:
Dialogflow CX – Core engine for managing dialogues
Cloud Functions / Cloud Run – Backend execution layer
BigQuery – High-performance data storage and analytics
Shia’s chatbot logic is organized into state-based flows such as:
Start Page – Initial greeting and routing
MAIN_MENU – Central control for options
ORDER_STATUS – Retrieves order tracking info
BROWSE_PRODUCTS – Product catalog and filters
COMPLAINT – Logs and escalates user issues
MY_ACCOUNT – Manages user settings
OFFER – Delivers special offers
These serverless functions handle:
Querying BigQuery for relevant information
Connecting to external inventory/order systems
Returning dynamic replies to users
Example: Order Lookup Webhook
pythonCopyEdit
def get_order_details(request_json): order_id = request_json["sessionInfo"]["parameters"]["order_id"] # BigQuery logic and response formatting here
Stores essential datasets like:
Product details
Customer orders
User accounts
Chat logs
Performance metrics
Users receive unique offers by picking a number:
pythonCopyEdit
def generate_offer(request_json): offers = { 1: "10% OFF with code TRR10", 2: "Free shipping on $50+ with code FREESHIP50", # more options... } return offers[user_number]
Shia tracks and improves based on:
Goal completion rate: >85%
Intent accuracy: >90%
Fallback response rate: <15%
Avg. interaction length: <8 turns
User satisfaction: >4.2/5
Sample SQL Query for Fallback Rate
sqlCopyEdit
SELECT DATE(timestamp) AS date, COUNT(CASE WHEN intent = 'Default Fallback Intent' THEN 1 END) / COUNT(*) * 100 AS fallback_rate FROM ecommerce_data.conversations GROUP BY date ORDER BY date DESC LIMIT 14;
Start Your GCP Project
bashCopyEdit
gcloud projects create your-project-id gcloud services enable dialogflow.googleapis.com cloudfunctions.googleapis.com bigquery.googleapis.com
Create BigQuery tables for your catalog, orders, users, and interactions
Deploy webhook code with Cloud Functions:
bashCopyEdit
gcloud functions deploy orderStatus --runtime python39 --trigger-http
Set up Dialogflow CX
Define conversation flows
Configure intents and entities
Integrate webhooks
Connect to frontend interfaces (website/app/chat)
This modular system supports easy upgrades, such as:
Support for multiple languages
Voice assistant capabilities
Smarter product recommendations
Built-in payment functionality
Real-time sentiment detection
Creating an AI-powered e-commerce chatbot like Shia using Dialogflow CX and Google Cloud helps retailers deliver a seamless, efficient, and engaging customer experience. With minimal infrastructure management and high scalability, it’s an ideal solution for both growing startups and large enterprises.
As conversational AI continues to evolve, smart assistants like Shia will become a key driver of online retail success.