Chatbot Kit

Get Scenario Data

The Get Scenario Data workflow provides a simple way to retrieve structured configuration for chatbot scenarios. Each scenario includes its own prompt, rules, mood options, animations, and text-to-speech (TTS) settings, allowing your chatbot to adapt behavior and personality dynamically.

How It Works

  1. Triggered by Another Workflow

    • This workflow is designed to be executed by other workflows.
    • Input: scenario → the key identifying which scenario’s configuration should be retrieved.
  2. Scenarios Definition

A predefined list of scenarios is stored inside the workflow. Each scenario contains:

  • prompt → system instruction for the chatbot’s role.
  • rules → constraints or behavioral guidelines.
  • mood → array of emotional tones available.
  • animation → available animation states.
  • tts-prompt → detailed TTS voice and delivery instructions.
  • tts-voice → voice name to use.
  1. Get Scenario Data

    • Looks up the provided scenario key in the stored definitions.
    • Returns the selected scenario’s full configuration as scenarioData.

Workflow Structure

  • Input: scenario (string, e.g. "customer-service")
  • Nodes:
    • Scenarios Definition → holds all available scenarios.
    • Get Scenario Data → extracts and returns the requested scenario object.

Example

Input

{
  "scenario": "" // Key of the desired scenario (e.g. "customer-service" or "wellness-center").
}

Output

{
  "scenario": "", // The key of the requested scenario.
  "scenarioData": {
    "prompt": "", // The system prompt defining the chatbot's role and behavior.
    "rules": "", // Specific rules and constraints for the chatbot.
    "mood": [], // Array of moods the chatbot can express.
    "animation": [], // Array of animation states available for the chatbot.
    "tts-prompt": "", // Instructions for the TTS voice and style.
    "tts-voice": "" // The name of the TTS voice to use.
  }
}

Usage in Your Chatbot

This workflow is called from chat and text-to-speech workflows to dynamically load scenario configurations.

  • Pass the scenario key to retrieve the corresponding setup.

  • Use the returned scenarioData to:

    • Set chatbot prompts and rules.
    • Choose mood and animation states.
    • Configure TTS voice and style.

Default Configuration

  • Comes preloaded with two scenarios:

    • customer-service
    • wellness-center
  • Easily extendable by adding more entries in the Scenarios Definition node.