CuboidPilot Documentation & Onboarding Manual v2.4
Pricing
v2.4 Production Reference • Updated Oct 2026

Getting Started with CuboidPilot & Cai AI Agent

A step-by-step master reference for deploying Cai—your autonomous, semantically grounded AI customer service agent across Web Chat, WhatsApp Cloud API, custom knowledge bases, and live human counselor handoffs.

Overview • Core Concept

5-Minute Quickstart

CuboidPilot provides a modern alternative to traditional, static chatbots. Instead of rigid decision trees that frustrate visitors, CuboidPilot employs Cai—an autonomous, semantically grounded AI Agent that acts as your 24/7 first-line support specialist and top inbound SDR.

01
Upload Documents
Provide PDF manuals, pricing sheets, and website FAQs. Cai indexes and vectorizes knowledge in seconds.
Zero Hallucinations
02
Paste 1-Line Tag
Embed our async script snippet into your HTML, WordPress, Shopify, or Webflow. Zero impact on Core Web Vitals.
< 12KB Gzip Size
03
Close on WhatsApp
When visitors leave desktop, seamless continuity allows counselors to continue conversations on WhatsApp.
Persistent Sessions
Key Principle: Strict Grounding
Cai will never hallucinate or make up discounts or contractual claims. If an answer cannot be verified within your approved documentation, Cai gracefully captures the prospect's details and initiates a warm handoff to your human counselors.
Enterprise • Infrastructure

Architecture & Security

CuboidPilot runs on an enterprise-grade multi-tenant architecture designed for low-latency customer interactions and strict data segregation:

Component Technology / Engine Security & SLA
AI Runtime (Cai) Semantic Vector Embeddings + RAG < 0.8s Mean Latency • Sandbox Isolated
Website Widget Lightweight Vanilla JS (< 12KB gzip) Async Execution • Zero CWV Impact
WhatsApp Engine Meta WhatsApp Cloud API v19.0 End-to-End Encryption • HMAC Signatures
Closing Radar Real-time Intent Scoring Pipeline Instant WebSocket Push Alerts
Step 01 • Onboarding Wizard

Step 1: Setting Up Your Business Profile

The onboarding begins at onboarding/business.html. Here you configure your organization's legal name, primary website URL, industry sector, and time zone.

Configuration Parameters
Business Name Required

Appears in Cai's initial greeting, official chat headers, and automated consultation invitations.

Website URL Required

Domain whitelisted for CORS requests and secure widget script communication.

Industry Sector Semantic Tone

Selects pre-tuned semantic prompts (SaaS, Higher Ed, Clinics, Real Estate, E-Commerce, etc.).

Operating Timezone Routing Rules

Calibrates human counselor business hours vs. 24/7 autonomous AI coverage.

Industry Prompt Tuning
Selecting the correct industry automatically configures Cai's default conversational tone. For example, selecting Healthcare & Clinics enables respectful, HIPAA-compliant patient intake prompts, while SaaS & B2B prioritizes technical validation and enterprise SDR qualification.
Step 02 • Onboarding Wizard

Step 2: Defining Strategic Goals & Workflow

At onboarding/goals.html, you establish the primary mission for CuboidPilot. Your choice dictates how aggressively Cai engages visitors and when it initiates lead capture forms:

Support Focus

Support & Deflection

Prioritizes answering repetitive Tier-1 questions strictly from docs. Intervenes with human counselors only when visitors explicitly ask for human assistance.

Sales Pipeline

Inbound Sales & SDR

Discovers prospect team size, budget, timeline, and booking intent during natural conversation before automatically qualifying and routing to sales.

Retention

WhatsApp Continuity

Converts desktop drop-offs into persistent WhatsApp threads, allowing counselors to follow up without spamming emails or losing past chat context.

Recommended

Hybrid Autonomous Desk

Combines 24/7 instant FAQ resolution with intelligent commercial opportunity detection, Closing Radar alerts, and seamless human counselor takeover.

Step 03 • Onboarding Wizard

Step 3: Cai Knowledge & Document Grounding

Located at onboarding/ai.html, this is the cognitive core of your AI Agent. Cai's answers are 100% grounded in the verified data sources you supply here.

.pdf • .docx

PDF & Manuals

Upload product catalogues, technical manuals, SLA policies, and terms of service. Parsed and chunked in seconds.

Deep Vector Embeddings
Live Crawl

URL & Sitemaps

Provide your website or help center URL (e.g., https://acme.com/help) to crawl and index public pages automatically.

Recursive Spidering
Exact Match

Curated Q&A Pairs

Explicit question-and-answer pairs for sensitive policies (refunds, enterprise discounts, SLA commitments) requiring word-for-word precision.

Zero Variance
Grounding Best Practices
Ensure your pricing sheets contain clear currency designations (e.g. USD $ or INR ₹) and seat tiers. If pricing is customized per client, explicitly state: "Custom enterprise pricing requires speaking with sales" so Cai smoothly directs prospects to your contact form.
Grounding Strictness Threshold Cosine Similarity Score

Configure Cai's confidence boundary in settings:

Strict Mode (0.85+ Score)

Cai only answers if the inquiry is directly cited in the uploaded documents. Recommended for healthcare, compliance, and legal services.

Balanced Mode (0.75+ Score)

Synthesizes contextual answers across multiple related paragraphs. Recommended for B2B SaaS, sales discovery, and general marketing.

Step 04 • Onboarding Wizard

Step 4: Website Widget Integration

Onboarding screen onboarding/website.html generates your unique embed snippet. Copy and paste this single script snippet into your website before the closing </body> tag:

index.html • Universal Script Embed
<!-- CuboidPilot Cai AI Agent Widget -->
<script 
  src="https://cai.cuboidsoft.in/widget.js?v=7.1" 
  data-company="cp_live_cuboidsoft" 
  data-color="#111111" 
  data-position="right"
  async>
</script>
WordPress

Paste into Theme Settings → Custom Code → Footer or via the free WPCode plugin.

Shopify

Go to Online Store → Themes → Edit Code → theme.liquid and paste immediately before </body>.

Webflow

Go to Project Settings → Custom Code → Footer Code, paste the snippet, and publish your site.

Once embedded, the onboarding wizard pings your website in real time. As soon as a handshake is recorded, the status indicator activates with a green live badge.
Step 05 • Onboarding Wizard

Step 5: WhatsApp Cloud API & Mobile Continuity

At onboarding/whatsapp.html, you connect your official WhatsApp Business Account. This powers 1-Tap WhatsApp Continuity.

Meta WhatsApp API Configuration Fields
Phone Number ID

Retrieved from Meta for Developers → WhatsApp → API Setup. Identifies your specific outbound phone number.

WhatsApp Business Account ID (WABA ID)

Your official business profile container inside Meta Business Manager.

Permanent System User Token

Bearer token generated under Business Settings → System Users with whatsapp_business_messaging permissions.

Notification & Triage Rules

CuboidPilot protects your counselors from notification fatigue with configurable alerts:

Qualified Leads Only

Alerts counselors only when budget and use case requirements are confirmed.

Explicit Human Request

Instantly alerts on-duty counselors when a visitor asks to speak with a human.

Pricing Drop-Off

Sends a warm follow-up prompt if a visitor lingers on pricing without checking out.

Step 06 • Onboarding Wizard

Step 6: Simulator Verification & Going Live

The final onboarding step at onboarding/ready.html runs an automated system health check before opening your live desk:

System Pre-Flight Health Checklist
Business Profile & Operating Hours
Configured
Knowledge Base Vectorized & Grounded
0 Hallucinations
Website Widget Active & Pinged
Handshake 200 OK
WhatsApp Webhook Handshake Verified
Active Listener
All checks green? Launch your operations desk
Clicking below enters your live command center with real-time conversations.
Enter Live Console
Platform Operations • Knowledge Base

Managing Knowledge Documents & Ongoing Grounding

As your business evolves, keep Cai up to date through app/knowledge.html:

Instant Document Refresh

Upload new PDF policies or add promotional pricing sheets. Indexing and vectorization complete in under 30 seconds.

Crawl On Demand

Click Re-crawl URLs to fetch fresh documentation from your blog, changelog, or help documentation root.

Unresolved Gaps Radar

Audits customer inquiries where Cai's confidence was below threshold, allowing you to add Q&A pairs with 1 click.

Platform Operations • Human Takeover

Real-Time Live Chat Takeover

Inside app/conversations.html, counselors monitor active visitor sessions across Web and WhatsApp in real time:

1. Autonomous Mode AI Active

While Cai responds, incoming and outgoing messages stream with subtle green AI badges.

2. 1-Click Takeover Instant Handoff

Pressing Take Over immediately pauses AI for that thread and notifies the customer that a counselor has joined.

3. Copilot Suggestions Smart Drafts

When typing as a counselor, Cai generates recommended reply drafts grounded in your verified knowledge base.

Platform Operations • Lead Scoring

Closing Radar & Commercial Intent Scoring

The app/closing-radar.html module automatically categorizes active visitors into 3 commercial intent tiers:

Cold (Tier 3) FAQ Browsing

General browsing, basic FAQ queries. Cai answers autonomously with zero human intervention required.

Warm (Tier 2) Evaluating

Comparing plans, inquiring about integrations, or visited pricing page > 2 times in the session.

Qualified (Tier 1) High Intent

Explicit team size provided, enterprise SLA requested, or calendar demo booking initiated.

Developer Reference • Client SDK

Client JavaScript SDK Reference

The CuboidPilot widget exposes a lightweight global JavaScript API on window.Cai for programmatically triggering chats, passing user attributes, or binding to custom buttons on your site:

JavaScript • window.Cai API
// 1. Open the Cai chat widget window
window.Cai && window.Cai.open();

// 2. Close the Cai chat widget window
window.Cai && window.Cai.close();

// 3. Pass authenticated user context from your app session
window.Cai && window.Cai.identify({
  userId: "user_98124",
  name: "Arjun Mehta",
  email: "arjun@example.com",
  plan: "Enterprise",
  company: "Nexora Systems"
});

// 4. Trigger a contextual prompt or question automatically
window.Cai && window.Cai.prompt("Tell me about the Enterprise SLA options");
Connected Ecosystem • 11 Channels • Zero Coding

Channels & Integrations — Setup Manual

CuboidPilot features a centralized Multi-Channel Hub at app/channels.html. Connect your official WhatsApp, Instagram DMs, Google Calendar, Email (SMTP), Google Sheets, and CRMs. Whether you are a business owner or non-technical manager, each channel is live in under 5 minutes.

WhatsApp

1. WhatsApp Business (Official Meta Cloud API)

2-Way Autonomous AI Chat, Inbound Lead Capture & Outbound Broadcasts
Time: ~5 mins • Zero Coding
What you need before starting:
1
Create Meta Developer App: Go to Meta Developer Apps → Click Create App → Select Other → Select App Type as Business.
2
Add WhatsApp Product: On the Add Products page, locate WhatsApp and click Set up. Meta will create a WhatsApp test sandbox and show your credentials.
3
Copy 3 Keys from Meta: Under WhatsApp → API Setup, copy:
  • Phone Number ID (e.g., 108294829104812)
  • WhatsApp Business Account ID (WABA ID) (e.g., 102938192830192)
  • Temporary / Permanent Access Token (starts with EAA...)
4
Configure Webhook in Meta: Go to WhatsApp → Configuration → Webhook, click Edit and enter:
Callback URL:
https://cai.cuboidsoft.in/api/webhooks/whatsapp.php
Verify Token:
cuboid_whatsapp_verify
Click Verify and save, then click Manage Webhook fields and check messages and message_template_status_update.
5
Paste in CuboidPilot: In your dashboard at app/channels.html, click on the WhatsApp card → Paste your Phone Number ID, WABA ID, and Token → Click Save & Connect. Your AI Assistant is now live on WhatsApp!
Instagram

2. Instagram Direct Messages (Meta Graph API)

Auto-Reply to Story Replies, Reels Comments & Inbound DMs with Lead Sync
Time: ~3 mins • High Converting
Non-Tech Prerequisite (Very Important):

Your Instagram account must be a Professional / Business / Creator account (Free in Instagram mobile app under Settings > Account Type). It must be linked to an official Facebook Page.

1
Allow Connected Tools in Instagram App: On your mobile Instagram app → Settings → Messages & Story Replies → Message Controls → Toggle ON "Allow Access to Messages".
2
Add Instagram to Meta App: In your Meta Developer App, click Add Product → Instagram Graph API → Click Set up.
3
Configure Webhook in Meta (Step 3 in Meta Portal):
Callback URL:
https://cai.cuboidsoft.in/api/instagram_webhook.php
Verify Token:
cuboid_ig_verify
Click "Verify and save" (it will verify with a green checkmark). Under Subscribed Fields, subscribe to messages and messaging_postbacks.
4
Connect in CuboidPilot: In app/channels.html, click Instagram → Enter your Instagram Username, Connected Facebook Page ID, and Access Token → Click Save & Activate.
Google Calendar

3. Google Calendar & Google Meet

2-Way Conflict Checking & Automated Video Demo Meeting Scheduling
Time: ~4 mins • OAuth 2.0
1
Enable Google Calendar API

Open Google Cloud Console → create a new project (e.g. Cai Calendar Integration) or select an existing one → navigate to APIs & Services > Library → search for Google Calendar API → click Enable.

2
Configure OAuth Consent Screen

In the sidebar, go to APIs & Services > OAuth consent screen:

  • Select User Type: External → click Create.
  • App Name: Cai AI Assistant (or your company brand).
  • User support & Developer email: Enter your business Google account email.
  • Scopes: Click Add or Remove Scopes → select .../auth/calendar.events (Manage events).
  • Test Users: Add your Google email address → Save and Continue.
3
Create OAuth 2.0 Client ID (Web Application)

Go to APIs & Services > Credentials → click + Create Credentials > OAuth client ID → select Application type: Web application.

Authorized JavaScript Origins: Dashboard Origin
https://cai.cuboidsoft.in
Authorized Redirect URIs (Add both): OAuth Handshake Callbacks
https://cai.cuboidsoft.in/google_callback.php
https://developers.google.com/oauthplayground
Note on "AI-powered agent client": You can check or leave this box unchecked; both generate the exact same standard OAuth 2.0 credentials compatible with Google Calendar API.
4
Generate Permanent Refresh Token (30 Seconds)

To let Cai schedule consultations and generate Meet links autonomously 24/7:

  1. Open Google OAuth 2.0 Playground .
  2. Click the Gear icon ⚙️ in the top right.
  3. Check "Use your own OAuth credentials" and paste your Client ID & Client Secret.
  4. In Step 1 on the left, select Google Calendar API v3 > .../auth/calendar.events → click Authorize APIs.
  5. In Step 2, click Exchange authorization code for tokens → copy the generated Refresh token (format: 1//04...).
5
Paste in CuboidPilot Cai Dashboard

Open app/channels.html → click Google Calendar & Meet > Configure:

• Client ID, Client Secret & Refresh Token from Steps 3 & 4
• Calendar ID: primary (or your Google Workspace email)
• Toggle ON Auto-generate Google Meet link → click Save & Activate.
All client bookings on your website widget and WhatsApp are synced directly to Google Calendar with Meet links.
Calendly

4. Calendly (Instant Link Booking)

Show Calendly Booking Cards & Meeting Pickers Inside the AI Widget
Time: 30 Seconds • Easiest ⭐
1
Copy Your Calendly Link: Open your Calendly account → Copy your 15-min or 30-min meeting link (e.g. https://calendly.com/your-company/consultation).
2
Paste & Enable in Channels Hub: Go to app/channels.html → Click Calendly → Paste your link → Toggle Enable → Click Save Changes.
How it works on your site:

Whenever a website visitor says "Can I book a demo?" or "Schedule a meeting", the AI displays a native 1-click booking card with your Calendly calendar right inside the chat window.

Email

5. Company Email Account (SMTP • Gmail / Zoho / Outlook)

Team Invites, Instant Lead Email Alerts & AI Auto-Dispatching Platform Guides
Time: ~2 mins • Essential Core
What this unlocks for your business:
  • Team Member Invitations: Invite coworkers to join your CRM workspace with a 1-click link.
  • Instant Lead Email Alerts: Get an email notification immediately whenever someone leaves a phone number or inquiry.
  • AI Visitor Document Dispatch: When a visitor asks for brochures or services, AI takes their email and dispatches it straight to their inbox.
1
If using Gmail / Google Workspace (Generating App Password):
2
Enter Credentials in CuboidPilot: Open app/channels.html → Click Company Email → Fill the fields:
SMTP Host: smtp.gmail.com (or mail.yourdomain.com)
Port & Security: 587 (TLS) • 465 (SSL)
Username: your-email@gmail.com
Password: [16-char App Password]
3
Test & Save: Click "Send Test Email" → When you see "SMTP verified successfully", click Save Configuration.
Google Sheets

6. Google Sheets (Real-Time Auto-Append)

Append Every Inbound Lead & Contact Details into a Live Spreadsheet Row
Time: ~2 mins • 1-Click Code
1
Open a New Google Sheet: Go to sheets.new → Name your spreadsheet (e.g. CuboidPilot Inbound Leads 2026).
2
Open Apps Script & Paste Code: In Google Sheet top menu, click Extensions → Apps Script. Delete any existing code, paste this ready-made script:
Google Apps Script (Code.gs)
function doPost(e) {
  try {
    var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    var payload = JSON.parse(e.postData.contents);
    var data = payload.data || payload;

    // Optional: target specific tab if provided
    var sName = payload.sheet_name || (data && data.sheet_name);
    if (sName) {
      var targetTab = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sName);
      if (targetTab) sheet = targetTab;
    }

    if (sheet.getLastRow() === 0) {
      sheet.appendRow(["Timestamp", "Lead Name", "Phone", "Email", "Intent / Service", "Estimated Value", "AI Summary", "Channel"]);
      sheet.getRange(1, 1, 1, 8).setFontWeight("bold").setBackground("#e6f4ea");
    }

    sheet.appendRow([
      new Date().toLocaleString("en-IN", { timeZone: "Asia/Kolkata" }),
      data.name || data.customer_name || "Prospect",
      data.phone || "",
      data.email || "",
      data.interested_service || data.intent || "General Inquiry",
      data.budget || data.opportunity_value || "",
      data.summary || data.ai_summary || "",
      payload.source || "Website Widget"
    ]);

    return ContentService.createTextOutput(JSON.stringify({ status: "success", row: sheet.getLastRow() }))
      .setMimeType(ContentService.MimeType.JSON);
  } catch (err) {
    return ContentService.createTextOutput(JSON.stringify({ status: "error", message: err.toString() }))
      .setMimeType(ContentService.MimeType.JSON);
  }
}
3
Deploy as Web App: In Apps Script top right → Click Deploy → New deployment → Select type: Web app → Set Who has access: Anyone → Click Deploy → Copy the generated Web app URL.
4
Paste in CuboidPilot: In app/channels.html, click Google Sheets → Paste your Web app URL → Click Connect & Test. Every new lead will appear in your Google Sheet within 2 seconds!
TeleCRM

7. TeleCRM (Direct Pipeline Sync)

Auto-push Captured Leads with Caller Notes, Intent Tags & Auto-Call Queue
Time: ~1 min • API Key
1
Copy TeleCRM API Key: Log into your TeleCRM Web Dashboard → Go to Settings → Integrations / API → Generate New API Key → Copy the Key.
2
Connect in CuboidPilot: In app/channels.html, click TeleCRM → Paste your API Key → Click Save & Activate.
What happens automatically:

When a website or WhatsApp prospect provides their contact number, they are instantly created as a New Lead in your TeleCRM mobile app, ready for your calling team to dial with 1 tap.

Zoho CRM
HubSpot
Salesforce

8. Zoho CRM • 9. HubSpot • 10. Salesforce

Active 2-Way Sync

Enterprise CRM Lead Dossier, Automated Contact Enrichment & Opportunity Pipeline Orchestration

OAuth 2.0 & Tokens Realtime < 2s
Zoho CRM

Zoho CRM Integration

Server-Based App

Direct v2.1 REST API • Global multi-region data centers (.in, .com, .eu, .com.au)

Connect in Dashboard
01 Console
Register Server App

Go to Zoho Developer Console , click Add Client, and choose Server-based Applications.

Client Name: CuboidPilot Cai
Homepage: cai.cuboidsoft.in
02 Redirect URI
Authorized Callback

Paste the CuboidPilot OAuth redirect endpoint into Zoho's Authorized Redirect URIs field:

CALLBACK URL
https://cai.cuboidsoft.in/zoho_callback.php
03 Authorize
Bind Credentials

Copy Client ID, Client Secret & Refresh Token from Zoho, open Cai Channels, select your region, and save.

Regions: .in • .com • .eu
What Cai Automatically Syncs with Zoho CRM
Lead / Contact Creation

Extracts name, phone, verified email, and company with zero manual data entry.

AI Intent Scoring

Writes AI commercial score (Tier 1 High, Tier 2 Warm, Tier 3 Info) into custom CRM field.

Conversation Transcripts

Full WhatsApp & website conversation logs appended directly to the Zoho Contact timeline.

Deals & Pipelines

Instantly spawns a Deal in Zoho Sales Pipeline when prospect confirms budget or schedule.

Unified Multi-CRM Sync Engine Active
Website Visitor / WhatsApp → Cai Fin AI Qualification → Direct 2-Way CRM Dispatch (< 2s)
Configure in Channels Hub
Webhooks

11. Custom Webhooks, Zapier & Make (Integromat)

Connect to 5,000+ Apps via HTTP POST JSON Streaming
Universal Compatibility
1
Get a Webhook URL: In Zapier, select trigger "Webhooks by Zapier → Catch Hook" → Copy the Catch URL. (Or in Make, add a Custom Webhook module).
2
Paste in CuboidPilot: In app/channels.html, click Custom Webhook → Paste your URL → Click Save & Send Test Ping.
Enterprise Security:
Every outgoing payload includes cryptographic signature: X-Cuboid-Signature: sha256=[HMAC-HEX]
Developer Reference • Real-Time Webhooks

Universal Outbound Webhooks & Events Specification

Configure custom HTTP POST webhooks in app/channels.html to stream real-time events to your proprietary backend, AWS Lambda, Zapier, or Make. Every webhook request includes an X-Cuboid-Signature header generated via HMAC-SHA256 for cryptographic authentication.

Outbound Request Headers
POST https://api.yourdomain.com/cai/webhook
Content-Type: application/json
User-Agent: CuboidPilot-Webhook-Agent/2.4
X-Cuboid-Event: lead.qualified
X-Cuboid-Signature: sha256=d5b4a9f381... (Hex Digest)
X-Cuboid-Timestamp: 1768924000

Verifying Webhook Signatures (Node.js & PHP)

Node.js (Express)
const crypto = require('crypto');

function verifySignature(req, signingSecret) {
  const signature = req.headers['x-cuboid-signature'];
  const expected = 'sha256=' + crypto
    .createHmac('sha256', signingSecret)
    .update(req.rawBody)
    .digest('hex');

  return crypto.timingSafeEqual(
    Buffer.from(signature || ''),
    Buffer.from(expected)
  );
}
PHP 8+
$secret = 'whsec_your_signing_secret';
$rawPayload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_CUBOID_SIGNATURE'] ?? '';

$expected = 'sha256=' . hash_hmac('sha256', $rawPayload, $secret);

if (!hash_equals($expected, $signature)) {
    http_response_code(401);
    die('Signature verification failed');
}

Sample Event Payload (lead.qualified)

lead.qualified.json
{
  "event": "lead.qualified",
  "id": "evt_983147891234",
  "created_at": "2026-10-04T05:30:00Z",
  "company_id": 1,
  "data": {
    "lead_id": 482,
    "name": "Priya Sharma",
    "phone": "+919876543210",
    "email": "priya@zenithcorp.in",
    "intent_score": "Tier 1 (High Commercial Intent)",
    "intent_confidence": 0.94,
    "summary": "Inquired regarding Enterprise Plan deployment, requested demo for 25 seats.",
    "channel": "widget",
    "conversation_id": "conv_89127"
  }
}
Ready to deploy Cai for your business?
Start the 6-step guided onboarding wizard now