Rule-Based Logic
Functionality, Implementation and Example
Specifications
Basic Settings
AI Agents offer an innovative way to handle customer inquiries efficiently and automate standard processes. Thanks to the flexible configuration, agents can be precisely tailored to meet individual requirements. The creation is done in a few, clear steps which are described under the tabs listed above.
1. Define Specifications
Here the foundation for the AI agent is laid. This includes:
-
Name: The name of the agent should reflect the area of responsibility, e.g. “Instalment Agent”.
-
Description: A brief description helps to grasp the purpose of the agent at a glance.
-
Topic: The topic arises from the existing skill tags. For example, an instalment agent could be assigned to the skill tag “Payments”. The assignment ensures clear organizational assignment and, for example, facilitates access via the template catalog.
-
Channels: Determine through which communication channels the agent should act - Email, chat, letter, phone, etc. An agent can easily be assigned to multiple channels.
2. Choose Avatar
The avatar gives the AI agent a visual identity and emphasizes its individual character. Various options are available:
-
Style: Should the avatar appear more professional, friendly, or neutral?
-
Color Accents: In addition, colors can be selected that, for example, match the brand identity.
-
Recognition Value: A uniform avatar across all channels strengthens the visual appearance of the agent.
3. Configure Intelligence
This decides how the agent solves tasks:
-
Smart Argument Logic: Rules in natural language without programming - ideal for standard processes.
-
Rule-based Logic: Code-based workflows for more complex procedures.
4. Customize Personality
The agent’s personality defines how it communicates - not only in terms of content, but also in tone. Communication style can be finely adjusted via intuitive sliders:
-
Informal to Formal: Should the agent appear relaxed or businesslike?
-
Speaking Style: From brief answers to detailed explanations.
-
Concise to extensive: Determines the depth of detail of the feedback.
These adjustments ensure the agent fits perfectly with the company’s language and positively supports the customer experience.
All specifications - name, topic, intelligence, personality, and channels - can be flexibly adjusted at any time. This keeps the agent dynamic and always adapted to current requirements.
Specifications
Basic Settings
AI Agents offer an innovative way to handle customer inquiries efficiently and automate standard processes. Thanks to the flexible configuration, agents can be precisely tailored to meet individual requirements. The creation is done in a few, clear steps which are described under the tabs listed above.
1. Define Specifications
Here the foundation for the AI agent is laid. This includes:
-
Name: The name of the agent should reflect the area of responsibility, e.g. “Instalment Agent”.
-
Description: A brief description helps to grasp the purpose of the agent at a glance.
-
Topic: The topic arises from the existing skill tags. For example, an instalment agent could be assigned to the skill tag “Payments”. The assignment ensures clear organizational assignment and, for example, facilitates access via the template catalog.
-
Channels: Determine through which communication channels the agent should act - Email, chat, letter, phone, etc. An agent can easily be assigned to multiple channels.
2. Choose Avatar
The avatar gives the AI agent a visual identity and emphasizes its individual character. Various options are available:
-
Style: Should the avatar appear more professional, friendly, or neutral?
-
Color Accents: In addition, colors can be selected that, for example, match the brand identity.
-
Recognition Value: A uniform avatar across all channels strengthens the visual appearance of the agent.
3. Configure Intelligence
This decides how the agent solves tasks:
-
Smart Argument Logic: Rules in natural language without programming - ideal for standard processes.
-
Rule-based Logic: Code-based workflows for more complex procedures.
4. Customize Personality
The agent’s personality defines how it communicates - not only in terms of content, but also in tone. Communication style can be finely adjusted via intuitive sliders:
-
Informal to Formal: Should the agent appear relaxed or businesslike?
-
Speaking Style: From brief answers to detailed explanations.
-
Concise to extensive: Determines the depth of detail of the feedback.
These adjustments ensure the agent fits perfectly with the company’s language and positively supports the customer experience.
All specifications - name, topic, intelligence, personality, and channels - can be flexibly adjusted at any time. This keeps the agent dynamic and always adapted to current requirements.
Detection
Methods and Configuration
In the Detection section, it is defined when an AI agent is assigned to a ticket. This can be based on keywords, ticket data or AI analysis.
Authentication
If this option is activated, requests from non-authenticated customers will be ignored by the AI agent. This setting is particularly suitable for processes involving sensitive data or requiring customer verification.
Detection Methods
Various methods are available for assigning AI agents:
Input Parameters
Purpose and configuration
Rule-based AI agents utilize defined input parameters to extract information from customer inquiries or other data sources and further process it. These parameters control which data is captured, analyzed, and used for processing.
Parameter Management
1. Input parameters and their sources
Input parameters can originate from various sources:
-
Ticket data: Information from the original ticket
-
Customer data: The customer’s master data
-
Contract data: Information about the customer’s contract
-
Extraction by AI: Automatic AI analysis of the customer inquiry to identify relevant information.
-
Manual setting: A fixed value defined by a user.
-
Obtained from the executor: Parameters that result from business logic and are only available during processing.
2. Parameter values and mandatory fields
Each parameter requires a value, which, depending on the source, is automatically extracted or manually entered. Mandatory fields ensure that certain information is always present.
3. Parameter attributes
-
Key: Unique identification of the parameter.
-
Name: Describes the parameter for better readability.
-
Format: Indicates the data type, e.g., string, date, or Boolean.
-
Visibility: Determines whether the parameter is visible, hidden, or read-only:
4. Visibility and editing restrictions
-
Visible: The parameter is viewable for editors.
-
Hidden: The parameter is processed in the background but not displayed.
-
Read-only: The value is visible but cannot be changed.
5. Requirement of a parameter
-
Yes: The parameter must be specified so that processing can take place with or through the AI agent.
-
No: The parameter is optional and can be left empty.
Example Bank Data
To handle customer concerns about bank data adjustments, the bank data agent needs a combination of certain information and checks. It obtains the relevant information via the input parameters, while the checks are defined in the business logic.
The following input parameters are therefore configured for this AI agent:
-
contractId
*(Source: Contract data)*→ The customer’s contract number to associate the change with the correct contract. -
newIBAN
*(Source: Extraction from customer inquiry with AI)*→ The new banking details that the customer wishes to deposit. -
oldIBAN
*(Source: Contract data)*→ The previously deposited IBAN to compare with the new one. -
accountHolder
*(Source: Extraction from customer inquiry with AI)*→ The name of the account holder to verify the identity. If no name is mentioned, the value remains empty. -
date
*(Source: Extraction from customer inquiry with AI)*→ If specified, the date from when the new banking details should be valid.
Summary
The predefined configuration of input parameters allows rule-based AI agents to process customer concerns efficiently. In combination with the business logic, the data is structured, checked, and automatically processed, resulting in precise handling with minimal manual effort.
Business Logic
Functionality and example
The business logic defines how an AI agent processes input parameters and makes decisions based on them. It ensures that customer inquiries are structured, checked, processed, and correctly executed.
Functionality
After the relevant input parameters have been captured, the business logic takes over the processing. This includes:
-
Completeness and plausibility checks
-
Validation of data based on predefined rules
-
Determination of additional values, if necessary
-
Triggering of actions based on the results of the checks
Technical Implementation
The business logic can be implemented in:
-
PHP (8.2)
-
Python (3.11)
-
JavaScript (Node 20)
The implementation follows a structured processing pipeline:
1. Initialization and input validation
-
Input parameters are taken from the context and converted into a standardized format.
-
Mandatory fields are checked, missing values are replaced by defaults if necessary.
-
Type conversions (e.g.,
bool
,int
,float
) take place to ensure consistent processing.
2. Rule-based processing
-
The business logic validates the inputs based on defined rules (e.g., format checks, plausibility checks).
-
If necessary, external API calls or database queries are performed to supplement additional information.
-
Calculations and decision processes are based on the parameters (e.g., branching for deviating inputs).
3. Actions and result output
-
The business logic controls the further process by:
-
Making automatic changes in the system
-
Calling external APIs (e.g., for data storage)
-
Generating queries or confirmations
-
-
The return occurs in a standardized format as a response object that can contain a confirmation, error hints, or interaction options depending on the context.
The business logic delivers results that are further processed via output handling. There it is specified how the AI agent responds to certain scenarios - be it confirmations, queries, or interaction options.
Example: Business Logic for Processing an IBAN Change
An AI agent processes requests for changing a bank connection. The business logic ensures that the change is correctly made and all relevant checks are carried out.
1. Validate inputs
Firstly, the inputs are standardized and checked:
-
Remove spaces in the IBAN
-
If no account holder is specified, it is supplemented from the contract data
2. Validate inputs
The business logic checks whether the new IBAN is correct:
-
IBAN validation: Format and checksum verification
-
Contract exists: The change must be associated with a valid contract
3. Output result and determine next action
Depending on the result of the checks, the business logic decides how the process continues:
-
If the checks are successful → IBAN is saved
-
If errors were detected → Customer receives a query or possibility for correction
4. Interaction Design with the SDK
Interactions are the main tool of Enneo to provide agents with structured feedback. An interaction consists of four elements:
- Info: What messages or warnings should be displayed to the agent?
- Form: What input fields, e.g. text boxes or dropdown menus, should be displayed?
- Data: What values do the input fields have?
- Options: What buttons should be displayed to the user?
To create an interaction, the Enneo SDK can be used, a library with object definitions. The above interaction can be created with this code:
Note: The Enneo SDK requires environment variables that specify the Enneo API URL and a session token for authorization. If a source code executor is used, these environmental variables are inserted at runtime and do not need to be set manually. When integrating the SDK into your own web service, you need to set ENNEO_API_URL
to https://instance-name.enneo.ai
and ENNEO_SESSION_TOKEN
to a service worker token.
Instead of the SDK, the JSON object for the interaction can also be created directly. Here is a full example of the interaction for the termination AI functionality shown above:
Summary
Business logic defines how an AI agent processes input parameters and makes decisions based on them. It ensures that customer inquiries are structured, checked, validated, and processed accordingly. Automated rules and procedures efficiently control processes and execute them transparently, minimizing manual interventions.
Output Handling
Functioning and example
Output handling determines how the AI agent reacts to the results of the business logic. It determines whether and how information is returned to the user or a system.
Basic Functionality
Output handling is based on predetermined rules that build on the results of the business logic. It controls, among other things:
-
Text templates: Automatic messages to the user, e.g. confirmations or queries.
-
Interactions: Provision of buttons or forms for further processing.
-
API calls: Forwarding of the results to other systems.
-
Automatic ticket actions: Entries in the system or completion of operations.
In Enneo, there are different types of actions that can trigger a response:
-
AI suggestion for answer: The AI generates an answer to the customer based on context.
-
Use text template: A defined message is sent directly.
-
Interaction: The user is given options for further processing.
-
Close ticket without responding: The issue is automatically completed.
-
Send text template and close ticket: A confirmation is sent, and the ticket is closed.
Example: Output handling in the bank details agent
The business logic of the bank details agent makes decisions based on the input parameters. The output handling builds on this and controls the reaction.
1. IBAN is already in the system
If the new IBAN is already stored (iban_already_in_system
), a text template is automatically sent to the customer:
-
Action: Use Text template
-
Condition:
_action = iban_already_in_system
-
Automatic execution: Yes → Message is sent fully automated.
2. IBAN is invalid
If the business logic recognizes the new IBAN as invalid (iban_invalid
), an alternative action is executed. The customer receives a request to provide a correct IBAN.
-
Action: Interaction or Use text template
-
Condition:
_action = iban_invalid
-
Automatic execution: No → The user decides on the further course of action.
3. IBAN has been successfully stored Once the IBAN has been successfully entered into the system (enter_into_system
), a confirmation is sent to the customer:
-
Action: Use text template
-
Condition:
_action = enter_into_system
-
Automatic Execution: Yes → Message is sent directly.
Summary
The output handling connects the business logic with communication. It ensures that decisions are automatically converted into actions - be it by direct confirmations, queries, or subsequent processes. This way, customer requests are handled efficiently, transparently, and without manual interventions.
Testing and Publishing
Operating Mechanism
Test cases simulate real scenarios to ensure that the AI agent is functioning correctly. Each test case is based on a ticket ID and reflects the entire processing process. Regular tests ensure that the AI agent operates stably and reliably, even with changed requirements or system updates.
Test Procedure
-
A real ticket ID is selected and added.
-
The AI agent processes the ticket based on the defined logic.
-
The result is displayed as successful or failed.
Result Interpretation
-
Successful: The test confirms that the AI agent is responding as intended. The AI agent can now be published.
-
Failed: In this case, the existing settings need to be examined. Instructions, detections, input parameters, business logic, and/or output handling should be investigated for possible inconsistencies. After making the adjustment, the test should be run again.