The Telegram Support Chat system connects your customer-facing website to your Sales 360 Service Cloud, using Telegram as the real-time messaging bridge.
| Component | Sales 360 Mapping | Purpose |
| Chat Widget | Experience Cloud / Custom LWC | The floating widget visible on the customer website. |
| Configuration | Custom Metadata Type: Telegram Support Settings | Stores the Telegram API credentials and chat appearance settings. |
| Incoming Message | Custom Object: Telegram Message / Case/Lead | Creates a new record (Case or custom object) in Sales 360 for every new conversation initiated by a customer. |
| Agent Interface | Service Cloud Console | Where Sales 360 agents view, reply to, and manage incoming support conversations. |
| API Integration | External Service / Webhook Handler | The server-side component that manages message traffic between Sales 360 and the Telegram API. |
You must first set up a Telegram Bot to act as the intermediary between your customers and your Sales 360 instance.
Open Telegram and search for @BotFather.
Start a chat and send the command: /newbot.
Follow the prompts to choose a name and username for your support bot.
Crucial Step: BotFather will provide you with the HTTP API Token. Copy this token; this is your Bot Token for Sales 360 configuration.
The Telegram API needs to know where to send incoming customer messages (webhooks). This is the URL of your Sales 360 integration service.
Obtain the Webhook URL: This URL is automatically generated by your Sales 360 implementation (often a Site URL or an API Gateway endpoint). It is typically displayed within the Telegram Support Settings module inside Sales 360 after installation.
Set the Webhook: Return to @BotFather in Telegram and send the command: /setwebhook.
Select your new support bot.
Paste the Webhook URL you obtained from Sales 360.
Example URL: https://yourdomain.salesforce.com/services/apexrest/TelegramChatHandler
Access the system settings to input credentials and customize the chat widget appearance.
Log in to Sales 360 as a System Administrator.
Navigate to Setup $\rightarrow$ Custom Metadata Types $\rightarrow$ Telegram Support Settings.
Click Manage Records and edit the primary configuration record.
Enter the copied values:
Bot API Token: The token from @BotFather.
Chat Status: Enabled (Toggles the floating widget ON/OFF).
Adjust the widget's appearance on your website:
| Field | Description | Telegramsupport.sh Mapping |
| Button Text | The text displayed on the floating button (e.g., "Chat with us," "Support"). | text_button |
| Position | Where the button appears (e.g., bottom-left, bottom-right). |
position |
| Color Scheme | CSS color codes for the button and chat window. | color_button, color_text |
| Auto-Open Delay | Time (in seconds) before the chat window automatically opens after page load (set to 0 to keep closed). |
open_delay |
Click Save Configuration. The chat widget should now appear on your Experience Cloud site.
Customer Initiation: A customer clicks the floating chat button on your website, enters their message, and clicks send.
Sales 360 Record: The system automatically creates a new Case or a Custom Telegram Message record in Sales 360, containing the customer's initial message and their unique Telegram user ID (chat_id).
Routing: This new record is routed to your support queue or to an available agent via Omni-Channel (if configured).
Agents use the Service Cloud Console to manage conversations:
The agent accepts the incoming Case/Message record in the console.
The console includes a dedicated Telegram Messaging Component (LWC) in the sidebar or feed.
The agent types a reply into this component and clicks Send.
Real-Time Reply: The Sales 360 system uses the Bot Token and the customer's Chat ID to instantly send the agent's reply back to the customer's Telegram app.
Follow-up: All subsequent messages from the customer will automatically update the same Case/Message record, maintaining a single, unified conversation thread.
Resolution: When the issue is resolved, the agent closes the Case/Message record in Sales 360.
Customer Identification: If the customer's Telegram ID can be matched to an existing Contact record in Sales 360, the Case will automatically be linked to that contact.