Update Bot Manifest
Released in 24.1. Updates the manifest of the calling service user. The manifest contains the list of supported commands.
This feature requires Client2 v24.5 (release date: May 2024) as well as SBE v24.1 (check availability with your Technical Account Manager or Symphony representative).
The manifest describes the list of Slash commands that your bot supports, and is persisted on the Symphony backend.
Every time a user is in a room with your bot, he can display all supported commands by typing "/" in the chat text editor.
With this new auto complete menu, users can easily discover all the features available through your Bot. The menu also makes it much easier and faster to type properly formatted commands.
The list of commands is supposed to stay relatively static and should be updated only if the list of supported commands evolves (e.g. a new command is supported or an existing command changes).
You can create the manifest manually and upload it by following the steps below.
Manifest guide
Structure
A manifest is a JSON document that defines a list of commands
. Each command must have a name
and a description (desc
), and can optionally have an example
and a list of arguments (args)
.
Sample manifest:
Notes on manifest format
Commands are single words: The name of a command can't contain any spaces. If you want to have sub commands (e.g. /create ticket
and /create profile
) then you can use arguments for that. You can have several commands with the same name.
Commands start with a / character. Don't add it in the manifest, it will be added for you.
Limitations
Long display names: Bots with a very long display name (more than 5 separate words) are not well supported: The list of commands will not display if a user types "/" after a mention to your Bot. Users will still be able to see the commands if they type "/" without a mention to your Bot.
Manifest size: The maximum length of the manifest is 6000 characters. Remove unnecessary spaces (compress) to keep the character count low.
Steps
Once you have completed your manifest, it needs to be 1. Compressed then 2. JSON-escaped, and finally 3. Uploaded to Symphony, using the Upload Bot Manifest endpoint.
1. Compress the manifest
The maximum length of the manifest is 6000 characters, hence the benefit of removing all unnecessary characters such as spaces, tabs or new lines.
2. JSON-escape
Then you need to JSON-escape the manifest. Free tools are available online to perform this operation.
3. Upload to Symphony
Upload the JSON-escaped manifest as a body parameter of the Update Bot Manifest endpoint as shown in the example below:
The endpoint above needs to be called with the identity of the Bot for which the manifest is uploaded. There is currently no endpoint to update the manifest of another service user.
Validation
Once the manifest is uploaded, you can test that the commands auto complete menu displays correctly by opening a chat with your bot and typing the "/" character.
If the auto complete menu does not display, please open the developer tools' console and look for an error log related to the format of the manifest. This log could start with 'Error while parsing the manifest from the bot
'.
Please note that the manifest is cached on the Client: Reload your Client to refresh the cache after you have uploaded a new version of your manifest.
Last updated