{"id":13290,"date":"2026-01-07T19:14:04","date_gmt":"2026-01-07T18:14:04","guid":{"rendered":"https:\/\/botnation.ai\/support\/increment-decrement-variable-values\/"},"modified":"2026-01-07T19:14:36","modified_gmt":"2026-01-07T18:14:36","slug":"increment-decrement-variable-values","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/increment-decrement-variable-values\/","title":{"rendered":"Increment \/ Decrement variable values"},"content":{"rendered":"<p>This feature allows you to increase or decrease the value of a variable each time the sequence is run.<\/p>\n\n<p>If the concept of a variable is totally abstract for you, I suggest you consult the following article before continuing: <a href=\"https:\/\/botnation.ai\/fr\/support\/tout-savoir-sur-les-variables\/\">All about {{\u2026}} variables<\/a>.<\/p>\n\n<h2 class=\"wp-block-heading\">1. Use<\/h2>\n\n<p>Among the construction functions, click on \u201cVariables\u201d then, in the menu that opens, click on \u201cIncrement\u201d or \u201cDecrement\u201d.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Crementer_00_FR-1024x604.png.webp\" alt=\"\" class=\"wp-image-766\"><\/figure>\n\n<p>Let\u2019s create a new sequence with <strong><em>Increment<\/em><\/strong>.<br>We\u2019ll choose the variable<em>\u201cmyVariable\u201d <\/em>and set the value in the value field to 2.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"304\" height=\"176\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-121.png.webp\" alt=\"\" class=\"wp-image-768\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-121.png 304w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-121-300x174.png 300w\" sizes=\"(max-width: 304px) 100vw, 304px\" \/><\/figure>\n<\/div>\n<p>When the bot executes this function, it will add 2 to the value of the variable<em>\u201cmyVariable<\/em>\u201c.<\/p>\n\n<p>Let\u2019s check the result with a <a href=\"https:\/\/botnation.ai\/fr\/support\/ajouter-un-texte-a-votre-chatbot\/\">Text feature<\/a>:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"480\" height=\"433\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-122.png.webp\" alt=\"\" class=\"wp-image-770\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-122.png 480w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-122-300x271.png 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/figure>\n<\/div>\n<p>Let\u2019s run the bot to see the result:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"313\" height=\"35\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-123.png.webp\" alt=\"\" class=\"wp-image-772\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-123.png 313w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-123-300x34.png 300w\" sizes=\"(max-width: 313px) 100vw, 313px\" \/><\/figure>\n<\/div>\n<p>In this example, myVariable was initially set to 5. The value of the variable has now changed to 7 (5+2).<\/p>\n\n<p>The logic of functionality <strong><em>Decrement<\/em><\/strong> function is identical, except that instead of adding a value, we subtract it.<\/p>\n\n<h2 class=\"wp-block-heading\">2. Options<\/h2>\n\n<p>A \u2013 You can leave your colleagues a comment about this feature by clicking on the icon (see below).<br>See article : <a href=\"https:\/\/botnation.ai\/fr\/support\/ajouter-des-commentaires\/\">Adding comments<\/a><\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_06_FR-1-1024x604.png.webp\" alt=\"Add a comment\" class=\"wp-image-98\"><\/figure>\n\n<p>B \u2013 By clicking on the \u201c?\u201d icon, the online help will open on the article corresponding to this feature.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_08_FR-1024x604.png.webp\" alt=\"Online help\" class=\"wp-image-100\"><\/figure>\n\n<p>C \u2013 You can duplicate, delete or move this feature by using the icons that appear when you hover over it.<\/p>\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/08\/Texte_07_FR-1-1024x604.png.webp\" alt=\"Move, duplicate and delete functionality\" class=\"wp-image-102\"><\/figure>\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[194,222,221],"class_list":["post-13290","support","type-support","status-publish","hentry","categorie-support-features","categorie-support-variables-en","categorie-support-web-chatbot-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/support\/13290","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=13290"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=13290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}