Accounts
The Accounts page in the admin interface is designed for managing top-level accounts. These accounts serve as containers for configurations, data, and associated AI agents.
Permissions
Access to the Accounts page and its functionalities is primarily controlled by user permissions.
- Users with
owner
,admin
,editor
, oraccounts
permissions can generally view, add, and edit accounts. - Viewing or managing account secrets (Client Secrets) within the edit form or through dedicated buttons is typically restricted to users with
owner
, oradmin
permissions.
Adding a New Account
To create a new account:
- Navigate to the Accounts page.
- Expand the "New Account" section.
- A form will appear with the following fields:
- Account Name: The desired name for the new account.
- Status: A toggle to set the account as active (default) or inactive.
- Live Agent AI Assist: A toggle to enable/disable AI assistance for live agents (default: True).
- Live Agent AI Summary: A toggle to enable/disable AI-generated summaries for live agents (default: True).
- AI Assist Prompt: A dropdown to select a pre-defined prompt for AI assistance. (Populated if an account is already selected and has relevant prompts).
- AI Summary Prompt: A dropdown to select a pre-defined prompt for AI summaries. (Populated if an account is already selected and has relevant prompts).
- Logo Image Path: Path to the account's logo image.
- Logo Icon Path: Path to the account's icon image.
- Upon submission:
- A unique UID (Client ID) and a Secret (Client Secret) are automatically generated for the new account.
- The account details are saved to the database.
- Click the "Create Account" button.
Listing and Selecting Accounts
Existing accounts accessible to the logged-in user are displayed in a list:
- Each account is shown in an expandable section.
- The currently selected account is highlighted with a ":star: SELECTED ACCOUNT" prefix.
- The display includes the account name and a status icon (active/inactive).
- Expanding an account's section reveals:
- UID (Client ID)
- AI Summary Status
- Last Modified timestamp
- Each account entry has the following action buttons:
- Select: Makes this account the currently active one in the session. This action also resets the selected agent, updates user permissions for the new account context, and records this account as the user's last selected account.
- Edit: Opens the "Edit Account" form for this account.
- View Secret: (Permissions permitting) Displays the account's Client Secret.
- New Secret: (Permissions permitting) Generates a new Client Secret for the account and updates it in the database.
- Delete: Removes the account from the database.
Editing an Existing Account
To modify an existing account:
- Click the "Edit" button next to the desired account in the list.
- The "Edit Account" form will appear, pre-filled with the account's current information.
- The following fields can be modified:
- Account Name
- Status
- Live Agent AI Assist
- Live Agent AI Summary
- AI Assist Prompt
- AI Summary Prompt
- Logo Image Path
- Logo Icon Path
- The UID (Client ID) is displayed but is not editable.
- The Secret (Client Secret) is displayed (masked as a password field) if the user has appropriate permissions (
owner
,admin
); otherwise, it's not directly editable but is retained. - Buttons available within the edit form:
- Save Changes: Saves the modifications to the database.
- Cancel: Discards changes and closes the edit form.
Deleting an Account
To delete an account:
- Click the "Delete" button next to the desired account in the list.
- The system will attempt to remove the account record from the database.
- A success or error message will be displayed.
Session Management
- The page requires a user to be logged in.
- The
accountSelectedUId
from the Streamlit session state determines the currently active account context. - Selecting an account updates
accountSelectedUId
,agentSelectedUId
(toNone
), and user permissions in the session state. - The user's last selected account is stored to persist their choice across sessions.