Table of Contents

Set a timer to get the time spent during the flow

Sofia Teran Updated by Sofia Teran

We know how important might be to know the time your users spent completing the bot, so we decided to create this workaround:

Here's how the builder will look:

  1. After the Welcome message add a Set variable block create a number variable called @start and give it the value: ${timestamp}
  1. After the Buttons block or the block that you want to use as a reference for getting the time you have to add another Set variable block create a number variable called @end and give it the value: ${timestamp}
  1. Then add a Formula block create a number variable @result and use this formula:

Trunc(Subtract(@end,@start))

  1. Finally, connect this Formula block to a Message block and add the variable @result to show the time it took for the user to finish the bot

Here's the final view of the chat, the last number (1) corresponds to the number of seconds:

How did we do?

How to set up questions with a countdown

Contact