{"id":562,"date":"2022-09-06T11:42:19","date_gmt":"2022-09-06T09:42:19","guid":{"rendered":"https:\/\/support.botnation.ai\/capture-a-date\/"},"modified":"2026-01-02T16:34:44","modified_gmt":"2026-01-02T15:34:44","slug":"capture-a-date","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/capture-a-date\/","title":{"rendered":"Capture a date"},"content":{"rendered":"<p>Get a date and time to save them in variables<\/p>\n\n\n\n<p>The \u201cDate and time\u201d function allows your users to easily enter a date and a time in order to inform through your chatbot about an appointment, a birth date, a desired reservation period etc\u2026 Both on your Web chatbot and Facebook Messenger!<\/p>\n\n\n\n<p>On Messenger, the \u201cDate and Time\u201d feature creates a pre-configured button that will open a WebView with a visual calendar.<br><br>For web-chatbots, there are two ways to capture a date: with a button that opens a new tab with a visual calendar like on Messenger or directly integrated in the chat window.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Mockups_Calendrier_UK-1024x495.png.webp\" alt=\"\" class=\"wp-image-565\"><\/figure>\n\n\n\n<p>The collected information will be automatically injected into variables that can be used in conditions and webhooks.<\/p>\n\n\n\n<p>First of all, let\u2019s clarify something you often ask us! Botnation AI has 2 types of date-related variables:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>calendar_day<\/li><li>bn_date<\/li><\/ul>\n\n\n\n<p>Here we will focus on the first one. To understand how <strong>bn_date<\/strong> works, this is <a href=\"https:\/\/botnation.ai\/en\/support\/date-variables-and-functions\/\">where<\/a> it happens!<\/p>\n\n\n\n<p>You want to ask your chatbot user to enter a date via our calendar function. In this case, you will find the value of this entry under the variable <strong>{{CALENDAR_DAY}}<\/strong>. They are static.<\/p>\n\n\n\n<p>In case you want to ask the chatbot the current date, follow the guide, we have detailed everything on <a href=\"https:\/\/botnation.ai\/en\/support\/date-variables-and-functions\/\">this article<\/a>.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">1. Use for Messenger<\/h2>\n\n\n\n<p>Among the construction features, click on \u201cDate and Time\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_00_UK_FBM-1024x604.png.webp\" alt=\"\" class=\"wp-image-567\"><\/figure>\n\n\n\n<p>This creates a preconfigured button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_01_UK-1024x604.png.webp\" alt=\"\" class=\"wp-image-570\"><\/figure>\n\n\n\n<p>Clicking on the title of this button will open the button\u2019s configuration panel directly to the \u201cDate and Time\u201d tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_Button_01_UK-1024x930.png.webp\" alt=\"\" class=\"wp-image-572\"><\/figure>\n\n\n\n<p>Then fill in the necessary fields. You can propose the date or time individually or both on the same interface. You can also select a color to customize this menu.<\/p>\n\n\n\n<p>For your chatbot users, this will display a button that, when clicked, will display a WebView.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-78.png.webp\" alt=\"\" class=\"wp-image-574\"><\/figure>\n<\/div>\n\n\n<p>The visual interface is fluid and ergonomic, so your users don\u2019t have to enter this information by hand.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-79.png.webp\" alt=\"\" class=\"wp-image-576\"><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">2. Use for Web chatbots<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">A. Capturing the date and time from a button  <\/h4>\n\n\n\n<p>If you create a button and choose the \u201cDate and time\u201d tab in the configuration interface, it works exactly the same as for Messenger. This will create a button that, when clicked, will open a new tab in the browser with the visual date and time capture interface.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">B. Capture the date and time using the \u201cDate and Time\u201d feature<\/h4>\n\n\n\n<p>Among the construction features, click on \u201cDate and Time\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_00_UK-1024x604.png.webp\" alt=\"\" class=\"wp-image-578\"><\/figure>\n\n\n\n<p>Then fill in the necessary fields. You can propose the date or time individually or both on the same interface.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Calendar_02_UK-1024x604.png.webp\" alt=\"\" class=\"wp-image-580\"><\/figure>\n\n\n\n<p>For your users, the date and time will be entered directly in the chatbot window in the conversation flow.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-80.png.webp\" alt=\"\" class=\"wp-image-582\"><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>ATTENTION<\/strong><br>This feature can only be placed at the end of a sequence.<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">3. Collected variables<\/h2>\n\n\n\n<p>The collected dates and times are available in \u201cDate Entry\u201d variables:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-81.png.webp\" alt=\"\" class=\"wp-image-584\"><\/figure>\n<\/div>\n\n\n<p>The number of the day: {{CALENDAR_DAY}}<\/p>\n\n\n\n<p>The number of the month: {{CALENDAR_MONTH}}<br><br>The year: {{CALENDAR_YEAR}}<\/p>\n\n\n\n<p>The time: {{CALENDAR_HOUR}}<\/p>\n\n\n\n<p>Minutes: {{CALENDAR_MINUTE}}<br><br>The day of the week from 1 (Sunday) to 7 (Saturday) : {{CALENDAR_DAY_OF_WEEK}}<br><br>The number of the week (1..52) : {{CALENDAR_WEEK_OF_YEAR}}<\/p>\n\n\n\n<p>The date in Timestamp format: {{CALENDAR_TIMESTAMP}}<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Options<\/h2>\n\n\n\n<p>A \u2013 You can leave a comment to your collaborators about this feature by clicking on the icon (see below).<br>View Article : <a href=\"https:\/\/botnation.ai\/en\/support\/add-comments\/\">Add Comments<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_06_UK-1024x604.png.webp\" alt=\"Comment\" class=\"wp-image-127\"><\/figure>\n\n\n\n<p>B \u2013 By clicking on the \u201c?\u201d icon, the online help will open on the article corresponding to this functionality.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_08_UK-1024x604.png.webp\" alt=\"Feature online help\" class=\"wp-image-129\"><\/figure>\n\n\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[183,193,194,185,171,221],"class_list":["post-562","support","type-support","status-publish","hentry","categorie-support-chatbot-web","categorie-support-facebook-messenger-en","categorie-support-features","categorie-support-fonctionnalites","categorie-support-variables","categorie-support-web-chatbot-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/562","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=562"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}