[{"data":1,"prerenderedAt":439},["ShallowReactive",2],{"help-article-chatbots-variables":3,"help-siblings-chatbots":398},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"order":10,"difficulty":11,"time_to_complete":12,"related":13,"body":17,"_type":392,"_id":393,"_source":394,"_file":395,"_stem":396,"_extension":397},"\u002Fhelp\u002Fchatbots\u002Fvariables","chatbots",false,"","Using variables in chatbot responses","How to use variables to store and reference data throughout a chatbot conversation flow.",11,"intermediate","3 minutes",[14,15,16],"\u002Fhelp\u002Fchatbots\u002Fflow-nodes","\u002Fhelp\u002Fchatbots\u002Fcreating-first-flow","\u002Fhelp\u002Fchatbots\u002Fflow-builder-intro",{"type":18,"children":19,"toc":379},"root",[20,28,34,41,46,85,91,98,123,129,161,167,193,199,204,213,219,315,321],{"type":21,"tag":22,"props":23,"children":25},"element","h1",{"id":24},"using-variables-in-chatbot-responses",[26],{"type":27,"value":8},"text",{"type":21,"tag":29,"props":30,"children":31},"p",{},[32],{"type":27,"value":33},"Variables let you store customer responses and use them later in the conversation.",{"type":21,"tag":35,"props":36,"children":38},"h2",{"id":37},"what-are-variables",[39],{"type":27,"value":40},"What are variables?",{"type":21,"tag":29,"props":42,"children":43},{},[44],{"type":27,"value":45},"Variables are named containers that hold data during a conversation:",{"type":21,"tag":47,"props":48,"children":49},"ul",{},[50,63,74],{"type":21,"tag":51,"props":52,"children":53},"li",{},[54,61],{"type":21,"tag":55,"props":56,"children":58},"code",{"className":57},[],[59],{"type":27,"value":60},"{customer_name}",{"type":27,"value":62}," — Stored from an Ask Question node",{"type":21,"tag":51,"props":64,"children":65},{},[66,72],{"type":21,"tag":55,"props":67,"children":69},{"className":68},[],[70],{"type":27,"value":71},"{order_id}",{"type":27,"value":73}," — Stored from customer input",{"type":21,"tag":51,"props":75,"children":76},{},[77,83],{"type":21,"tag":55,"props":78,"children":80},{"className":79},[],[81],{"type":27,"value":82},"{api_result}",{"type":27,"value":84}," — Stored from an HTTP Request response",{"type":21,"tag":35,"props":86,"children":88},{"id":87},"setting-variables",[89],{"type":27,"value":90},"Setting variables",{"type":21,"tag":92,"props":93,"children":95},"h3",{"id":94},"from-ask-question-node",[96],{"type":27,"value":97},"From Ask Question node",{"type":21,"tag":99,"props":100,"children":101},"ol",{},[102,107,118],{"type":21,"tag":51,"props":103,"children":104},{},[105],{"type":27,"value":106},"Add an Ask Question node",{"type":21,"tag":51,"props":108,"children":109},{},[110,112],{"type":27,"value":111},"In settings, set \"Save response as\": ",{"type":21,"tag":55,"props":113,"children":115},{"className":114},[],[116],{"type":27,"value":117},"customer_name",{"type":21,"tag":51,"props":119,"children":120},{},[121],{"type":27,"value":122},"When customer answers, their response is stored",{"type":21,"tag":92,"props":124,"children":126},{"id":125},"from-set-variable-node",[127],{"type":27,"value":128},"From Set Variable node",{"type":21,"tag":99,"props":130,"children":131},{},[132,137,156],{"type":21,"tag":51,"props":133,"children":134},{},[135],{"type":27,"value":136},"Add a Set Variable node",{"type":21,"tag":51,"props":138,"children":139},{},[140,142,148,150],{"type":27,"value":141},"Set name: ",{"type":21,"tag":55,"props":143,"children":145},{"className":144},[],[146],{"type":27,"value":147},"greeting",{"type":27,"value":149}," value: ",{"type":21,"tag":55,"props":151,"children":153},{"className":152},[],[154],{"type":27,"value":155},"Hello!",{"type":21,"tag":51,"props":157,"children":158},{},[159],{"type":27,"value":160},"Useful for computed values or flags",{"type":21,"tag":92,"props":162,"children":164},{"id":163},"from-http-request",[165],{"type":27,"value":166},"From HTTP Request",{"type":21,"tag":99,"props":168,"children":169},{},[170,175,180],{"type":21,"tag":51,"props":171,"children":172},{},[173],{"type":27,"value":174},"Add an HTTP Request node",{"type":21,"tag":51,"props":176,"children":177},{},[178],{"type":27,"value":179},"Map response fields to variables",{"type":21,"tag":51,"props":181,"children":182},{},[183,185,191],{"type":27,"value":184},"e.g., ",{"type":21,"tag":55,"props":186,"children":188},{"className":187},[],[189],{"type":27,"value":190},"order_status",{"type":27,"value":192}," = response.data.status",{"type":21,"tag":35,"props":194,"children":196},{"id":195},"using-variables-in-messages",[197],{"type":27,"value":198},"Using variables in messages",{"type":21,"tag":29,"props":200,"children":201},{},[202],{"type":27,"value":203},"Reference variables in any Send Message node:",{"type":21,"tag":205,"props":206,"children":208},"pre",{"code":207},"Hi {customer_name}! Your order {order_id} status is: {order_status}\n",[209],{"type":21,"tag":55,"props":210,"children":211},{"__ignoreMap":7},[212],{"type":27,"value":207},{"type":21,"tag":35,"props":214,"children":216},{"id":215},"built-in-variables",[217],{"type":27,"value":218},"Built-in variables",{"type":21,"tag":220,"props":221,"children":222},"table",{},[223,242],{"type":21,"tag":224,"props":225,"children":226},"thead",{},[227],{"type":21,"tag":228,"props":229,"children":230},"tr",{},[231,237],{"type":21,"tag":232,"props":233,"children":234},"th",{},[235],{"type":27,"value":236},"Variable",{"type":21,"tag":232,"props":238,"children":239},{},[240],{"type":27,"value":241},"Value",{"type":21,"tag":243,"props":244,"children":245},"tbody",{},[246,264,281,298],{"type":21,"tag":228,"props":247,"children":248},{},[249,259],{"type":21,"tag":250,"props":251,"children":252},"td",{},[253],{"type":21,"tag":55,"props":254,"children":256},{"className":255},[],[257],{"type":27,"value":258},"{contact_name}",{"type":21,"tag":250,"props":260,"children":261},{},[262],{"type":27,"value":263},"Customer's name from contacts",{"type":21,"tag":228,"props":265,"children":266},{},[267,276],{"type":21,"tag":250,"props":268,"children":269},{},[270],{"type":21,"tag":55,"props":271,"children":273},{"className":272},[],[274],{"type":27,"value":275},"{contact_phone}",{"type":21,"tag":250,"props":277,"children":278},{},[279],{"type":27,"value":280},"Customer's phone number",{"type":21,"tag":228,"props":282,"children":283},{},[284,293],{"type":21,"tag":250,"props":285,"children":286},{},[287],{"type":21,"tag":55,"props":288,"children":290},{"className":289},[],[291],{"type":27,"value":292},"{current_time}",{"type":21,"tag":250,"props":294,"children":295},{},[296],{"type":27,"value":297},"Current time",{"type":21,"tag":228,"props":299,"children":300},{},[301,310],{"type":21,"tag":250,"props":302,"children":303},{},[304],{"type":21,"tag":55,"props":305,"children":307},{"className":306},[],[308],{"type":27,"value":309},"{current_date}",{"type":21,"tag":250,"props":311,"children":312},{},[313],{"type":27,"value":314},"Current date",{"type":21,"tag":35,"props":316,"children":318},{"id":317},"tips",[319],{"type":27,"value":320},"Tips",{"type":21,"tag":99,"props":322,"children":323},{},[324,349,359,369],{"type":21,"tag":51,"props":325,"children":326},{},[327,333,335,341,343],{"type":21,"tag":328,"props":329,"children":330},"strong",{},[331],{"type":27,"value":332},"Name clearly",{"type":27,"value":334}," — ",{"type":21,"tag":55,"props":336,"children":338},{"className":337},[],[339],{"type":27,"value":340},"order_id",{"type":27,"value":342}," not ",{"type":21,"tag":55,"props":344,"children":346},{"className":345},[],[347],{"type":27,"value":348},"var1",{"type":21,"tag":51,"props":350,"children":351},{},[352,357],{"type":21,"tag":328,"props":353,"children":354},{},[355],{"type":27,"value":356},"Set defaults",{"type":27,"value":358}," — Handle cases where variable is empty",{"type":21,"tag":51,"props":360,"children":361},{},[362,367],{"type":21,"tag":328,"props":363,"children":364},{},[365],{"type":27,"value":366},"Use in conditions",{"type":27,"value":368}," — Branch based on variable values",{"type":21,"tag":51,"props":370,"children":371},{},[372,377],{"type":21,"tag":328,"props":373,"children":374},{},[375],{"type":27,"value":376},"Don't overwrite",{"type":27,"value":378}," — Use unique names for each piece of data",{"title":7,"searchDepth":380,"depth":380,"links":381},2,[382,383,389,390,391],{"id":37,"depth":380,"text":40},{"id":87,"depth":380,"text":90,"children":384},[385,387,388],{"id":94,"depth":386,"text":97},3,{"id":125,"depth":386,"text":128},{"id":163,"depth":386,"text":166},{"id":195,"depth":380,"text":198},{"id":215,"depth":380,"text":218},{"id":317,"depth":380,"text":320},"markdown","content:help:chatbots:variables.md","content","help\u002Fchatbots\u002Fvariables.md","help\u002Fchatbots\u002Fvariables","md",[399,402,405,408,411,413,415,417,420,423,426,429,432,435,438],{"_path":400,"title":401},"\u002Fhelp\u002Fchatbots\u002Fagent-transfer","Agent transfer from chatbot (human handoff)",{"_path":403,"title":404},"\u002Fhelp\u002Fchatbots\u002Fai-auto-reply","Using the AI auto-reply feature",{"_path":406,"title":407},"\u002Fhelp\u002Fchatbots\u002Fai-providers","Configuring AI providers (OpenAI, Claude, Gemini)",{"_path":409,"title":410},"\u002Fhelp\u002Fchatbots\u002Fchatbot-analytics","Chatbot analytics and performance metrics",{"_path":15,"title":412},"Creating your first chatbot flow",{"_path":16,"title":414},"Introduction to the chatbot flow builder",{"_path":14,"title":416},"Understanding flow nodes and connections",{"_path":418,"title":419},"\u002Fhelp\u002Fchatbots\u002Fivr-flow-editor","Building IVR flows with the visual editor",{"_path":421,"title":422},"\u002Fhelp\u002Fchatbots\u002Fivr-system","IVR system setup (voice call routing)",{"_path":424,"title":425},"\u002Fhelp\u002Fchatbots\u002Fkeyword-triggers","Setting up keyword triggers",{"_path":427,"title":428},"\u002Fhelp\u002Fchatbots\u002Fsla-processor","Setting up SLA reminders for chatbot responses",{"_path":430,"title":431},"\u002Fhelp\u002Fchatbots\u002Ftesting-flows","Testing and simulating chatbot flows",{"_path":433,"title":434},"\u002Fhelp\u002Fchatbots\u002Ftraining-ai-knowledge-base","Training AI with your business data",{"_path":436,"title":437},"\u002Fhelp\u002Fchatbots\u002Ftts-greetings","Text-to-Speech for IVR greetings",{"_path":4,"title":8},1780423181288]