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.

    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 Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            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

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      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 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

                                                                                                              • 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, ...
                                                                                                              • How to set Session Variables?

                                                                                                                What are session variables? These variables are dynamically retrieved during the bot conversations. These variables are org-specific and accessible across GC flows. Read more - GC's session variable. You can perform these actions with the session ...
                                                                                                              • How to set Session Variables for React Native SDK?

                                                                                                                What are session variables? Guided Conversations These variables are dynamically retrieved during the bot conversations. These variables are org-specific and accessible across GC flows. Read more - GC's session variable. You can perform these actions ...
                                                                                                                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