ID Mapping
ID Mapping
The Supervised AI Bots plugin uses a simple numerical mapping system to connect your shortcodes to the chatbot URLs defined in your settings. This allows you to manage multiple chatbots from a single configuration page.
How Mapping Works
The id attribute in the [supervised_ai_bot] shortcode corresponds directly to the line number (row) of the URL you entered in the plugin settings textarea.
- Navigate to the Supervised AI Bots settings page in your WordPress dashboard.
- Enter your chatbot URLs, ensuring each URL is on its own line.
- The first URL corresponds to
id="1", the second toid="2", and so on.
Configuration Example
If your settings textarea looks like this:
https://agent.supervised.co/bot-alpha
https://agent.supervised.co/bot-beta
https://agent.supervised.co/bot-gamma
The mapping will be assigned as follows:
| URL | Mapping ID | Shortcode to Use |
| :--- | :--- | :--- |
| .../bot-alpha | 1 | [supervised_ai_bot id="1"] |
| .../bot-beta | 2 | [supervised_ai_bot id="2"] |
| .../bot-gamma | 3 | [supervised_ai_bot id="3"] |
Usage in Content
To display a specific bot on a page or post, insert the shortcode with the correct ID:
<!-- To display the first bot in your list -->
[supervised_ai_bot id="1"]
<!-- To display the third bot in your list -->
[supervised_ai_bot id="3"]
Important Considerations
- Sequential Order: If you remove a URL from the middle of your list in the settings, the IDs for all subsequent URLs will shift up. For example, if you delete the URL at line 2, the URL previously at line 3 will now become ID 2.
- Empty Lines: Avoid leaving blank lines between URLs, as these may be counted as rows depending on your input, potentially leading to broken chatbot displays.
- Default Behavior: Always ensure the
idattribute is present in your shortcode. If the ID provided does not match a line in your settings, the chatbot may fail to load.