> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spn.wtf/llms.txt
> Use this file to discover all available pages before exploring further.

# User Guide

> How to use the Mahalaxmi Traders (Sahyogi) platform

## Quick Navigation

| Section            | What you do there                             |
| ------------------ | --------------------------------------------- |
| Dashboard          | Overview stats                                |
| My Bots            | Create and configure AI bots                  |
| Channels           | Connect WhatsApp, Gmail, Twitter              |
| Tools              | Create actions for bots (Airtable, API calls) |
| Credentials        | Store API keys securely                       |
| Webhooks           | Configure HTTP request actions                |
| Inbox              | Read and reply to customer chats              |
| Contacts           | Manage customer contacts                      |
| Contact Lists      | Group contacts for campaigns                  |
| Campaigns          | Send bulk WhatsApp messages                   |
| WhatsApp Templates | Manage approved message templates             |
| Images             | Upload and manage media files                 |
| Analytics          | Usage charts and metrics                      |
| Activities         | Full event audit log                          |

***

## Bots

<AccordionGroup>
  <Accordion title="Create a Bot">
    1. **My Bots** → **Create Bot**
    2. Fill in:

    | Field             | Description                                      |
    | ----------------- | ------------------------------------------------ |
    | **Bot Name**      | Min. 3 characters                                |
    | **Description**   | What this bot does (min. 10 characters)          |
    | **Color Theme**   | Blue, Indigo, Purple, Green, Red, Orange, Yellow |
    | **System Prompt** | Instructions for the bot's behavior and tone     |
    | **Active**        | Toggle on to make the bot live                   |

    3. Click **Save**
  </Accordion>

  <Accordion title="Attach Channels to a Bot">
    1. Find the bot → click **Manage Channels**
    2. Select which channels to link
    3. Click **Save**
  </Accordion>

  <Accordion title="Attach Tools to a Bot">
    1. Find the bot → click **Manage Tools**
    2. Select tools to enable
    3. Click **Save**
  </Accordion>

  <Accordion title="Embed Bot on a Website">
    Get the bot URL from **My Bots** → copy icon:

    ```
    https://chat.sahyogi.io?bot_id=YOUR_BOT_ID
    ```

    Embed via iframe:

    ```html theme={null}
    <iframe
      src="https://chat.sahyogi.io?bot_id=YOUR_BOT_ID"
      width="400" height="600"
      style="border: none; border-radius: 12px;">
    </iframe>
    ```
  </Accordion>
</AccordionGroup>

***

## Channels

<AccordionGroup>
  <Accordion title="Connect WhatsApp">
    1. **Channels** → **Add Channel** → select **WhatsApp**
    2. Fill in channel name and API Key from your provider (Gupshup / Wasimple / Meta)
    3. Copy the **Webhook URL** into your WhatsApp provider's dashboard
    4. Click **Save**
  </Accordion>

  <Accordion title="Connect Gmail">
    1. **Add Channel** → **Gmail**
    2. Click **Authenticate with Google** → complete OAuth flow
  </Accordion>

  <Accordion title="Connect Twitter">
    1. **Add Channel** → **Twitter**
    2. Click **Authenticate with Twitter** → complete OAuth flow
  </Accordion>
</AccordionGroup>

***

## Tools & Airtable

<AccordionGroup>
  <Accordion title="Create a Tool">
    1. **Tools** → **Create Tool**
    2. Fill in:

    | Field           | Description                                                  |
    | --------------- | ------------------------------------------------------------ |
    | **Tool Name**   | e.g., "Add Lead to Airtable"                                 |
    | **Description** | What it does — the AI reads this to decide when to use it    |
    | **Integration** | Select Airtable, REST API, etc.                              |
    | **Parameters**  | Key-value pairs; set source to `by_ai` for bot-filled values |

    3. Click **Save**, then attach to a bot via **Manage Tools**
  </Accordion>

  <Accordion title="Airtable Integration">
    **Step 1 — Save credential**

    * **Credentials** → **Add Credential** → Type: **Airtable** → enter API Key → Save

    **Step 2 — Create tool**

    * **Tools** → **Create Tool** → select **Airtable** integration
    * Pick your Base and Table
    * Set Parameters matching your Airtable column names (source: `by_ai`)

    **Step 3 — Update bot system prompt**

    > "When a user provides contact info, use the Add Customer to CRM tool to save their name, email, and phone."
  </Accordion>

  <Accordion title="Credentials">
    * **Credentials** → **Add Credential**
    * Supported types: Airtable, Gmail, OpenAI, WhatsApp, Stripe, Slack, and more
    * Keys are encrypted at rest — use the eye icon to reveal/hide
  </Accordion>
</AccordionGroup>

***

## Inbox

<AccordionGroup>
  <Accordion title="Reading & Replying to Conversations">
    * Left panel: all contacts ordered by latest activity
    * Click a contact → full thread loads on the right
    * Type reply → **Enter** or **Send**
    * Inbox updates in real time via WebSocket
  </Accordion>

  <Accordion title="Contact Status">
    | Status   | Meaning              |
    | -------- | -------------------- |
    | Open     | Active conversation  |
    | Pending  | Waiting for response |
    | Resolved | Conversation closed  |
  </Accordion>
</AccordionGroup>

***

## Contacts & Campaigns

<AccordionGroup>
  <Accordion title="Add a Contact">
    1. **Contacts** → **Add Contact**
    2. Fill in Name (required), Phone, Email, Source (WhatsApp / Facebook / Manual)
    3. Click **Save**

    Per-contact settings: **Opt-in/Opt-out**, **Reply Bot** toggle, **Status**
  </Accordion>

  <Accordion title="Create a Contact List">
    1. **Contact Lists** → **Create List**
    2. Name the list → add contacts
    3. Use when creating a campaign
  </Accordion>

  <Accordion title="Create a Campaign">
    1. **Campaigns** → **Create Campaign**
    2. Fill in:

    | Field                   | Description                                |
    | ----------------------- | ------------------------------------------ |
    | **Type**                | Broadcast, Drip, Trigger, or Survey        |
    | **Template**            | Approved WhatsApp template                 |
    | **Audience**            | All Contacts or a Contact List             |
    | **Schedule**            | Immediate, Scheduled, or Recurring         |
    | **Template Parameters** | Dynamic placeholders (e.g., customer name) |

    3. Click **Send Now** or **Save as Draft**
  </Accordion>

  <Accordion title="Campaign Statuses">
    | Status    | Meaning                  |
    | --------- | ------------------------ |
    | Draft     | Not sent yet             |
    | Scheduled | Will send at future time |
    | Active    | Currently running        |
    | Paused    | Paused mid-run           |
    | Completed | Finished                 |
    | Failed    | Encountered errors       |
  </Accordion>
</AccordionGroup>

***

## WhatsApp Templates

<AccordionGroup>
  <Accordion title="Create a Template">
    1. **WhatsApp Templates** → **Create Template**
    2. Fill in:
       * **Name**: lowercase, underscores, no spaces
       * **Category**: Marketing, Utility, or Authentication
       * **Body**: Use `{{1}}`, `{{2}}` for dynamic variables
       * **Header / Footer / Buttons**: optional
    3. Click **Submit for Approval**

    <Info>Templates are reviewed by WhatsApp/Meta — typically approved within a few hours to 24 hours.</Info>
  </Accordion>
</AccordionGroup>

***

## Webhooks

<AccordionGroup>
  <Accordion title="Create a Webhook">
    1. **Webhooks** → **Create Webhook**
    2. Fill in:

    | Field                        | Description                                          |
    | ---------------------------- | ---------------------------------------------------- |
    | **Name**                     | e.g., "Check Order Status"                           |
    | **URL**                      | Full API endpoint                                    |
    | **HTTP Method**              | GET, POST, PUT, PATCH, DELETE                        |
    | **Headers**                  | JSON object e.g. `{"Authorization": "Bearer TOKEN"}` |
    | **Query Params / JSON Body** | Static values                                        |

    3. Add **Parameters** for dynamic values the bot fills at runtime (source: `by_ai` or `fixed`)
    4. Click **Save** → attach to a bot via **Manage Tools**
  </Accordion>
</AccordionGroup>

***

## Images

<AccordionGroup>
  <Accordion title="Upload & Manage Images">
    * **Images** → drag-and-drop or **Upload Images**
    * Max 10 MB per file, max 10 files at once
    * Supported: PNG, JPG, JPEG, GIF, WebP, SVG
    * Sort by Newest, Oldest, Name, or File Size
    * Click any image to preview → Download or Delete from preview
  </Accordion>
</AccordionGroup>

***

## Account Settings

<AccordionGroup>
  <Accordion title="Profile & Password">
    * Click your avatar in the sidebar → update Name, Email, or profile picture
    * **Change Password**: Profile Settings → Change Password
  </Accordion>

  <Accordion title="Generate API Token">
    1. Profile Settings → **Generate API Token**
    2. Copy the token — shown only once
    3. Use as: `Authorization: Bearer YOUR_API_TOKEN`
    4. To revoke: click **Revoke API Token**
  </Accordion>
</AccordionGroup>
