ChatGPT Bot

  How to create an AI bot using ChatGPT

Step 1. Go to "Hello", under the Manage option, click on Bots and click on the 'Create Bot' button. 

Kb169639815700937169

Step 2. Choose the Bot type as ChatGPT. Create a Bot by giving a Name, Fallback Response, and Description. Click on Save.

Kb1696400488658205bo

Step 3. There are 2 options Bot Details and Configure Bot. For filling the details manually choose Bot Details and for conversational bot creation click on configure Bot. 

Kb1697794131505015bo

Step 4.  Bot Details: 

  • Fill out the Industry Type, About company in detail.

  • Knowledgebase data source where you can put the URLs of your company help articles. 

  • API Calls, add the API. 

  • Write Welcome Message. 

  • Prompt + General Prompt, this is to provide instruction to the Bot. 

  • For Testing the Bot, you can click on Review Bot. 

OR

Step 5. Configure BOT: 

In configure bot, the bot will ask you the details about your company, features, specific queries etc. Answer the bot and it will configure your BOT based on the responses. 

Kb1698313097255163co

What does this feature do?
When someone chats on your website widget, their details (like name, email, mobile, or customer ID) are automatically passed securely in the background.

👉 The AI never sees these details directly.

👉 But when the chatbot needs to perform an action (like sending a message to Slack, creating a ticket, or updating CRM), these details are auto-filled at the last step to complete the task correctly.

This makes the chatbot smarter, faster, and more secure — without exposing private customer data.

🔄 How it Works (Simple Flow)

  1. Widget Loads – The Hello Chat Widget is added to your site with your customer variables (like user_id, email, etc.).

  2. User Chats – The customer types a query.

  3. AI Decides Action – The bot prepares an action (like “send order details to CRM”) with placeholders.

  4. System Fills Real Data – The system automatically replaces placeholders with the actual customer info.

  5. Action Done – CRM/Slack/Ticket system receives the correct data, and the response is shown to the user.

🖥 How to Add Variables in Your Widget

<script type="text/javascript" src="https://ctest.msg91.com/chat-widget.js"></script> 
<script type="text/javascript"> 
  var helloConfig = { 
    widgetToken: "ccb0ddf",   
     variables: {     
           user_id: "1234", 
           jwt_token: "dGZO...",
           mobile: "918987654310",    
           name: "codebro",     
           email: "[email protected]"  
           }
     };   
initChatWidget(helloConfig, 5000); 
</script>
  • variables: These are user details you want to pass to the bot.

  • AI cannot read these directly – it only uses them when an action is triggered.

🔒 Privacy & Security

  • Customer info is never shared with AI.

  • Details are only inserted when sending data to a tool (CRM, Slack, Ticketing, etc.).

  • Everything happens server-side – fully secure.

🧩 Placeholder Example
Let’s say you stored user’s first name like this:

name: { "first_name": "Nauman", "last_name": "Khan" }

When you want to use this in a tool, you call:

{{name.first_name}}

👉 Example:
 If the bot sends a Slack message → it will display:
 “Nauman has raised a support ticket.”

📌 Example Tool Call: Send to Slack

  1. User: “I need help with my order.”

  2. Bot: Prepares Slack tool call → {{name.first_name}} needs support for Order ID {{user_id}}.

  3. System replaces placeholders → Nauman needs support for Order ID 1234.

  4. Slack gets the final message.

📊 Tool Requirements

  • Each tool (Slack, CRM, WhatsApp, etc.) may need specific variables.

  • Example: user_id, jwt_token, email.

  • If missing, default values can be set in the widget.

🧪 Testing Checklist

  • Check if variables are added in widget config.

  • Ensure placeholders like {{name.first_name}} are resolving properly.

  • Validate required fields (like email, ID).

  • Test for error cases (e.g., missing variable).

🎯 Use Cases of This Feature
Here’s how businesses can benefit:

  1. E-commerce

    • Chatbot shares order details instantly with support agents.

    • Sends order confirmation or tracking updates directly using stored customer ID.

  2. Customer Support

    • Escalates issue to Slack or Ticketing tool with customer’s name & email auto-filled.

    • No need to ask the customer to repeat details.

  3. Sales Teams

    • Bot pushes lead info (name, email, phone) directly into CRM.

    • Makes follow-up faster with complete customer context.

  4. Banking & Finance

    • Securely validates account ID / transaction ID before processing requests.

    • Keeps sensitive details private from AI.

  5. Healthcare

    • Patient chats → Bot securely sends patient ID & appointment details to hospital system.

Why This Matters

  • Customers love it → no repeated questions, smoother experience.

  • Your team saves time → details automatically flow into the right system.

  • Your data stays safe → AI doesn’t see sensitive info.

📌 Next Step: Add your widget with variables → Build AI Chatbot → Start automating secure, personalized conversations.

Variable Support in AI Chatbot (Hello Widget)
variable support in Chatbots
Sep 2, 2025