Creating Session Variables

Creating Session Variables

What are variables?

Variables are placeholders that store user input, data from external systems, or other important information that needs to be saved and reused later in the bot conversation.
They help maintain the context of the conversation, allowing the chatbot to retrieve data and respond appropriately based on previous interactions.

These are categorized based on their scope, which determines where the variable is to be used. Variables are only accessible within their defined scope. There are four types used here: block variables, local variables, global variables, and session variables.
By using variables, you can personalize and tailor conversations within your GC chatbot, allowing for flexible and customized interactions.

Why use variables?

  • Helps maintain the context of the conversation, allowing the bot to refer to previous user inputs and respond accurately.
  • Allows the bot to retrieve and use data dynamically, making conversations more flexible and responsive to user needs.
  • Retrieves crucial information, such as user preferences or data from external systems, which can be used later in the conversation or across multiple interactions.
  • Variables help streamline conversation flows by reducing redundancy and ensuring that relevant data is easily accessible when needed.
  • By categorizing variables based on their scope (block variables, local variables, global variables, and session variables), they ensure that data is used appropriately within the intended parts of the conversation. 

What are session variables?

Session variables are dynamically retrieved during the conversation and are accessible across all flows within an organization.
For example, session variables can identify whether a customer is logged in, a paid subscriber, or a prospect, and guide them through the appropriate path within a flow.

Why use session variables?

  • They help tailor the conversation to the user’s specific needs, like showing content based on their location or account status.
  • They allow the chatbot to show real-time, relevant information based on data gathered during the session, making the chat more interactive.
  • They enable the chatbot to take specific actions or follow different paths based on user conditions, like whether the user is logged in or what options they’ve chosen.
  • With default values, session variables ensure the chatbot conversation has no missing context.
Info
Session variables are available in all flows, but their values are dynamic and can differ session by session.

Creating a session variable

1. Navigate to Setup > Self Service > Guided Conversations > Session Variable.
2. Click Create Session Variable.
3. Enter the Variable Name.
4. Choose Variable Type.
Info
Choosing the data type enables the entered session variable is validated as the selected type, ensuring they are correctly formatted.
Notes
The following are the available data types:
  1. String
  2. Number

5. Enter Default Value.
Notes
When creating a session variable, it’s essential to provide a default value, which will be used if the system is unable to identify the actual value. For example, if the system cannot determine the Customer’s Region, it will show the value provided for the Region variable.
6. Click Add.
Info
Once a session variable is incorporated into a flow, you can review the path followed by each session variable under the preview mode. You also can edit the variable values during the preview.

Using the created session variable in a GC flow

1. Create a block; click on the @ icon.
2. Select the session variable to be displayed.
3. Click Preview.
4. Choose Session Variable Preview.

Notes
You can change the default value for the session variable here or continue by clicking Save & Preview.

Output in GC:

Info
For preview purposes, the default value will be shown. During a live session, the data will be dynamically retrieved and presented to the end-user.

How can you use session variables in your flow:

  1. Collecting items in a virtual shopping cart for the user to place an order.
  2. Storing raw data from an API call for subsequent processing during the conversation.
  3. Maintaining chat history for the current interaction to reference previous messages.
  4. Saving an order number, policy number, or tracking number for easy retrieval within the session. 
Notes
If the session variable default value is being edited, it will be reflected in wherever it has been used automatically.
The session variables can be re-used used multiple times according to the requirement.
Info
Session variables can be utilized in any conversation flow within your organization, but the value fetched will be dynamic to that particular conversation.

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Intake FormsLegalMobile App
                              Form DesignerHRMobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsEncrypted Forms

                              Secure Forms

                              WCAG

                                      Create. Review. Publish.

                                      Write, edit, collaborate on, and publish documents to different content management platforms.

                                      Get Started Now






                                                        You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                            Manage your brands on social media

                                                              Use cases

                                                              Make the most of Zoho Desk with the use cases.

                                                               
                                                                

                                                              eBooks

                                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                               
                                                                

                                                              Videos

                                                              Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                               
                                                                

                                                              Webinar

                                                              Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                               
                                                                
                                                              • Desk Community Learning Series


                                                              • Meetups


                                                              • Ask the Experts


                                                              • Kbase


                                                              • Resources


                                                              • Glossary


                                                              • Desk Marketplace


                                                              • MVP Corner

                                                                Zoho Sheet Resources

                                                                 

                                                                    Zoho Forms Resources


                                                                      Secure your business
                                                                      communication with Zoho Mail


                                                                      Mail on the move with
                                                                      Zoho Mail mobile application

                                                                        Stay on top of your schedule
                                                                        at all times


                                                                        Carry your calendar with you
                                                                        Anytime, anywhere




                                                                              Zoho Sign Resources

                                                                                Sign, Paperless!

                                                                                Sign and send business documents on the go!

                                                                                Get Started Now




                                                                                        Zoho TeamInbox Resources





                                                                                                  Zoho DataPrep Demo

                                                                                                  Get a personalized demo or POC

                                                                                                  REGISTER NOW


                                                                                                    Design. Discuss. Deliver.

                                                                                                    Create visually engaging stories with Zoho Show.

                                                                                                    Get Started Now









                                                                                                                        • Related Articles

                                                                                                                        • Session Variables in Business Messaging

                                                                                                                          A session variable is a temporary piece of information that captures user-specific details, such as name, email, or phone number, while they’re using the chat or flow in your website. It helps the Business Messaging widget remember who the user is ...
                                                                                                                        • Using IM Variables in Guided Conversations

                                                                                                                          Overview Guided Conversations (GC) integrate with popular instant messaging (IM) channels, enabling businesses to communicate with customers seamlessly. The IM module ensures that conversation flows can operate across messaging platforms. To enhance ...
                                                                                                                        • Creating Global Variables

                                                                                                                          What are variables? Variables are placeholders that store user input, data from external systems, or other important information that needs to be saved and reused later in the bot conversation. They help maintain the context of the conversation, ...
                                                                                                                        • Creating Block Variables

                                                                                                                          What are variables? Variables are placeholders that store user input, data from external systems, or other important information that needs to be saved and reused later in the bot conversation. They help maintain the context of the conversation, ...
                                                                                                                        • Creating Local Variables

                                                                                                                          What are variables? Variables are placeholders that store user input, data from external systems, or other important information that needs to be saved and reused later in the bot conversation. They help maintain the context of the conversation, ...
                                                                                                                          Wherever you are is as good as
                                                                                                                          your workplace

                                                                                                                            Resources

                                                                                                                            Videos

                                                                                                                            Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                            eBooks

                                                                                                                            Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                            Webinars

                                                                                                                            Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                            CRM Tips

                                                                                                                            Make the most of Zoho CRM with these useful tips.



                                                                                                                              Zoho Show Resources