await_response.mdx


Overview

The Await response component is designed to halt a workflow and wait for user input before proceeding. It initiates a conversation with the user and collects key information through predefined forms. This component is typically used in conversational workflows or agent-based interactions where user input is required to continue the process.


Purpose and Functionality


Detailed Explanation

Configurations

1. Guiding Question

2. Message

3. Input Variables

Supported Input Types:

Type

Description

Single-line text

Accepts a single line of text without line breaks.

Paragraph text

Accepts multi-line text input with line breaks.

Dropdown options

User must select one value from a predefined list of options (at least one option required).

File upload

Allows uploading one or multiple files.

Number

Accepts numeric input.

Boolean

Toggle input (on/off).


Usage Example

Imagine a support chatbot workflow where the bot needs the user’s email and a description of their issue before escalating:

The Await response component will display the message, pause the workflow, and wait until the user provides the required inputs.


Implementation Details and Algorithms


Integration and Interaction


Mermaid Flowchart Diagram

flowchart TD
    A[Await Response Component] --> B{Display Message?}
    B -- Yes --> C[Select Random Message]
    C --> D[Send Message to User]
    B -- No --> D
    D --> E[Define Input Variables]
    E --> F{For each variable}
    F --> G[Collect User Input]
    G --> H{Is input valid and mandatory?}
    H -- Yes --> I[Store Input]
    H -- No --> G
    I --> J{All inputs collected?}
    J -- No --> G
    J -- Yes --> K[Resume Workflow]

Diagram Explanation:


Summary

The Await response component is a critical building block for workflows requiring user interaction. It is flexible, supporting multiple input types and validation rules, and offers an engaging user experience through message randomization. Integration via API ensures it can be programmatically controlled and embedded within larger conversational systems.


End of Documentation for await_response.mdx