Rule-based Logic
Functionality, Implementation and Example
Specifications
Basic Settings
AI agents offer an innovative way to efficiently handle customer inquiries and automate standard processes.
Thanks to flexible configuration, agents can be precisely tailored to individual requirements. The creation is done in a few, clearly structured steps, described under the tabs listed above.
1. Define Specifications
This is the foundation for the AI agent. This includes:
-
Name: The agent’s name should reflect its remit, for example, “Instalment-Agent”.
-
Description: A short description helps grasp the purpose of the agent at a glance.
-
Topic: The topic arises from the available skill tags. For instance, an instalment agent could be assigned the skill tag “Payment Transactions”. The assignment ensures a clear organisational categorisation and, for example, simplifies access via the template catalogue.
-
Channels: Determine which communication methods the AI agent should operate – Email, Chat, Letter, Telephone, etc. An agent can easily be assigned to multiple channels.
2. Choose an 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?
-
Colour accents: Additionally, colours can be chosen that, for example, match the brand identity.
-
Recognition value: A uniform avatar across all channels enhances the visual appearance of the AI agent.
3. Configure Intelligence
This is where it’s decided how the AI agent solves tasks:
-
Smart argumentation logic: Rules in natural language without programming – ideal for standard processes.
-
Rule-based logic: Code-based workflows for more complex procedures.
4. Adjust Personality
The AI agent’s personality defines how it communicates – not just in content, but also in tone. The communication style can be fine-tuned using intuitive sliders:
-
Informal to formal: Should the AI agent be casual or businesslike?
-
Speaking style: From brief answers to detailed explanations.
-
Concise to comprehensive: Determines the level of detail in the feedback.
These adjustments ensure that the AI agent perfectly matches the company’s language and positively supports the customer experience.
All specifications – name, topic, intelligence, personality, and channels – can be adjusted flexibly at any time. This keeps the AI agent dynamic and always adjusted to current requirements.
Specifications
Basic Settings
AI agents offer an innovative way to efficiently handle customer inquiries and automate standard processes.
Thanks to flexible configuration, agents can be precisely tailored to individual requirements. The creation is done in a few, clearly structured steps, described under the tabs listed above.
1. Define Specifications
This is the foundation for the AI agent. This includes:
-
Name: The agent’s name should reflect its remit, for example, “Instalment-Agent”.
-
Description: A short description helps grasp the purpose of the agent at a glance.
-
Topic: The topic arises from the available skill tags. For instance, an instalment agent could be assigned the skill tag “Payment Transactions”. The assignment ensures a clear organisational categorisation and, for example, simplifies access via the template catalogue.
-
Channels: Determine which communication methods the AI agent should operate – Email, Chat, Letter, Telephone, etc. An agent can easily be assigned to multiple channels.
2. Choose an 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?
-
Colour accents: Additionally, colours can be chosen that, for example, match the brand identity.
-
Recognition value: A uniform avatar across all channels enhances the visual appearance of the AI agent.
3. Configure Intelligence
This is where it’s decided how the AI agent solves tasks:
-
Smart argumentation logic: Rules in natural language without programming – ideal for standard processes.
-
Rule-based logic: Code-based workflows for more complex procedures.
4. Adjust Personality
The AI agent’s personality defines how it communicates – not just in content, but also in tone. The communication style can be fine-tuned using intuitive sliders:
-
Informal to formal: Should the AI agent be casual or businesslike?
-
Speaking style: From brief answers to detailed explanations.
-
Concise to comprehensive: Determines the level of detail in the feedback.
These adjustments ensure that the AI agent perfectly matches the company’s language and positively supports the customer experience.
All specifications – name, topic, intelligence, personality, and channels – can be adjusted flexibly at any time. This keeps the AI agent dynamic and always adjusted 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 use defined input parameters to extract information from customer inquiries or other data sources and process them further. These parameters control which data is collected, analyzed, and used for processing.
Parameter Management
1. Input Parameters and Their Sources
Input parameters can be taken from various sources:
- Ticket data: Information from the original ticket
- Customer data: Master data of the customer
- Contract data: Information about the customer’s contract
- AI Extraction: Automatic AI analysis of the customer’s request to identify relevant information.
- Manual setting: A fixed value defined by a user.
2. Parameter Values and Mandatory Fields
Each parameter requires a value that is either automatically extracted or manually entered depending on the source. Mandatory fields ensure that certain information is always present.
3. Parameter Attributes
The following fields are available when configuring a parameter:
Field | Description |
---|---|
Reference to Source Key | Technical key for identification in the data object (e.g. channel ) |
Variable Name in Business Logic | Internal identifier for further processing in logic and actions |
Designation for User | Display name in the UI (if visible) |
Format | Data type: e.g. String , Boolean , Number , Date |
Internal Description | Explanation of function or use (only visible internally) |
Required | Does this parameter need to be set? Selection: Yes / No |
Visibility for User | Control of UI display: Visible , Hidden , Read-Only |
4. Visibility and Editing Restrictions
- Visible: The parameter is visible to editors.
- Hidden: The parameter is processed in the background but not displayed.
- Read-Only: The value is visible, but cannot be changed.
5. Necessity of a Parameter
- Yes: The parameter must necessarily be specified so that processing can take place with or through the AI agent.
- No: The parameter is optional and can be left blank.
Parameters can be removed at any time.
Example Bank Details
To process customer concerns about bank details 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.
Hence, the following input parameters are configured for this AI agent:
-
contractId
(Source: Contract data) → The customer’s contract number to assign the change to the right contract. -
newIBAN
(Source: Extraction from the customer request with AI) → The new bank account details the customer wishes to deposit. -
oldIBAN
(Source: Contract data) → The previously deposited IBAN for comparison with the new one. -
accountHolder
(Source: Extraction from the customer request 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 the customer request with AI) → If specified, the date from when the new bank details should be valid.
Summary
The predefined configuration of input parameters allows rule-based AI agents to process customer requests efficiently. In combination with the business logic, the data is structured, checked and automatically processed, resulting in precise processing 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.
Working principle
After the relevant input parameters have been captured, the business logic takes over the processing. This includes:
-
Checking for completeness and plausibility
-
Data validation 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 standard format.
-
Mandatory fields are checked, missing values are replaced with defaults, if necessary.
-
Type conversions (e.g.
bool
,int
,float
) are done 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 made to supplement additional information.
-
Calculations and decision processes are carried out based on the parameters (e.g. Branching in case of varying inputs).
3. Actions and Output of Results
-
The business logic controls further processing by:
-
Making automatic changes in the system
-
Calling external APIs (e.g. for data storage)
-
Generating queries or confirmations
-
-
The return is standardized as an answer object, which depending on the context, can contain a confirmation, error messages, or interaction options.
The business logic supplies results that are further processed via output handling. It determines how the AI agent reacts to certain scenarios - whether through confirmations, queries or interaction possibilities.
Example: Business Logic for Processing an IBAN Change
An AI agent processes requests for changing bank details. The business logic ensures that the change is correctly executed and all relevant checks are carried out.
1. Validate Inputs
First, 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 check digit verification
-
Contract Exists: The change must be assigned to a valid contract
3. Output Results and Determine Next Actions
Depending on the results of the checks, the business logic decides how the process continues:* If the checks are successful → IBAN is saved
- If errors are detected → Customer receives a query or opportunity for correction
4. Interaction design with the SDK
Interactions are the primary tool of Enneo to provide structured feedback to agents. An interaction consists of four elements:
- Infos: What messages or warnings should be displayed to the agent?
- Form: What input fields, e.g. text fields 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 specifying the Enneo API URL and a session token for authorization. If a source code executor is used, these environment variables are inserted at runtime and do not need to be set manually. If the SDK is integrated into its web service, ENNEO_API_URL
must be set 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 complete example of the interaction of the termination AI functionality shown above:
Summary
The business logic defines how an AI agent processes input parameters and makes decisions based on them. It ensures that customer requests are checked, validated and processed in a structured manner. Automated rules and processes efficiently manage and execute processes transparently, minimizing manual interventions.
Output handling
Functionality and Example
The Output handling defines 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 predefined 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 the results to other systems.
-
Automatic ticket actions: Entries into the system or closing of processes.
In Enneo, there are various action types that can trigger a reaction:
-
AI reply suggestion: The AI generates a reply to the customer based on the context.
-
Use text template: A defined message is sent directly.
-
Interaction: The user is given options for further processing.
-
Close ticket without answering: The request is automatically completed.
-
Send text template and close ticket: A confirmation is sent, and the ticket is closed.
Example: Output handling in the banking data agent
The banking data agent’s business logic 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 recorded (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 query to provide a correct IBAN.
-
Action: Use interaction or text template
-
Condition:
_action = iban_invalid
-
Automatic Execution: No → The user decides on the course of action.
3. IBAN has been successfully recorded
As soon as the IBAN has been successfully entered into the system (enter_into_system
), a confirmation will be sent to the customer:
-
Action: Use text template
-
Condition:
_action = enter_into_system
-
Automatic Execution: Yes → Message is sent directly.
Summary
The output management connects business logic with communication. It ensures that decisions are automatically transformed into actions – be it through direct confirmations, queries or follow-up processes. Thus, customer inquiries are handled efficiently, comprehensibly and without manual intervention.
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.