LogoLogo
  • Overview
  • Voice Assistants as a Service
  • Voice Assistant Concepts
  • Voice Assistant Components
  • Voice Assistant Types
  • Platform & Languages Supported
  • Getting Started
    • Integrating Slang CONVA into Retail e-Commerce Apps
      • Setting up Slang CONVA
      • Customizing the Assistant
      • Code Integration
        • CONVA Search
          • Advanced Topics
        • CONVA Plus
          • Supported User Journeys
            • Search
            • Order Management
            • Checkout
            • Offer Management
            • Navigation
    • Integrating Slang CONVA into Travel e-Commerce Apps
      • Setting up Slang CONVA
      • Code Integration - Basic Steps
      • Supported User Journeys
        • Search
        • Navigation
  • Advanced Topics
    • Asynchronous Action Handling
    • Changing the Assistant behavior at runtime
      • Launching the Assistant Programmatically
      • Changing the language of the Assistant
      • Accessing and Setting User Journey Context
    • Advanced Assistant Customizations
      • Customizing the Visual nature of the Assistant
      • Customizing the conversational aspects of the Assistant
      • Training the Assistant to recognize additional data
        • Customizing Retail Subdomain Data
  • Sample Apps
    • Slang Playground App
    • Slang Retail e-Commerce App
Powered by GitBook
On this page

Was this helpful?

  1. Advanced Topics
  2. Changing the Assistant behavior at runtime

Launching the Assistant Programmatically

Invoking the Assistant programmatically

Sometimes the app might want to launch the Slang Voice Assistant on its own, without the user explicitly launching it via the Trigger. This could be achieved by calling the startConversation API and passing the name of theUserJourney that is to be launched. The Assistant will speak out the greeting message associated with that user journey in that case.

SlangRetailAssistant.startConversation(AssistantUserJourney.SEARCH);
import SlangRetailAssistant, {
  RetailUserJourney,
} from 'slang-retail-assistant';

SlangRetailAssistant.startConversation(RetailUserJourney.SEARCH);
SlangRetailAssistant.startConversation(AssistantUserJourney.SEARCH);

PreviousChanging the Assistant behavior at runtimeNextChanging the language of the Assistant

Last updated 2 years ago

Was this helpful?