When writing bot response messages and prompts, we recommend using resource bundles – always. The arguments in favor of using respurce bundles are
- Preparing bots for multilingual
- Reuse of message strings
- Ease of string administration and management
- Separating the jobs of skill development and implementing the bot’s tone and voice
- Optimizing messages for a specific messenger channel
This article is about the latter argument to prepare digital assistants for use with different messengers, with the ability to optimize text responses for a specific messenger. Even if you do not want your digital assistant to support messengers other than Oracle Web Messenger, you should implement the practice outlined in this article because you do not know how the requirements will change in the future. At the very least, you should consider voice as a possible next channel.
Recommended Practice for Resource Bundles
You can implement the suggestion in this article anywhere you can use resource bundles in Oracle Digital Assistant: skills, custom components, entities, settings.
The example in this article shows the technique for use in BotML. The use in entities and settings however ie very similar.
To refer to a resource bundle key from BotML (YAML), entities, or settings, use an expression like this: $ {rb (‘resource_bundle_key’)}.
Resource bundle strings that require parameters to be passed can use positional parameters or named parameters. Positional parameters use placeholders such as {0}, {1}, etc. for values that are dynamically passed to the resource bundle at runtime.
For the solution in this article to work, you need to use named parameters.
For example, to pass the named parameters “arg1”, “arg2″ with the values ”valueArg1”, “valueArg2”, use the following expression: $ {rb (‘resource_bundle_key’, ‘arg1, arg2’, ‘valueArg1’, valueArg2 ). Read the complete article here.
For regular information become a member in the Developer Partner Community please register here.
Blog
Twitter
LinkedIn
Facebook
Meetups
Technorati Tags: PaaS,Cloud,Middleware Update,WebLogic, WebLogic