Creating Local Variables

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, allowing the chatbot to retrieve data and respond appropriately based on previous interactions.
Idea
For example, collect the customer’s name, email address, and phone number, then have the bot automatically use these details in future interactions by storing them as variables.
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 local variables and why use them?

To store predefined values, you can create a local variable and assign them wherever necessary in the flow. These variables are accessible anywhere within the same flow, but are not available outside of it.
For example, if you have a local variable named Coupon in a flow called Bookings, you can use this variable in any block within the Bookings flow. However, the Coupon variable cannot be accessed in a different flow called Grievances.
InfoThese variables are useful when you need to work with a predefined value rather than relying on user input as you would with Block variables.

How to create local variables 

1. Select the Flow in which you want to add the local variable.
2. Select the @ icon on the left side. The Add Variable dialog box will open.
3. In the dialog box, select the Variable Type as Local Variable.
4. Select Add Local Variable.

5. Provide the Variable Name, Data Type, and Variable Value.
6. Click Save.
Info
Choosing the data type enables the entered local variable is validated as the selected type, ensuring they are correctly formatted.

Notes
Points to be noted when creating a local variable:
1. The following data types are available in GC-
  1. String
  2. Number
  3. Image
  4. Audio
  5. Video
  6. Object
  7. Date
  8. Date and Time
  9. File
2. The maximum size of Image, Audio, Video, and File that can be added as a local variable is 14 MB. If the channel set is                WhatsApp, then this limit would be 10 MB.

Using created local variable in the flow

1. Create a block, then click the @ icon.

2. Select the local variable to be displayed.

Output in GC:

How can you use local variables in your flow

  1. Consistency: Local variables allow you to store and reuse predefined values consistently across different blocks within the same flow. This ensures that the chatbot can use these values accurately throughout the conversation.
  2. Efficiency: By using local variables, you can avoid redundant data entry and streamline the flow. Instead of repeatedly inputting the same values or configuring them multiple times, you can assign them once and use them as needed.
  3. Customization: Local variables enable the chatbot to handle specific scenarios and conditions within the flow. For example, if you have a predefined discount rate or a special offer, you can store it in a local variable and apply it wherever required in the flow.
  4. Modularity: They help maintain modularity in the flow design. Each flow can manage its own set of local variables, ensuring that the values are used appropriately within that flow and do not interfere with other flows.
  5. Simplified Management: By isolating predefined values within local variables, you can simplify the management of the chatbot’s logic and make updates or adjustments more easily without affecting other parts of the system.
Notes
  1. If the block variable is being edited, it will automatically be reflected in wherever it has been used.
  2. The block variables can be re-used used multiple times according to the requirement.

    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 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, ...
                                                                                                              • Components of the GC Flow Builder

                                                                                                                The GC flow builder comprises three components: Blocks Paths Variables Blocks Blocks are the fundamental units of the flow builder. A text message that you want to display, a set of options that you want the customer to choose, the step where you ...
                                                                                                              • Creating a GC flow

                                                                                                                Users who have the create permission can build the guided conversations flows. Similarly, users who have view and edit permission can perform relevant actions. What are GC flows? Flows are a series of constructed blocks that define the GC bot's ...
                                                                                                                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