UChat Official

Introduction

This tutorial provides an in-depth overview of managing different subflow types within a workflow automation system, focusing on three main components: Subflows, Workflows, and Function Flows.

It guides users through creating, utilizing, and differentiating these elements to optimize automation processes, enhance user experience, and streamline repetitive tasks.

The content is structured into three parts: understanding subflow types, exploring workflow examples, and leveraging function flows for repeated tasks.


Detailed Breakdown of Subflows, Workflows, and Function Flows

Part 1: Understanding Different Subflow Types

Subflows are modular components that encapsulate specific sequences of actions, which can be reused or customized based on the context. The tutorial highlights three primary subflow types:

Subflow Type

Purpose & Characteristics

Use Cases

General Reset Flow

A flexible, general-purpose flow that varies based on the specific process. It acts as a foundational template for building flows like Facebook integration or other custom sequences.

Building specific social media flows, general automation sequences.

Workflow

Designed for backend operations, such as API calls or data processing that do not require user interaction. It runs asynchronously, ensuring the front-end remains unaffected, thus improving user experience.

Collecting data, API integrations, database updates, sending notifications without disrupting user flow.

Function Flow

A reusable, repeatable task processor that handles tasks needing multiple executions. It outputs data that can be used elsewhere, making it ideal for repetitive operations.

Processing user info, validation routines, or any task requiring multiple steps with outputs.

Key Points:

  • Creating a Subflow:

    • Access via the navigation bar.

    • Name the subflow appropriately.

    • Add steps as needed, depending on the subflow type.

  • Differences Summary:

    • General reset flow is flexible and broad.

    • Workflow operates in the background, ideal for time-consuming tasks.

    • Function flow is for repeated, modular tasks with outputs.

Part 2: Practical Workflow Examples

The tutorial demonstrates three distinct methods to trigger and run workflows, emphasizing flexibility and integration:

1. Triggered Workflow

  • Setup:

    • Add a trigger (e.g., button click).

    • Select a sequence (e.g., subscription sequence).

    • Define conditions if necessary.

    • Add actions such as API requests, database updates, or notifications.

  • Execution:

    • When a user interacts (e.g., clicks a subscribe button), the trigger activates.

    • The system runs the workflow in the background, subscribing the user to a sequence without disrupting the front-end interface.

  • Example:

    • User clicks "Subscribe" button.

    • Workflow subscribes user to a sequence seamlessly.

2. Calling a Workflow from Multiple Points

  • Method:

    • Add workflow calls in various places like keywords, sequences, or triggers.

    • Create the workflow first, then assign it to triggers or widgets.

  • QR Code Integration:

    • Generate a QR code linked to a workflow.

    • Users scanning the QR code can trigger the workflow directly, enabling quick, contactless interactions.

  • Use Case:

    • Embedding QR codes in marketing materials for instant engagement.

3. Linking to a Workflow via Navigation

  • Implementation:

    • Use a button (e.g., "Talk to Human") linked to a "Go to" workflow action.

    • Optionally, add prompts or messages before redirecting to inform users about ongoing processes.

  • Benefit:

    • Provides a smooth user experience with clear communication during transitions.

Part 3: Utilizing Function Flows for Repetitive Tasks

Function flows are designed for tasks that need to be executed multiple times or require output data for further processing.

Example: Get User Information

  • Scenario:

    • Check if user data exists.

    • If data exists, link it to an output (e.g., "Already Done").

    • If not, prompt the user for details like name, email, phone number.

  • Implementation Steps:

    1. Check Data:

      • If data exists, output "Already Done".

    2. Collect Data:

      • If no data, ask questions sequentially.

    3. Set Output:

      • Finalize with a "Finish" output, which can be used to confirm or proceed.

  • Integration:

    • Link the function flow in the main flow.

    • Handle outputs to decide next steps, such as sending confirmation messages or moving to the next process.

Advantages of Function Flows:

  • Reusable across multiple workflows.

  • Handle complex, multi-step processes efficiently.

  • Enable dynamic decision-making based on outputs.


Final Insights and Best Practices

  • Choosing the Right Subflow:

    • Use general reset flows for broad, flexible sequences.

    • Opt for workflow when performing backend, time-consuming tasks that should not interfere with user interaction.

    • Implement function flows for repetitive, modular tasks requiring outputs for further use.

  • Workflow Triggering Strategies:

    • Use trigger-based activation for immediate responses to user actions.

    • Call workflows from keywords, buttons, or QR codes for versatile engagement.

    • Link workflows via navigation buttons with prompts to maintain clarity.

  • Designing Effective Function Flows:

    • Incorporate conditional logic to handle existing data.

    • Use outputs to control subsequent steps dynamically.

    • Reuse function flows across multiple processes to save time and ensure consistency.

  • Best Practices:

    • Clearly name and organize subflows for easy management.

    • Test each workflow thoroughly to ensure seamless operation.

    • Use prompts and messages to keep users informed during background processes.

    • Leverage QR codes and widget integrations for enhanced accessibility.