Build Your First Process

Step 1: Define Your Data Models

Before creating processes, it's essential to define your data models—the foundation of any successful automation.

What Are Data Models?

Data models in Zowie Decision Engine act as translators between your business systems and human conversations. They create structured definitions that ensure both your AI and your systems are speaking the same language.

Think of data models as blueprints that define:

  • What information your automation needs to collect
  • How that information should be validated
  • How the information relates to your business context

For example, a simple "Email Address" data model includes:

  • Type: Single value
  • Data Type: Text
  • Description: "Email address associated with the customer's account"
  • Validation: RegEx pattern to ensure proper email format

More complex data models might include "Order Details" (a compound value with multiple fields) or "Cancellation Reasons" (a list of predefined options).

Creating Basic Data Models for Your Process

Before building your process, create data models for the information you'll need to collect, such as:

  1. Customer Identifiers: Email addresses, account numbers, or phone numbers
  2. Transaction Data: Order IDs, subscription details, or product information
  3. Customer Inputs: Problem descriptions, feedback, or preferences

Note: For comprehensive details on data model types, validation methods, and best practices, refer to the "Data Models in Zowie Decision Engine" section in the Technical Documentation.

Step 2: Create a New Process

To start building your first automated process:

  • Navigate to the Processes section in the AI Agent menu
  • Click the "Create new" button in the top-right corner
  • Give your process a descriptive name (e.g., "Product Support," "Order Returns")
  • Your new process will open in the Process Builder with a blank canvas

Step 3: Understanding Building Blocks

Zowie Decision Engine uses six essential building blocks that form the foundation of all process automation:

  • User Input Gatherer - Collects information from customers
  • User Message Block - Delivers responses to customers
  • Conditional Block - Creates branching paths based on conditions
  • Script Block - Implements custom logic and integrations
  • Call Another Process - Embeds reusable workflows
  • Finish Block - Concludes the process

These blocks can be combined in countless ways to create automations that handle even the most complex customer interactions.

Want to learn more? For comprehensive details about each building block and their advanced configuration options, refer to the "Building Blocks in Zowie Decision Engine" section in the Technical Documentation. For information on how building blocks interact with data structures, see the "Data Models in Zowie Decision Engine" documentation.

Step 4: Start With a User Message

Most processes begin by greeting the customer and setting expectations:

  1. Click the speech bubble icon in the building block toolbar to add a User Message Block
  2. In the configuration panel, select "Use LLM" to enable AI-generated responses
  3. Provide guidelines for the message (e.g., "Greet the customer and ask how you can help with their product")
  4. Click "Save" to add the block to your process

Step 5: Gather User Information

Next, collect the information you need from the customer:

  1. Click the input icon to add a User Input Gatherer block
  2. Click "Add" to select the data you want to collect (e.g., order number, email address)
  3. Select from the data models you defined in Step 1
  4. Enable "Scan historical messages" to extract information the customer may have already provided
  5. Set attempt limits to prevent conversation loops (usually 2-3 attempts)
  6. Add guidance text to help the AI collect the information naturally
  7. Configure success conditions to determine what happens when data is collected
  8. Click "Save" to add the block to your process

Step 6: Implement Business Logic

With customer information collected, you can now implement your business logic:

  1. Add a Script Block to connect to your external systems
  2. Write JavaScript code to process the collected data, such as:
    javascript
// Example: Retrieve order details from API
const orderNumber = context.get("orderNumber");
const response = await http.get(`https://api.example.com/orders/${orderNumber}`);

if (response.status === 200) {
  context.set("orderDetails", response.data);
  block.finish("success");
} else {
  block.finish("fail");
}
  1. Configure success and failure paths
  2. Click "Save" to add the block to your process

Step 7: Add Conditional Logic

Now, create different paths based on the information you've gathered and processed:

  1. Add a Conditional Block
  2. Choose between Creator mode (for simple conditions) or Code mode (for complex logic)
  3. Select the data to evaluate (e.g., order status)
  4. Define comparison operators (equals, contains, greater than, etc.)
  5. Configure what happens for each condition outcome
  6. Add a fallback condition for unexpected scenarios
  7. Click "Save" to add the block to your process

Step 8: Deliver Custom Responses

Based on your conditional logic, provide custom responses to the customer:

  1. Add User Message Blocks for each scenario
  2. Configure each message with specific guidelines based on the path
  3. Add relevant data references to personalize responses (e.g., orderDetails.status)
  4. Click "Save" for each block

Step 9: Reuse Common Processes

If your automation includes common workflows (like verification):

  1. Add a Call Another Process Block
  2. Select an existing process (e.g., "Account Verification")
  3. Configure what happens when the sub-process completes
  4. Click "Save" to add the block

Step 10: Conclude the Process

Finally, add a Finish Block to properly conclude your process:

  1. Click the checkmark icon to add a Finish Block
  2. Configure the completion action (exit or return to parent process)
  3. Click "Save" to finalize your process flow

Step 11: Test and Refine

Before deploying your process:

  1. Click "Save" to save all changes
  2. Use the "Test out your AI Agent" button at the bottom of the left sidebar
  3. Walk through your process as a customer would
  4. Note any issues or opportunities for improvement
  5. Return to the Process Builder to make adjustments

Real-World Example: Product Support Process

Let's look at how a complete product support process might flow:

  1. User Message Block: Greets customer and asks how it can help with product issues
  2. User Input Gatherer: Collects product name and issue description
  3. Conditional Block: Branches based on issue type (technical, billing, etc.)
  4. Script Block: Retrieves product documentation or account details
  5. User Message Block: Provides troubleshooting steps or account information
  6. User Input Gatherer: Checks if the solution resolved the issue
  7. Conditional Block: Branches based on resolution status
  8. Call Another Process: Escalates to specialized support if needed
  9. Finish Block: Concludes the interaction

Best Practices for Process Automation

As you build more complex processes, keep these best practices in mind:

  • Design data models first: Well-structured data models make process building much easier
  • Start simple: Begin with core functionality and expand gradually
  • Test frequently: Verify each component works as expected
  • Consider edge cases: Add conditional handling for unexpected inputs
  • Use clear guidance: Help the AI understand exactly how to interact
  • Leverage data validation: Use appropriate validation methods (RegEx or LLM-based) to ensure quality data
  • Create reusable components: Build modular processes that can be combined