[Virtual Agent] Use carousel input variable for decisionning

Theo BOULANGER
Giga Guru

Hello all,

 

I have to create a new custom greeting for my clients because they doesn't want the list display of topics.

So i've created a carousel and the choice they make will determine wich topic block it'll launch.

But i'm unable to select the variable in decisioning, I have only is empty or it's not empty.

TheoBOULANGER_0-1715776924255.png

 

TheoBOULANGER_1-1715776924196.png

 

 

 

Carousel options : 

options.push(
{
'name''Créer un incident',
'value''incident',
"description""Mon matériel ne fonctionne plus/est cassé, j'ai un message d'erreur sur mon logiciel...",
}
);
options.push(
{
'name''Créer une demande',
'value''demand',
'description'"J'ai un nouveau besoin tel que du matériel, accès logiciel...",
}
);
}
 
 
Or is there any way to do that ?
 
Cheers,
1 ACCEPTED SOLUTION

Rishi_11
Kilo Sage

Hi Theo,

 

You are right, we cannot check the carousel input using condition. You need to use script in branch properties to check for the selected carousel option.

Rishi_11_0-1715783509091.png

 

You will have write a script in both of the branch properties. You can use a script like this:

(function execute() {
    /* Return true or false to indicate the branch condition's applicability.
       For example:

       var applies = vaInputs.first_name == 'Bill' ? true : false;
       return applies;
    */
    if(vaInputs.choose_your_topic == 'incident')
    return true;
    else
    return false;
})()

 

Thanks

Rishi.

View solution in original post

2 REPLIES 2

Rishi_11
Kilo Sage

Hi Theo,

 

You are right, we cannot check the carousel input using condition. You need to use script in branch properties to check for the selected carousel option.

Rishi_11_0-1715783509091.png

 

You will have write a script in both of the branch properties. You can use a script like this:

(function execute() {
    /* Return true or false to indicate the branch condition's applicability.
       For example:

       var applies = vaInputs.first_name == 'Bill' ? true : false;
       return applies;
    */
    if(vaInputs.choose_your_topic == 'incident')
    return true;
    else
    return false;
})()

 

Thanks

Rishi.

Theo BOULANGER
Giga Guru

Well it seems like when i tested that solution, i missspelled vaInputs by varInputs..

Thanks !