Relay

Embeddable AI chat panel for third-party websites. A side-tab that slides open to reveal your AI persona, configured from your Viva dashboard.

Single Script Tag Side-Panel UI Channel Tracking Intent Presets

Quick Start

Add a side-panel AI chat to any website with a single script tag. Relay renders a vertical tab on the edge of the page that slides open to reveal a full chat experience powered by your Viva AI persona.

First, create your Viva account at goviva.ai/business-signup to get your Business ID. Then configure your AI persona and Relay settings in the dashboard (Settings → Relay).

Copy & Paste Installation

Add this snippet before the closing </body> tag:

<script src="https://goviva.ai/microsite-widget/loader.js"
  data-business-id="YOUR_BUSINESS_ID"
  data-channel="your-channel-name"
  async></script>

Replace YOUR_BUSINESS_ID with your Business ID from the Viva dashboard (Settings → Integrations), and your-channel-name with a channel you've created in the Channels page.

That's it! A vertical tab will appear on the right edge of the page. Click it to slide open the AI chat panel.

How It Works

  1. Script Load — The loader script is added to the host page via a single <script> tag with data-* attributes for configuration.
  2. Config Fetch — The loader calls the Relay config API to retrieve the title, color, position, suggestion pills, and intent settings for your business.
  3. CSS & JS Injection — The loader injects the Relay stylesheet and main JavaScript file into the host page. Styles are scoped to avoid conflicts.
  4. Side-Tab Render — A vertical "notch" tab is rendered on the page edge. Clicking it slides open a chat panel where visitors interact with your AI persona via streaming responses.

Data Attributes

Configure Relay using data-* attributes on the script tag:

Attribute Required Description
data-business-id Yes Your Viva Business ID. Determines which AI persona powers the chat.
data-channel No Channel slug for tracking which site the widget is embedded on. Create channels in the Viva dashboard under Channels.
data-intent No Sets the AI's conversational intent. Use a preset (show-products, donate, register) or custom text.

Example with All Attributes

<script src="https://goviva.ai/microsite-widget/loader.js"
  data-business-id="4685"
  data-channel="partner-site"
  data-intent="show-products"
  async></script>

Intent Presets

The data-intent attribute controls how the AI persona behaves in the chat. You can use built-in presets or provide custom text.

Intent Behavior
show-products AI proactively showcases products and guides visitors toward purchases.
donate AI focuses on donation goals, sharing impact stories and guiding to donate.
register AI encourages visitors to sign up for events, programs, or memberships.
Custom text Any free-form text becomes the AI's conversational goal. Example: data-intent="Help visitors find the right course"

You can also configure a default intent in the Viva dashboard (Settings → Relay). The data-intent attribute on the script tag overrides the dashboard default.

Channels

Channels let you track where Relay is embedded and view per-site analytics. Each channel has its own embed code with a unique data-channel slug.

Creating a Channel

  1. Go to business.goviva.ai/channels
  2. Click Add Channel
  3. Enter a slug (e.g., partner-site), display label, and website URL
  4. Copy the generated embed code

Channel Analytics

Click any channel in the dashboard to see conversations, orders, and revenue attributed to that embed location.

Dashboard Settings

Most Relay configuration is managed in the Viva dashboard rather than in code. Go to Settings → Relay to configure:

Setting Description
Enable Relay Master toggle to activate or deactivate the widget across all channels.
Tab Label Text displayed on the vertical side tab (e.g., "Chat with us").
Theme Color Hex color for the side tab and chat panel header.
Position Which side of the page the tab appears on: Right or Left.
Suggestion Pills Comma-separated quick-action prompts shown to visitors when the panel opens.

Changes to dashboard settings take effect immediately — no need to update the embed code on your site.

Colors & Position

The theme color set in the dashboard controls the side tab background, chat panel header, and accent colors throughout the UI. Use any hex color value.

Position determines which edge of the viewport the tab attaches to:

Value Description
right Default. Tab appears on the right edge of the page.
left Tab appears on the left edge of the page.

Suggestion Pills

Suggestion pills are quick-action buttons displayed when the chat panel opens. They help visitors start a conversation without typing. Configure them as a comma-separated list in the dashboard.

Example pills: View services, Book appointment, Contact us

Live Embed Example

Here is an example of a Relay embed for a partner website:

<script src="https://goviva.ai/microsite-widget/loader.js"
  data-business-id="4685"
  data-channel="imh-website"
  data-intent="show-products"
  async></script>

This embeds Viva's AI persona on the IMH website with the show-products intent. The AI proactively showcases products to visitors and tracks analytics under the imh-website channel.

Troubleshooting

Tab Not Appearing

  1. Check Relay is enabled: Go to Settings → Relay in your Viva dashboard and verify the toggle is on.
  2. Verify Business ID: Ensure the data-business-id matches your dashboard (Settings → Integrations).
  3. Check console for errors: Open DevTools (F12) → Console and look for [MicrositeWidget] messages.
  4. Check for script conflicts: Ad blockers or CSP policies may block the loader script.

Chat Not Responding

  1. Verify your AI persona is configured in the dashboard.
  2. Check that your knowledge base has content for the questions being asked.
  3. Look for network errors in DevTools → Network tab (requests to api.goviva.ai).

Styling Conflicts

Relay injects its own scoped CSS. If you experience z-index issues, the panel uses a high z-index value. Ensure no other elements on your page use a competing stacking context.

Ad Blockers: Some ad blockers may block third-party widget scripts. If the tab doesn't appear for some users, this may be the cause.

Support