Home Integrations
🛠️

Integrations

Find help with any sort of integrations you would like to attain with Ruut
Temitayo Olakunle
By Temitayo Olakunle
• 5 articles

How to Integrate the Ruut Flutter SDK

Ruut Flutter Chat SDK Documentation A simple and powerful Flutter SDK to integrate real-time chat into your Flutter app using Ruut. Connect with your visitors instantly and provide exceptional support. Overview The Ruut Flutter Chat SDK allows you to add a fully-featured chat interface to your Flutter app. It supports real-time messaging, file attachments, customizable themes, and offline message storage. Key Features - Real-time messaging with WebSocket support - File and image attachments - Customizable UI themes - Offline message persistence - Typing indicators - User avatars and names - Message status (sending, delivered, read) - Customer Satisfaction (CSAT) surveys Installation 1. Add Dependency Add the ruut_flutter package to your pubspec.yaml file. Check the latest version. dependencies: ruut_flutter: ^latest_version 2. Install Dependencies Run the following command in your terminal: flutter pub get Basic Setup 1. Create an API Channel Follow the steps here to create an API channel on the Ruut server and get your inboxIdentifier. 2. Implement RuutChat Widget Add the RuutChat widget to your app: import 'package:flutter/material.dart'; import 'package:ruut_flutter/ruut_chat.dart'; import 'package:ruut_flutter/data/local/entity/ruut_user.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Ruut Chat Demo', home: Scaffold( body: RuutChat( inboxIdentifier: 'your_inbox_identifier', user: RuutUser( identifier: 'user_123', name: 'John Doe', email: '[email protected]', ), ), ), ); } } Replace your_inbox_identifier with the inbox identifier from your Ruut API channel. Note: The SDK uses Hive for local storage. Configuration Required Parameters - inboxIdentifier: Your Ruut inbox identifier (String, required). Optional Parameters Parameter Type Default Description enablePersistence bool true Enables saving messages and conversations to disk for offline access. user RuutUser null Custom user details (e.g., name, email, avatar). theme RuutChatTheme Default Customizes the chat UI (colors, fonts, icons). callbacks RuutCallbacks null Handles real-time events (e.g., message received, typing started). Custom User Setup RuutChat( inboxIdentifier: 'your_inbox_identifier', user: RuutUser( identifier: 'unique_user_id', name: 'Jane Doe', email: '[email protected]', avatarUrl: 'https://example.com/avatar.jpg', customAttributes: { 'plan': 'premium', 'signup_date': '2024-01-01', }, ), ) Theme Customization RuutChat( inboxIdentifier: 'your_inbox_identifier', theme: RuutChatTheme( primaryColor: Colors.blue, backgroundColor: Colors.white, inputBackgroundColor: Colors.grey[100], userAvatarNameColors: [Colors.black, Colors.white], attachmentButtonIcon: Icon(Icons.image_outlined, color: Colors.grey), ), ) Callbacks Use RuutCallbacks to handle real-time events: RuutChat( inboxIdentifier: 'your_inbox_identifier', callbacks: RuutCallbacks( onMessageReceived: (ruutMessage) { print('New message: ${ruutMessage.content}'); }, onMessageSent: (ruutMessage, echoId) { print('Message sent: ${ruutMessage.content}'); }, onError: (error) { print('Error: ${error.cause}'); }, onConversationStartedTyping: () { print('Agent is typing...'); }, onConversationIsOnline: () { print('Agent is online'); }, ), ) Available Callbacks Callback Description onWelcome Connection established. onMessageReceived New message from agent. onMessageSent Message sent successfully. onMessageDelivered Message delivered to server. onConversationStartedTyping Agent started typing. onConversationStoppedTyping Agent stopped typing. onConversationIsOnline Agent is online. onConversationIsOffline Agent is offline. onError Error occurred. Troubleshooting Common Issues 1. Chat Not Connecting - Verify your inboxIdentifier and Ruut server URL. - Example: RuutClient.create( baseUrl: 'https://app.ruut.chat', inboxIdentifier: 'correct_identifier', ); 2. File Upload Fails - Check file size limits and network connection. - Handle errors: onError: (error) { if (error.type == RuutClientExceptionType.SEND_MESSAGE_FAILED) { print('Upload failed. Check connection and retry.'); } } 3. Messages Not Persisting - Ensure enablePersistence is set to true: RuutChat( inboxIdentifier: 'your_inbox_identifier', enablePersistence: true, ) 4. Theme Not Applied - Verify theme properties: RuutChat( theme: RuutChatTheme( primaryColor: Colors.blue, backgroundColor: Colors.white, ), ) Enable Debug Mode Add debug logging for troubleshooting: void initState() { super.initState(); debugPrint('Ruut Chat initialized'); } Error Handling RuutChat( callbacks: RuutCallbacks( onError: (error) { switch (error.type) { case RuutClientExceptionType.CREATE_CLIENT_FAILED: print('Failed to initialize chat'); break; case RuutClientExceptionType.SEND_MESSAGE_FAILED: print('Message failed to send'); break; default: print('Unknown error: ${error.cause}'); } }, ), ) If issues persist, contact us at [email protected]. Best Practices 1. Error Handling: Implement robust error handling for all callbacks. 2. User Feedback: Show loading states and error messages to users. 3. Performance: Use pagination for large message histories: RuutChat( onEndReachedThreshold: 0.75, onEndReached: () async { await ruutClient?.loadMessages(); }, ) 4. Security: Validate user inputs and handle sensitive data securely. 5. Testing: Test on various devices and network conditions. Updating the SDK 1. Check for Updates: flutter pub outdated 2. Update Dependencies: flutter pub upgrade 3. Review Changelog: Check for breaking changes and test after updates. Support - Check example implementations on GitHub. - For issues, contact [email protected].

Last updated on Jun 24, 2025

Integrating Ruut to your Wordpress site. Here's how.

If you're using WordPress for your website, you can easily integrate live chat support for your visitors with Ruut. By adding the Ruut live chat widget to your WordPress site, you can connect with your customers in real-time, answering their questions and addressing their concerns without the hassle of manual back-and-forth communication. Here's how you can get started in 4 simple steps: Step 1. Download the Ruut Plugin. Download the Zip file of the latest Ruut WordPress plugin from here Step 2. Upload the plugin to your WordPress website Log in to your WordPress account. Navigate to the Admin Panel and click “Plugins” from the sidebar. You will be able to see the "Add New" button. You will see an option to upload the plugin, as shown in the screenshot below. Click “Browse” and select the Zip file downloaded in step 1. Step 3. Activate the plugin Once the plugin is uploaded, you will see a Success screen with the "Activate Plugin" option, as shown below. Click the "Activate Plugin” button. Congrats! The plugin is now installed, you would see a Ruut Plugin view as shown below. To complete the configuration, you must add your Ruut app credentials. Step 4. Configure the plugin Now, you will be able to see “Ruut Settings” under your "Settings" menu. Click on that to update the live-chat configuration. You will be presented with the Settings screen as shown below. Configure your Ruut plugin here to make it work. You need to create a Website inbox on your Ruut installation. Please refer to this guide to create a website channel inbox. Once you have your inbox channel created. copy the website token from the website channel setting and include it below in the field called Ruut Website Token. Once you complete the form, click the "Save changes" button. ** Step 5. Verify that the plugin is working correctly** Visit your website and see if the widget appears on the website!

Last updated on Apr 09, 2025

Integration Ruut React Native Widget

Overview The Ruut React Native Widget allows you to integrate a Ruut chat widget into your React Native application. This documentation will guide you through the installation, usage, and customization of the widget. Installation You can install the Ruut React Native Widget library using either yarn or npm: yarn add @ruut/react-native-client or npm install --save @ruut/react-native-client Dependencies This library requires react-native-webview and async-storage. Please refer to their respective documentation for installation instructions. iOS Installation For React Native versions > 60.0, follow these steps to complete the installation: cd ios && pod install Usage To use the Ruut Widget, follow these steps: 1. Create a Website Channel: Set up a website channel in the Ruut server by following the steps described here. 2. Replace websiteToken Prop: Use the token obtained from the above step to replace the placeholder in the example code below. Example Code import React, { useState } from 'react'; import { StyleSheet, View, SafeAreaView, TouchableOpacity, Text } from 'react-native'; import RuutWidget from '@ruut/react-native-client'; const App = () => { const [showWidget, toggleWidget] = useState(false); const user = { identifier: '[email protected]', name: 'John Samuel', avatar_url: '', email: '[email protected]', identifier_hash: '', }; const customAttributes = { accountId: 1, pricingPlan: 'paid', status: 'active' }; const websiteToken = 'WEBSITE_TOKEN'; // Replace with your actual website token const locale = 'en'; const colorScheme = 'dark'; return ( <SafeAreaView style={styles.container}> <View> <TouchableOpacity style={styles.button} onPress={() => toggleWidget(true)}> <Text style={styles.buttonText}>Open Widget</Text> </TouchableOpacity> </View> { showWidget && <RuutWidget websiteToken={websiteToken} locale={locale} closeModal={() => toggleWidget(false)} isModalVisible={showWidget} user={user} customAttributes={customAttributes} colorScheme={colorScheme} /> } </SafeAreaView> ); }; const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', }, button: { height: 48, marginTop: 32, paddingTop: 8, paddingBottom: 8, backgroundColor: '#1F93FF', borderRadius: 8, borderWidth: 1, borderColor: '#fff', justifyContent: 'center', }, buttonText: { color: '#fff', textAlign: 'center', paddingLeft: 10, fontWeight: '600', fontSize: 16, paddingRight: 10, }, }); export default App; Props Here is a list of props you can use with the RuutWidget component: - websiteToken - Type: String - Default: - - Description: Website channel token. - colorScheme - Type: String - Default: light - Description: Widget color scheme. Options are light, dark, or auto. - locale - Type: String - Default: en - Description: Locale setting for the widget. - isModalVisible - Type: Boolean - Default: false - Description: Determines if the widget is visible or not. - closeModal - Type: Function - Default: - - Description: Function to handle the widget close event. - user - Type: Object - Default: {} - Description: User information such as email, username, and avatar URL. - customAttributes - Type: Object - Default: {} - Description: Additional information about the customer. https://www.npmjs.com/package/@ruut/react-native-client For detailed support, contact our support team.

Last updated on Sep 16, 2024

How to Set Up a WhatsApp Channel in Ruut

WhatsApp is one of the most popular messaging platforms worldwide, and integrating it with Ruut allows you to engage with your customers directly via WhatsApp within your Ruut account. This guide will walk you through the process of setting up a WhatsApp channel on Ruut, step by step. Prerequisites Before setting up your WhatsApp channel in Ruut, ensure the following: Ruut Account: You need to have a Ruut account. If you don't have one, sign up at Ruut. WhatsApp Business Account: You must have a verified WhatsApp Business account. If you don’t have one, you can set it up through the WhatsApp Business website. Twilio Account (Optional): If you are using Twilio as your SMS gateway for WhatsApp, you’ll need a Twilio account. Alternatively, you can use the official WhatsApp API via Facebook Business Manager. Phone Number: A valid phone number for WhatsApp communication. The number must be registered under your WhatsApp Business Account. API Access: If you plan to use WhatsApp API to integrate with Ruut, you will need API access either through Twilio or WhatsApp Business API directly. Step 1: Navigate to the Channels Section in Ruut. Log in to your Ruut account. In the left-hand sidebar, click on Settings (gear icon). From the settings menu, select Workspace Step 2: Add a New WhatsApp Channel Once you are in the Workspace section, click the Add Workspace button at the top right corner. In the “Add Workspace” screen, select WhatsApp from the available list of channels. Click Continue to proceed. Step 3: Choose Your WhatsApp Integration Method Ruut offers two ways to integrate WhatsApp: Option 1: Twilio API Integration If you are using Twilio to manage your WhatsApp messaging, select Twilio from the available options. Option 2: Official WhatsApp Business API If you are using the official WhatsApp Business API (through Facebook Business Manager), select WhatsApp Business API. Step 4: Configure the Channel Settings For Twilio Integration: 1. Account SID & Auth Token: ° Log into your Twilio account. ° Navigate to the Console page. ° Copy the Account SID and Auth Token from the dashboard. 2. Phone Number: ° Under your Twilio account, obtain the WhatsApp-enabled phone number (e.g., whatsapp:+1XXXXXXXXXX). ° Enter this phone number in the relevant field on the Ruut WhatsApp integration page. 3. Callback URL (Optional): ° Twilio requires a callback URL to handle incoming messages. If needed, provide the appropriate webhook URL here. 1. Click Save to connect Twilio to Ruut. For WhatsApp Business API Integration: 1. WhatsApp Business Account: ° You will need to input the WhatsApp Business Account ID associated with your WhatsApp Business API. This ID can be found in your Facebook Business Manager under the "WhatsApp" section. 2. Phone Number: ° Provide the WhatsApp Business phone number that is linked to your WhatsApp Business API. 3. API Token: ° You’ll need an API Token for authentication. Generate this token from the Facebook Developer portal for your WhatsApp Business API. 4. Webhook URL: ° Input the Webhook URL provided by Ruut for handling incoming messages. This URL should be set up in your Facebook Business Manager to forward messages to Ruut. 5. Click Save to complete the integration with WhatsApp Business API. Step 5: Verify and Test the WhatsApp Channel Once you’ve entered the necessary details for Twilio or WhatsApp Business API: 1. Verify the Phone Number: ° Ruut will automatically verify the WhatsApp phone number. You will receive a confirmation notification in your Ruut dashboard once the phone number is verified. ° If you don’t see a confirmation, double-check the details entered and retry the connection. 2. Test the Channel: ° Send a test message to the WhatsApp number you’ve integrated with Ruut from your phone or another WhatsApp account. ° Ensure that the message appears in your Ruut inbox. Step 6: Configure Additional Settings (Optional) 1. Channel Name: ° You can set a name for your WhatsApp channel to help identify it in the Ruut dashboard. ° Reply Templates: ° You can configure predefined WhatsApp templates (Quick Replies, Messages) for faster responses. 2. Business Hours: ° Set up business hours for when WhatsApp messages are expected to be answered by agents. Outside of business hours, Ruut can send automated responses. 3. Assign Agents: ° Assign specific agents or teams to handle incoming WhatsApp messages. This helps ensure that inquiries are directed to the right people. Step 7: Manage WhatsApp Messages in Ruut Once the integration is complete, you can start managing WhatsApp conversations directly from your Ruut inbox. Here’s how: 1. Incoming Messages: ° When a customer messages your WhatsApp number, the conversation will appear in your Ruut inbox. ° Agents can respond to messages, attach files, send media, and more, all from within the Ruut interface. 2. Message Tags: ° You can use tags to organize and categorize WhatsApp conversations (e.g., inquiries, issues, support). 3. Auto-Responses: ° Set up automated replies for out-of-office hours or during busy periods. These auto-responses can include a friendly message or let the customer know when they can expect a reply. Step 8: Troubleshooting Common Issues: 1. Connection Issues: ° If the WhatsApp channel does not connect properly, ensure that all API credentials (e.g., Twilio SID, Auth Token, WhatsApp Business API credentials) are correctly entered. ° Double-check the phone number format and ensure that it’s linked to the correct WhatsApp Business Account. 2. WhatsApp Messages Not Appearing: ° Ensure that the webhook is correctly configured for receiving incoming messages. ° Verify that the WhatsApp number is correctly verified in both the Ruut and Twilio/Facebook Business Manager dashboards. 3. Message Delays: ° If messages are delayed, check for issues with the API provider (Twilio or WhatsApp Business API). Sometimes, network issues or API throttling can affect the delivery speed. 4. Support: ° If you encounter any persistent issues, reach out to Ruut’s support team at [email protected] for assistance. Conclusion By following these steps, you should now have your WhatsApp channel successfully set up in Ruut. You can manage customer conversations, automate replies, and streamline your customer support directly from the Ruut interface. If you have any further questions or need help with the setup, don’t hesitate to contact Ruut support.

Last updated on Nov 22, 2024

How to Integrate Ruut with Linear to Track Issues and Feature Requests

The Linear integration in Ruut allows you to seamlessly convert customer conversations into actionable tasks in your Linear workspace. With this integration, your support team can quickly escalate bugs, feature requests, or feedback to your product team—without ever leaving Ruut. What Can You Do with the Linear Integration? - Create new issues in Linear directly from a Ruut conversation - Link existing Linear issues to ongoing customer threads - Track issue progress from within Ruut - Keep your support and product teams aligned ✅ Prerequisites Before you begin, make sure: 1. You have a Ruut account with Admin privileges. 2. You have a Linear account with access to the workspace you want to connect. 3. Your Ruut workspace supports integrations (check with your Ruut plan if unsure). 🔧 How to Connect Linear with Ruut 1. Navigate to application in Ruut: - Go to your Ruut dashboard - Click on Settings > Application - Select Linear from the list 2. Authorize Access: - Click on Connect Linear - A dialog would appear to enter your API Key - Go to your linear dashboard and locate the settings - Look for Security and access > and generate a Personal API key - Copy the generated API key to Ruut 3. Complete Setup: - Save your settings - You’ll now see the Linear integration as “Enabled” - Go to your conversation next you should see the Linear icon as described in the image below 🛠 How to Use the Integration 🔹 Create a New Issue from a Ruut Conversation 1. Open any customer conversation in Ruut 2. Click the Linear logo 3. A modal pops up to either add a new issue or link an existing issue to a particular conversation: 4. Click Create 📝 The Linear issue will now be linked to the conversation. A note will be added so all team members can see the connection. 🔗 Link to an Existing Linear Issue 1. In a Ruut conversation, click on More actions > Link Linear Issue 2. Search for the existing issue by name or ID 3. Select and confirm This is useful for when multiple customers are reporting the same problem. 👀 Track Issue Status Once an issue is linked, you can: - View issue status and updates directly within Ruut - Click through to view the issue in Linear - Stay informed about when an issue is closed or updated 🙋 Common Use Cases - Escalate bugs reported by customers - Track feedback for product improvements - Keep customer support and product teams in sync - Avoid duplicate reports by linking to existing Linear issues 📌 Final Notes The Ruut + Linear integration helps you streamline internal workflows and deliver better experiences to customers. No more toggling between tools—everything happens in context. Need help? Contact support or reach out to your Ruut success manager.

Last updated on Jul 31, 2025