Business Rules and Validations
3.18.5 Business Rules and Validations
- Mandatory Fields
- Rule: All fields within the Channel Integration – Website module are required to ensure comprehensive theme and branding configuration.
- Validation: Users cannot save settings unless all required fields are filled with valid data.
- Error Handling: Display error messages for any missing or invalid fields, preventing the save action until resolved.
- Unique Domain Whitelisting
- Rule: Each domain can only be whitelisted once to prevent duplication and conflicts.
- Validation:
- Check existing whitelisted domains before adding a new one.
- Prevent the addition of duplicate domains.
- Error Handling:
- If a duplicate domain is entered, display an error message indicating that the domain is already whitelisted.
- Suggest reviewing the existing whitelisted domains before attempting to add duplicates.
- Color Picker Usage
- Rule: All fields that involve color customization utilize a color picker to ensure accurate and consistent color selection.
- Validation:
- Ensure that the color picker interface is user-friendly and supports various color formats (e.g., HEX, RGB).
- Validate that the selected colors meet accessibility standards (e.g., sufficient contrast).
- Error Handling:
- If an invalid color code is entered manually, display an error message prompting the user to select a valid color using the color picker.
- Highlight the color field to indicate the error.
- Bubble Style Selection
- Rule: Users must select one of the four available bubble styles to define the chatbot’s chat bubble appearance.
- Validation:
- Ensure that one bubble style is selected before allowing the save action.
- Error Handling:
- If no bubble style is selected, display an error message prompting the user to choose a bubble style.
- Highlight the Bubble Style section to indicate the requirement.
- Chat Window Appearance
- Rule: The Maximized Window and Minimized Window appearances must adhere to the predefined styles to maintain consistency.
- Validation:
- Ensure that only the available styles (Curved Edge, Normal Edge for Maximized; Rectangle, Circle for Minimized) are selectable.
- Error Handling:
- Prevent selection of unsupported styles and display an error message if an attempt is made to choose an undefined style.
- Highlight the relevant section to guide the user towards correct selections.
- Font Style Consistency
- Rule: The selected Font Style should be consistently applied across all chatbot text to ensure a uniform appearance.
- Validation:
- Verify that the chosen font is supported and renders correctly in different browsers and devices.
- Error Handling:
- If an unsupported font is selected, display an error message prompting the user to choose a different font style.
- Highlight the Font Style field to indicate the issue.
- Short URL and QR Code Validations
- Short Code Alias:
- Rule: The short code alias must be unique and adhere to predefined formatting rules (e.g., alphanumeric characters only).
- Validation: Check for uniqueness and proper formatting before allowing the creation or editing of the alias.
- Error Handling: Display an error message if the alias is already in use or does not meet formatting criteria.
- QR Code Generation:
- Rule: The generated QR code must accurately represent the short URL and be scannable.
- Validation: Ensure that the QR code generation process completes without errors and that the code is functional.
- Error Handling: If QR code generation fails, display an error message and suggest retrying the process.
- Integration Script Validation
- Rule: The generated integration script must be free from syntax errors and compatible with various website environments.
- Validation: Perform automated checks to ensure the script is correctly formatted and functional.
- Error Handling: If the script contains errors, notify the user and provide guidance on resolving the issues.
Next