Conditional
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 user profile on Messenger
However, we want to achieve a universal scenario and have the same on Line:
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
Call in the main script
In the main script main.converse
, we can call the skill using its name:
The right skill will be triggered according to the platform!
Property condition
Settings
</api-table>
Return value
Boolean or Promise
We can delay the conditional test with a promise.
Last updated