{% extends 'superuser/base_superuser.html' %} {% block title %} {% if object %}Edit Chatbot Profile | {{ object.name }}{% else %}New Chatbot Profile{% endif %} | ChatLab {% endblock %} {% block workspace %}
{% csrf_token %}
{% if object and object.icon %} Company icon {% else %} {% if object %}{{ object.chatbot_name|slice:":1"|upper }}{% else %}A{% endif %} {% endif %}
Upload a company logo — shown beside the chatbot identity in the header.
{% if object and object.chatbot_icon %} Chatbot button icon {% else %} {% if object %}{{ object.chatbot_name|slice:":1"|upper }}{% else %}A{% endif %} {% endif %}
Upload an icon used for the floating chat button (square is fine). If not provided, the company icon will be used.
This message appears when a visitor opens the chat widget.
The system will scrape product information from this sitemap for the AI to use.
Domain only — without https:// or http://. Example: mystore.com or www.mystore.com. If you enter https://mystore.com, the system will auto-remove the protocol. Leave blank for testing.
Use with caution — this will create an escalation row for every visitor message.
When enabled, visitors will see the ChatLab branding. Defaults to enabled.
Maximum number of total media images the company can upload (0 for unlimited).
Expiration date for client's social integrations (Facebook & WhatsApp). If set and expired, their AI/service replies will stop working.
Maximum number of bot replies allowed for this client (0 for unlimited). Once reached, bot responses will be blocked.
Select from the predefined LLM models (Google Gemini or OpenAI).
Stored securely. Key is required to call endpoints.
{% for t in global_topics %} {% empty %} No global topics defined. Create one below or in the Topic Scope Manager. {% endfor %}

E-commerce API Integration

Connect this chatbot to an external e-commerce system.

Base URL where the e-commerce system is hosted.
This key must be added to the connected e-commerce site.
{% if object %}
{% endif %}

Social Media Integrations

Connect this chatbot directly to Facebook Messenger and WhatsApp Cloud API platforms.

Facebook Messenger

✨ Messenger Behavior Settings
{% if object %}
Diagnostics & Connection Test
{% endif %}

WhatsApp Business

{% if object %}
Diagnostics & Connection Test
{% endif %}

Webhook Setup Guide

{% if site_settings and site_settings.fb_app_verify_token %}
Verify Token:
{{ site_settings.fb_app_verify_token }} Use this Verify Token when configuring webhooks in your Facebook App.
Facebook Webhook Callback URL:
WhatsApp Webhook Callback URL:
SaaS Webhook Integration Steps:
  1. Log in to your Meta Developer Portal and access your application.
  2. Configure the Messenger Webhooks and WhatsApp Webhooks with the Callback URL and Verify Token shown above, then click verify.
  3. Subscribe to the messages webhook event fields.
  4. To connect a page or WhatsApp account, fill in the Facebook Page ID and Page Access Token above. For WhatsApp, fill in the Phone Number ID and Permanent Access Token, then check the Enabled box.
{% else %}
⚠️ Webhook settings are not fully configured yet. Please configure the Global Verify Token in the Global Site Settings dashboard first.
{% endif %}
{% if show_admin_fields %}

Company Admin Login Credentials

Create login credentials so the company can access their dashboard at /login/ and manage agents, FAQs, and widget settings.

{% if company_admins %}
{% for admin in company_admins %}
{{ admin.username }}{% if admin.email %} ({{ admin.email }}){% endif %}
{% endfor %}
{% endif %}
{% endif %}
Cancel
{% endblock %}