{"id":799,"date":"2022-09-07T15:27:12","date_gmt":"2022-09-07T13:27:12","guid":{"rendered":"https:\/\/support.botnation.ai\/variable-calculation-feature\/"},"modified":"2026-01-02T15:27:32","modified_gmt":"2026-01-02T14:27:32","slug":"variable-calculation-feature","status":"publish","type":"support","link":"https:\/\/botnation.ai\/en\/support\/variable-calculation-feature\/","title":{"rendered":"Calculation on variables"},"content":{"rendered":"<p>Allows you to make a calculation from two values.<\/p>\n\n\n\n<p>If the concept of a variable is totally abstract for you, I advise you to consult the following article before continuing: <a href=\"https:\/\/botnation.ai\/en\/support\/all-about-variables\/\">All about {{\u2026}} variables<\/a>.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">1. Use<\/h2>\n\n\n\n<p>Among the construction features, click on \u201cVariables\u201d and then, in the menu that opens, click on \u201cCalculation\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\/Calcul_00_UK-1024x604.png.webp\" alt=\"Calculation feature - Icon\" class=\"wp-image-803\"><\/figure>\n\n\n\n<p>Let\u2019s create a new variable with the name<em>\u201csix<\/em>\u201d and the value<em>\u201c6<\/em>\u201c.<br>Let\u2019s create a function <strong>\n  <em>Calculation <\/em>\n<\/strong>to store in the variable<em>\u201cmyvariable<\/em>\u201d the addition of 10 and the value of the variable<em>\u201csix<\/em>\u201c.<\/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-129.png.webp\" alt=\"Calculation feature\" class=\"wp-image-805\"><\/figure>\n<\/div>\n\n\n<p>Let\u2019s see what the bot displays:<\/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-130.png.webp\" alt=\"\" class=\"wp-image-807\"><\/figure>\n<\/div>\n\n\n<p>The variable<em>\u201cmyVariable<\/em>\u201d has taken the value of the result of the operation.<\/p>\n\n\n\n<p><strong>There are several operations available:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sum<\/li>\n\n\n\n<li>Subtraction<\/li>\n\n\n\n<li>Multiplication<\/li>\n\n\n\n<li>Division<\/li>\n\n\n\n<li>Power<\/li>\n\n\n\n<li>Modulo<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2. Options<\/h2>\n\n\n\n\n","protected":false},"featured_media":0,"template":"","meta":{"_acf_changed":false},"categorie-support":[194,222,221],"class_list":["post-799","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\/799","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=799"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/en\/wp-json\/wp\/v2\/categorie-support?post=799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}