Data Types

Introduction

What are Data Types?

Data types are a foundational component of Zowie Decision Engine that solve a critical challenge in business automation: making computer systems and human conversations work together seamlessly.

Think of data types as translators between:

  • What your business systems call things (like "ord_status_04" or "cust_seg_prem")
  • What these things actually mean in everyday language (like "Order Shipped" or "Premium Customer")

Without data types, an AI Agent might not understand that when your order system says "status_2," it means "In Transit" - leading to confusion in customer conversations. Data models ensure everyone (and every system) speaks the same language.

Technical Definition

From a technical perspective, data types create structured definitions that map internal system variables, API response fields, and database values to meaningful business concepts. They establish a standardized vocabulary that both machines and humans can understand, enabling consistent interpretation across all touchpoints in your automation ecosystem.

Purpose and Value

Data types in Decision Engine facilitate:

  1. Semantic Mapping: Translation of technical identifiers into natural language descriptors that both systems and humans can understand.
  2. Domain Alignment: Ensuring the AI agent interprets information according to specific business rules and procedures.
  3. Data Validation: Enforcing data quality through comprehensive validation mechanisms.
  4. Consistency: Standardizing data interpretation across all customer interactions and system integrations.

Key Components

1. Value Types

Data types support three primary value types:

  • Single Value: A standalone data point (e.g., email address, order ID)
  • List Value: A collection of related values (e.g., product list, available dates)
  • Compound Value: A structured collection of different data types (e.g., customer record with name, address, and contact information)

2. Data Types

Common data types supported:

  • Text
  • Number
  • Date
  • Boolean
  • Option (predefined choices)

3. Description

Each data type requires a clear description that:

  • Defines the purpose and meaning of the data
  • Provides context for the AI Agent to understand how to use the data
  • Enables accurate interpretation during customer interactions

For example:

  • "Email address associated with the customer's account"
  • "Unique identifier for the order in our system"
  • "The status of a payment that a customer has with Acme Inc."

4. Validation Methods

RegEx Validation

Regular Expression validation ensures data follows specific syntactic patterns:

  • Email Addresses: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
  • Phone Numbers: ^\d{10}$ (for 10-digit numbers)
  • Custom Format IDs: Can be defined according to business requirements

LLM-Based Validation

For complex, context-dependent validations where pattern matching is insufficient:

  • Package Descriptions: Validating that a package description contains appropriate terms
  • Free-Text Responses: Ensuring user inputs are relevant and appropriate
  • Complex Business Rules: Validating data against contextual business requirements

How to use Data Types?

With User Input Gatherer

Data types define what information the AI Agent will collect from customers:

  • Specifies required fields
  • Determines validation rules
  • Provides context for conversation flow
  • Enables the AI to collect multiple data points efficiently in a natural conversation

With User Message Block

When using data within User Message blocks:

  • The domain information from Data type enriches LLM prompts with relevant context
  • Enables personalized responses based on validated customer data
  • Supports dynamic message generation incorporating collected data

With Conditional Block

Data types enable sophisticated decision-making:

  • Validated data can trigger specific process paths
  • Complex business rules can be applied based on collected information
  • Enables personalized experiences based on customer data

With Script Block

Data types provide structured information for external system integration:

  • Ensures data sent to external APIs is properly formatted and validated
  • Maintains consistency between conversation data and system data
  • Supports complex integration scenarios with multiple systems

Best Practices

1. Clear Descriptions

Provide detailed explanations for each data type, including:

  • Its purpose within the business context
  • Important edge cases or special conditions
  • How it relates to other data types

2. Appropriate Validation

Choose the right validation method for each data type:

  • Use RegEx for structured data with predictable formats
  • Use LLM validation for free-text inputs that require contextual understanding
  • Consider business rules when designing validation logic

3. Consistent Naming

Maintain a consistent naming convention:

  • Use descriptive names that reflect the business meaning
  • Avoid technical jargon unless necessary
  • Ensure names are understandable by both technical and non-technical users

4. Reusability

Design data types for maximum reuse:

  • Create generic types that can be used across multiple processes
  • Focus on business concepts rather than process-specific implementation
  • Document relationships between types to facilitate understanding

5. Documentation

Maintain comprehensive documentation:

  • Explain the purpose of each data type
  • Document validation rules and their business rationale
  • Keep descriptions up-to-date as business requirements evolve

Examples

Example 1: Email Address

Type: Single value
Data Type: Text
Description: "Email address associated with the customer's account."
Validation: RegEx - ^[a-zA-Z0-9.%+-][a-zA-Z0-9.%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$

Example 2: Transaction

Type: Compound value
Structure:

  • id: Transaction ID (Text)
  • status: Payment Status (Text)

Description: "Transaction and all of the details that customer has with Acme Inc.."

Example 3: Cancellation Reason

Type: Single value
Data Type: Option
Options:

  • Too expensive
  • Too much product
  • Found alternative
  • Quality issues
  • Other

Description: "The reason provided by customer for cancelling their subscription."

Real-World Implementation

Data types transform customer interactions by:

  1. Streamlining Conversations: The AI Agent can collect necessary information in a natural, conversational way.
  2. Reducing Friction: Customers aren't asked for information they've already provided.
  3. Ensuring Accuracy: Validation prevents errors that could disrupt processes.
  4. Enabling Intelligence: Proper data modeling allows the AI to make contextually appropriate decisions.

For example, in a subscription cancellation flow, data types enable:

  • Verification of customer identity through validated email and verification code
  • Retrieval of subscription details using validated customer information
  • Collection of cancellation reason with appropriate options
  • Dynamic response offering alternatives based on the reason provided
  • Execution of the appropriate action in back-end systems