Alhena
  • Introduction
  • Getting Started
  • Architecture
  • Reference
    • Website SDK
      • Configure Proactive Nudges
    • Product FAQs
    • Website chatsdk events
    • Website chatsdk APIs
    • Chat SDK api and events examples
      • Open other external widget once human transfer is initiated
      • Show the Alhena AI widget only when someone scroll the page by 5 px
    • Website SDK - Custom data
      • Website SDK - Customer data with Agent
    • Website SDK - Internationalization
    • API Reference
      • API calls
    • Device Compatibility
  • Tutorials
    • AI Training
      • Training Steps
      • Training Data Sources
        • Websites
        • Youtube videos
        • Google Drive
        • Twitter Pages
        • Discord Messages
        • Confluence Pages
        • Upload Documents
        • Github
        • Zendesk Tickets
        • Freshdesk Tickets
        • Freshchat Tickets
        • Custom data sources
        • Shopify API
        • Woocommerce API
        • PDF Crawling
      • Training Frequently Asked Questions
    • Tuning Alhena AI Post Training
      • Best Practices for configuring the Alhena AI’s personality and guidelines
      • Adding Human Feedback for improving specific Questions
      • Adding to your knowledge base with FAQs
      • Frequently Asked Questions - Tuning Responses
    • QAing Al Conversations
      • Smart Flagging: Streamline Your AI Quality Assurance
    • Integrations
      • Alhena Website Chat SDK
        • Customizing Your Alhena Chat Widget
      • Integrating Alhena AI With Slack
      • Integrating Alhena AI With Discord
      • Integrating Alhena With Freshdesk
      • Integrating Alhena AI With Zendesk
      • Integrating Alhena AI With Email
      • Integrating Alhena AI With Shopify
      • Integration Alhena AI With Trustpilot
      • Integrating Alhena With Gorgias
      • Integrating Alhena With Kustomer
    • Notifications
    • Alhena Dashboard
      • Managing Team
Powered by GitBook
On this page
  1. Reference
  2. Website SDK - Custom data

Website SDK - Customer data with Agent

Gleen chat sdk allows passing the custom data. This data will be passed to AI for early processing or giving more context about the users. There are cases when this data is too big and shouldn't be passed to AI e.g. if user data is behind an API. This can be done with custom agent that will accepts the token/api_call params from chat sdk.

To get started:

We need to create an API agent in Gleen helpdesk (Gleen team can help build api agent). These agents may require token specific to each user to fetch the information.This is how we can support via Gleen AI chat SDK. In this case tokens needs to be passed as a private variable. This token needs to pass from chat sdk init.

Sample code example showing how to pass the token

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>

<!-- Loading of chat SDK -->
<script>
    // NOTE: the bearer token can be extracted from the browser/network call
    // using javascript
    let user_bearer_token = "<bearer_token_value>"
    document.gleenConfig = {
        company: 'gleen',
        userMetadata: {
            "_bearer_token" : user_bearer_token
        },
    };
</script>
<script src="https://app.alhena.ai/sdk/gleenWidget.js"></script>

</body>
</html>

PreviousWebsite SDK - Custom dataNextWebsite SDK - Internationalization

Last updated 2 months ago