set

With this action you can set any Context Variable you wish.

Consider the following example:


    - name: Initial Step
      actions:
        - set: 'visit_number = visit_number + 1'
      next: Second Step

    - name: Second Step
      actions:
        - sendText: 'This is your visit number . '
      next: Exit

In this scenario we use a context variable visit_number to count the number of times the user has visited our skill / action. BotTalk stores Context Variables between sessions, which allows you to access the variable visit_number every time the skill / action has been invoked:


Written by Andrey Esaulov on 12 March 2019

Updated on 12 March 2019