Dynamic Content Variables

Hi,

Currently content variables are very useful for example for defining multilingual messages but they are not very dynamic and hence I see this as an area for expansion.

Let’s say I have some parts of the message that will always be the same but some will be dynamic.

For example: Hi Jakub. I am Test Bot. What can I do for you?

Here Jakub is the dynamic value. What I would like to have is both or at least on of the following functionalities.

1. Be able to put placeholders within the content variables values. Then within my message node, be able to modify that value.

For example content variable WelcomeMsg with walue Hi . I am Test Bot. What can I do for you?

Message node script:

let user_nm = “Jakub”;
let welcome_msg = context.WelcomeMsg;
var formatted_welcome_msg = welcome_msg.replace(“”, user_nm);

print(formatted_welcome_msg);

Currently this script would print me empty message.

2. Be able to reference another context element or content variable from within the content variable. For example:

I have two content variables. UserNm with value Jakub. Then in WelcomeMsg I would like to be able to achieve something like this Hi {{context.UserNm}}. I am TestBot. What can I do for you?

Regards,
Jakub