Skip to main content

Trigger a Workflow within Conversation AI

Introduction

The Trigger a Workflow feature in Stack allows you to automate actions by connecting workflows within AI conversations. When a specified condition is met during a customer interaction, the AI bot will automatically initiate the chosen workflow. This automation streamlines operations, enhances user experience, and achieves desired outcomes without needing manual input for every condition. Let's walk through how to set up this feature.

Steps to Trigger a Workflow

Step 1: Access the Bot Goals Tab

  • Navigate to the Bot Goals tab.
  • Click on the Trigger a Workflow button to explore the available details.

Note: If you're creating a new bot, you may need to edit the bot's name or assign a new one before accessing this feature.

Step 2: Configure the Workflow Trigger

  • Click on the Trigger a Workflow button again to update the necessary details.

How to Set Up the Fields

To configure your workflow trigger, follow these steps:

  1. Action Name:

    • Assign a name to your action for easy identification later. For example, "Subscription Workflow".
  2. Select a Published Workflow to Trigger:

    • Choose the workflow you want to trigger from the dropdown menu. Ensure this workflow is already published. This workflow will activate when the specified condition is met.
  3. When to Trigger a Workflow:

    • Provide a short description of the condition that will trigger the workflow. This description guides the AI on when to activate the workflow. Examples include:
      • "Customer wants to purchase the subscription"
      • "Customer wants to book an appointment"

    This description helps the AI recognize the condition and trigger the workflow accordingly during the conversation.

  • Once you've completed these steps, click Save to finalize the settings.

By setting up these conditions, the bot will automatically trigger the specified workflow whenever the defined condition arises, streamlining the process and enhancing customer interactions.

Important Notes for Using Trigger Conditions

Crafting Effective Trigger Conditions

When defining trigger conditions such as "Customer wants to pay for a subscription" or "Customer wants to book an appointment", ensure that:

  • The bot naturally leads the conversation to ask related questions.
  • The customer's response aligns with the trigger condition.

For example, if the condition is "Customer wants to book an appointment", structure the prompt so the bot asks, "Would you like to book an appointment?" or something similar, encouraging the condition to arise naturally in the conversation.

Handling Duplicate Trigger Conditions

If a trigger condition matches multiple simultaneous conditions (e.g., updating contact info and triggering a workflow), the AI will determine which action to execute. For example:

  • Update Contact Info: Updates the date of birth when the user provides their DOB.
  • Trigger a Workflow: Initiates a workflow when the user provides their DOB.

In such cases, the execution depends on the AI’s prioritization, as both conditions share the same trigger.

Triggering Conditions from Bot or User Responses

A trigger condition can be activated based on responses from either the bot or the user. This flexibility ensures that workflows can be triggered regardless of whether the condition arises from the bot leading the conversation or the user initiating it.

Avoid Duplicating Published Workflows

Avoid setting up a Trigger a Workflow action for a workflow that is already published with the same trigger in Workflow Automation. This will prevent the workflow from executing twice and avoid unintended duplication of actions.