Dynamic Bot ID Mapping
Dynamic Bot ID Mapping
The Supervised AI Bots plugin utilizes a row-based indexing system to manage multiple chatbot instances. Instead of requiring complex unique identifiers or slugs, the plugin automatically assigns an ID based on the order in which you enter your chatbot URLs in the settings.
How Mapping Works
When you navigate to the Supervised AI Bots settings page, you are provided with a textarea to input your chatbot URLs. The mapping follows a simple top-to-bottom sequence:
- Row 1 corresponds to
id="1" - Row 2 corresponds to
id="2" - Row 3 corresponds to
id="3" - ...and so on.
Configuration Example
If you enter the following URLs into the settings textarea:
https://app.supervised.co/bot/sales-assistant
https://app.supervised.co/bot/customer-support
https://app.supervised.co/bot/technical-docs
The mapping will be assigned as follows:
| URL Row | Assigned ID | Shortcode to Use |
| :--- | :--- | :--- |
| https://app.supervised.co/bot/sales-assistant | 1 | [supervised_ai_bot id="1"] |
| https://app.supervised.co/bot/customer-support | 2 | [supervised_ai_bot id="2"] |
| https://app.supervised.co/bot/technical-docs | 3 | [supervised_ai_bot id="3"] |
Usage in Pages and Posts
To display a specific bot, use the [supervised_ai_bot] shortcode with the corresponding id attribute in your WordPress editor:
<!-- To display the Customer Support bot from the example above -->
[supervised_ai_bot id="2"]
Important Considerations
- Order Sensitivity: If you rearrange the URLs in the settings textarea, the IDs will change according to their new row positions. Ensure you update your shortcodes if you reorder the list.
- Empty Lines: Avoid leaving blank lines between URLs, as each line (including empty ones) may be counted toward the index depending on the input formatting.
- Sequential Loading: The plugin reads the list dynamically; there is no need to manually register IDs elsewhere in the database. Simply update the list and save settings to apply changes.