Conditional
Last updated
Was this helpful?
Last updated
Was this helpful?
It happens several times that one wishes to execute a different skill according to the platform or certain information of the user. For example, we could have a following skill:
We can think that this method allows to recover the
However, we want to achieve a universal scenario and have the same :
We will need to use a conditional skill to switch from one to another depending on the platform:
Note several points:
The name of the skill is always the same profileSkill
We use the condition
property that returns a Boolean
In the main script main.converse
, we can call the skill using its name:
The right skill will be triggered according to the platform!
</api-table>
Boolean or Promise
We can delay the conditional test with a promise.