{"id":4811,"date":"2023-07-26T15:06:52","date_gmt":"2023-07-26T13:06:52","guid":{"rendered":"https:\/\/botnation.ai\/measuring-the-length-of-a-conversation\/"},"modified":"2026-01-02T16:34:28","modified_gmt":"2026-01-02T15:34:28","slug":"measuring-the-length-of-a-conversation","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/measuring-the-length-of-a-conversation\/","title":{"rendered":"Measuring the length of a conversation"},"content":{"rendered":"<p>Timing the conversation between a user and a chatbot<\/p>\n\n<p>The conversation between a user and your chatbot is never really over, but you can <strong>measure the time spent between 2 stages of your chatbot <\/strong>, especially if you have a sequence for the end of contact taking, end of training, etc\u2026 <\/p>\n\n<p>To do this, you need <a href=\"https:\/\/botnation.ai\/\" rel=\"noreferrer noopener\" target=\"_blank\">Botnation<\/a>:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>Assign the date variable <a href=\"https:\/\/botnation.ai\/en\/date-variables-and-functions\/\" target=\"_blank\" rel=\"noreferrer noopener\">{{bn_date_local_timestamp}<\/a> } to a variable, for example {{debut}}, in a start sequence such as the conversation start sequence (welcome sequence).<\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2023\/07\/image-22.png.webp\" alt=\"\" class=\"wp-image-4799\"><\/figure>\n<\/div>\n<ul class=\"wp-block-list\">\n<li>Then assign the variable {{bn_date_local_timestamp}} to <a href=\"https:\/\/botnation.ai\/en\/all-about-variables\/\" target=\"_blank\" rel=\"noreferrer noopener\">a variable<\/a>, for example {{fin}}, in a target sequence (confirmation).<\/li>\n<\/ul>\n\n<p>The difference between {{fin}} \u2013 {{debut}} will be <strong>the number of seconds elapsed between these 2 events<\/strong>. You can calculate this difference using<a href=\"https:\/\/botnation.ai\/en\/variable-calculation-feature\/\" target=\"_blank\" rel=\"noreferrer noopener\"> the calculation function<\/a> available on Botnation.<\/p>\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2023\/07\/image-23.png.webp\" alt=\"\" class=\"wp-image-4801\" width=\"856\" height=\"841\"><\/figure>\n\n<p>To transform these seconds into minutes, simply use the calculation function to divide the seconds by 60, then round them off if necessary.<\/p>\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2023\/07\/image-24.png.webp\" alt=\"\" class=\"wp-image-4803\"><\/figure>\n\n<p>Here is the result in the chatbot using the example above:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2023\/07\/image-25.png.webp\" alt=\"\" class=\"wp-image-4805\"><\/figure>\n<\/div><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2023\/07\/image-26.png.webp\" alt=\"\" class=\"wp-image-4807\"><\/figure>\n<\/div>\n<p><strong>Plus:<\/strong><br>\u2013 <a href=\"https:\/\/botnation.ai\/en\/date-variables-and-functions\/\">Variables linked to dates<\/a><br>\u2013 <a href=\"https:\/\/botnation.ai\/en\/variable-calculation-feature\/\">Calculating variables<\/a><br>\u2013 <a href=\"https:\/\/botnation.ai\/en\/all-about-variables\/\">All about variables<\/a><\/p>\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[198,221],"class_list":["post-4811","support","type-support","status-publish","hentry","categorie-support-tutorials","categorie-support-web-chatbot-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/4811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/types\/support"}],"wp:attachment":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/media?parent=4811"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=4811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}