This knowledge article explores the latest updates to the Software Development Kit (SDK), focusing on versions 2 (V2) and 3 (V3). It covers their integration processes, upgrade considerations, and customization options.
Introducing V2: Streamlined Integration and Upgrades
V2 addresses challenges faced with earlier SDK versions, particularly in integration and upgrades. Here’s a breakdown of the improvements:
-
Simplified Installation: Gone are the days of complex manual configurations.
-
V2 offers two options:
i. **NPM Package:**Ideal for modern frameworks like Angular or Reactor any other framework, allowing easy integration via npm installation.GitHub - Koredotcom/web-kore-sdk at v2/10.2.0
ii. Embed Script:
A simple script inclusion method is provided.<link rel='stylesheet' href='https://bots.kore.ai/webclient/UI/dist/kore-ai-sdk.min.css'></link>``<script src='https://bots.kore.ai/api/platform/websdkjs/API_KEY'></script>``<script>KoreSDK.show(KoreSDK.chatConfig);</script>
-
Reduced Customization Effort: No more directly modifying core SDK code!
v2 introduces:
Custom Hooks:
Developers can utilize a set of custom hooks to modify sdk behavior and appearance without directly changing the core code.Template Manager: Inject custom templates into the chat window for a specified functionality, personalized look and feel.
Plugins:
Customize functionalities like visuals and features with a modular plugin system.
This reduces the initial download size and simplifies upgrades.
web-kore-sdk/docs/plugins at v2/10.2.0 · Koredotcom/web-kore-sdk · GitHub -
External JWT Generation: v2 relies on an external JWT generation service implemented by the customer for improved security.
Challenges with Upgrading v1:
Conflicting Code:
When upgrading v1, customizations made to the core SDK code (like CSS changes or custom templates) could conflict with updates from the original source.
Manual Merging:
Merging customizations with new versions of the core code was a manual and time-consuming process.
Missing Developers:
If the developers who made the customizations were unavailable, it became difficult to determine the changes needed for a successful upgrade.
Where as now in V2 we are providing Clear Versioning and Upgrade Process:
Upgrading from older versions is smoother due to:
- Version Tagging: Easily track the specific version you’re using and identify compatible upgrades.
- Minimal Code Changes: Most customizations are handled through templates and plugins, minimizing changes to the core codebase.
- Isolated Customizations: Application code with customizations remains separate from the core library, preventing them from being overwritten during upgrades.
- Version Selection: Specify the desired SDK version during installation using
npm install kore-web-sdk@<version>
.
Benefits of Using v2:
- Faster Integration: Streamlined installation and configuration save developers valuable time.
- Easier Upgrades: Clear versioning and minimal code changes make upgrades a breeze.
- Increased Flexibility: Choose only the features you need with the modular plugin system.
- Reduced Maintenance: Separation of core functionalities from customizations minimizes long-term code maintenance.
Sample screenshots for V2 version:
V3: A Focus on Modern UI and Advanced Customization - (supported with builder version 11)
V3 builds upon the foundation of v2, introducing a more modern user interface (UI) and advanced customization options:
- Modernized UI: A revamped chat window with animations and a fresh look and feel enhances the user experience.
- Enhanced Theme Customization: Extensive theme options within v3 eliminate the need for manual code changes for basic customizations (icons, fonts, colors, sounds). Advanced users can still access granular control.
Sample screenshots of the V3 version:
Content by @venkateswara.velidi & @rajasekhar.balla