{"id":810,"date":"2022-09-07T15:36:11","date_gmt":"2022-09-07T14:36:11","guid":{"rendered":"https:\/\/support.botnation.ai\/?p=810"},"modified":"2026-01-02T16:34:08","modified_gmt":"2026-01-02T15:34:08","slug":"generer-une-valeur-aleatoire-pour-une-variable","status":"publish","type":"support","link":"https:\/\/botnation.ai\/fr\/support\/generer-une-valeur-aleatoire-pour-une-variable\/","title":{"rendered":"G\u00e9n\u00e9rer une valeur al\u00e9atoire pour une variable"},"content":{"rendered":"<p>Cette fonctionnalit\u00e9 permet de donner \u00e0 une variable une valeur al\u00e9atoire comprise entre une valeur minimum incluse et une valeur maximum incluse.<\/p>\n\n\n\n<p>Si le concept d\u2019une variable est totalement abstrait pour vous, je vous conseille de consulter l\u2019article suivant avant de poursuivre :\u00a0<a href=\"https:\/\/botnation.ai\/fr\/support\/tout-savoir-sur-les-variables\/\">Tout savoir sur les variables {{\u2026}}<\/a>.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">1. Utilisation<\/h2>\n\n\n\n<p>Parmi les fonctionnalit\u00e9s de construction, cliquez sur \u00ab\u00a0Variables\u00a0\u00bb puis, dans le menu qui s\u2019ouvre, cliquez sur \u00ab\u00a0Al\u00e9atoire\u00a0\u00bb.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/Aleatoire_00_FR-1024x604.png.webp\" alt=\"\" class=\"wp-image-811\"><\/figure>\n\n\n\n<p>Exemple d\u2019utilisation :<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"692\" height=\"395\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-131.png.webp\" alt=\"\" class=\"wp-image-813\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-131.png 692w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-131-300x171.png 300w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/figure>\n<\/div>\n\n\n<p>A chaque fois que le bot ex\u00e9cutera cette fonctionnalit\u00e9, la <a href=\"https:\/\/botnation.ai\/en\/assign-a-value-to-a-variable\/\">variable \u00ab\u00a0maVariable\u00a0\u00bb aura une valeur<\/a> al\u00e9atoire comprise en 1 et 10 :<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"300\" height=\"328\" src=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-132.png.webp\" alt=\"\" class=\"wp-image-815\" srcset=\"https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-132.png 300w, https:\/\/botnation.ai\/wp-content\/uploads\/2022\/09\/image-132-274x300.png 274w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure>\n<\/div>\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":[183,169,185,171],"class_list":["post-810","support","type-support","status-publish","hentry","categorie-support-chatbot-web","categorie-support-facebook-messenger","categorie-support-fonctionnalites","categorie-support-variables"],"acf":[],"_links":{"self":[{"href":"https:\/\/botnation.ai\/fr\/wp-json\/wp\/v2\/support\/810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/botnation.ai\/fr\/wp-json\/wp\/v2\/support"}],"about":[{"href":"https:\/\/botnation.ai\/fr\/wp-json\/wp\/v2\/types\/support"}],"wp:attachment":[{"href":"https:\/\/botnation.ai\/fr\/wp-json\/wp\/v2\/media?parent=810"}],"wp:term":[{"taxonomy":"categorie-support","embeddable":true,"href":"https:\/\/botnation.ai\/fr\/wp-json\/wp\/v2\/categorie-support?post=810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}