Data Storage: Storing data against entities and extensions | Online Help | Zoho BugTracker

Data Storage: Storing data against entities and extensions

While you build an extension for Zoho BugTracker, you might have to store the extension's data somewhere. We use key-value pairs to store such data against entities and extensions. Hence, the need for a traditional database like RDBMS, where the data will be stored in rows and columns, is eliminated.

Entity Properties

What is a key-value pair?

'Key-value' is a format in which data can be stored. You can store the property or an attribute of an entity or an extension in a key-value pair.  The key will be a unique string and the value will be a JSON object. Data like session information, user profiles, and preferences can be stored as key-value pairs. You can store data against the entities we support and the extensions you develop for Zoho BugTracker.

Storing data against an entity

Zoho BugTracker supports the Project and bug entities. You will be able to store project-specific or bug-specific data against their respective entities. The key will be a unique string and the data will be a JSON object that has to be identified with the key in the future. You can store, retrieve, update, and delete the data that you store against an entity using the following methods respectively.

If the current user has only READ access, they will be able to only retrieve the data i.e.retrieve() can only be invoked. If they have EDIT access, the other functions like 'store()', 'update()', and 'remove()' can also be invoked.

entity.store

Stores data against an entity.

var value = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample.png"}
];
var count = 1;
zohobugtracker.entity.store("6573492", value, count).then(function(response)
/* Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"sample.png\"}]",
      "count" : 1,
      "id": 1587134426
    }
  ]
}
*/
);

Arguments

Argument name Data type Description
key string

Unique string used to identify the entity property. Only this key should be used to retrieve the data later.

Note: Max length: <255> TBD

value JSONObject Property / Data that has to be stored against the entity.
count Integer Number of occurrences stored against the entity.

If the entity is deleted, the data stored against the entity is deleted automatically.

entity.retrieve

Retrieves the data stored against an entity. The argument of this method should be the key that was used when the same data was stored.

zohobugtracker.entity.retrieve("6573492").then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"update.png\"}]",
      "id": 1587134426,
      "count: 1
    }
  ]
}
*/
);

entity.update

Updates the data that's stored against an entity. The argument of this method is a JSON object with the following four predefined keys:

Argument name Data type Description
id string The ID that was generated as the output while storing the current key against the entity using the entity.store() method.
key string The new key has to be mapped against the entity. You can also choose to retain the old/current key.
value JSON Object The data or property that has to be updated against the entity.
count Integer Number of occurrences updated against the entity.

var valueObj = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample_New.png"}
];
zohoprojects.entity.update({id:"1587134426",key:"6573492",value:valueObj,count:2}).then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"Sample_New.png\"}]",
      "id": 1587134426,
      "count" : 2
    }
  ]
}
*/
);

entity.remove

Deletes the data that's stored against a specific entity. The argument of this method is the ID that was generated as the output when the same data was stored using the 'entity.store()' method.

zohobugtracker.entity.remove(1587134426).then(function(response)
/* Output
{
  "status": "success"
}
*/
);

Limitations of entity properties

  • The value stored against a key should not exceed 50KB at once.
  • This method cannot be invoked for the 'app_settings' and 'top_band' locations.
  • The value stored in an entity property should be in a valid JSON format.
  • Concurrent edits on an entity property don't ensure consistency. i.e, when two different users make changes to the same entity property at the same time, only the latest change will be saved and the former will be lost/overridden.

Extension property

What is an extension property?

It is a key-value pair that's stored against the extension itself. However, the data stored against an extension will be lost if the extension is uninstalled from the product. Whereas, the data stored against an entity will be retained even if the extension is uninstalled because only the extension-specific information gets deleted and the entity-specific data will still be available for the other extensions to access.

app.store

Stores data against an extension.

var value = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample.png"}
];
zohobugtracker.app.store("6573492", value).then(function(response)
/* Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"sample.png\"}]",
      "id": 1587134426
    }
  ]
}
*/
);

Arguments

Argument name Data type Description
key string Unique string used to identify the extension property.
value JSONObject Property/Data that has to be stored against the extension.

app.retrieve

Retrieves the data stored against the extension. The argument of this method should be the key that was used when the same was stored. Data could be retrieved only when this method is invoked from the extension against which it is stored. When the extension is uninstalled, the data will be deleted.

zohobugtracker.app.retrieve("6573492").then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"update.png\"}]",
      "id": 1587134426
    }
  ]
}
*/
);

app.update

Updates the data that's stored against an extension. The argument of this method is a JSON object with the following predefined keys:

Argument name Data type Description
id string The ID that was generated as the output while storing the current key against the extension using the app.store() method.
key string The new key that has to be mapped against the extension. You can also choose to retain the old/current key.
value JSON Object The data or property that has to be updated against the extension.

var valueObj = [
{"id" : "1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu","name" : "Sample_New.png"}
];
zohobugtracker.app.update({id:"1587134426",key:"6573492",value:valueObj}).then(function(response)
/*Output
{
  "properties": [
    {
      "key": "6573492",
      "value": "[{\"id\":\"1-QabBt69U8myXYRDVU-1YiCo2k-JWRfu\",\"name\":\"Sample_New.png\"}]",
      "id": 1587134426
    }
  ]
}
*/
);

app.remove

Deletes the data that's stored against a specific extension. The argument of this method is the ID that was generated as the output when the same data was stored using the app.store() method.

zohobugtracker.app.remove(1587134426).then(function(response)
/* Output
{
  "status": "success"
}
*/
);

Limitations of extension properties

  1. The value stored against a key should not exceed 50KB at once.
  1. A maximum of 100 key-value pairs only can be stored against an extension.
  1. The value stored in an extension property should be in a valid JSON format.
  1. Concurrent edits on an extension property don't ensure consistency. i.e, when two different users make changes to the same extension property at the same time, only the latest change will be saved and the former will be lost/overridden.
You can store, retrieve, update, and delete the data that you store against an extension using the following methods respectively.

    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










                                    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

                                                                                                      • Create extensions using CLI

                                                                                                        Overview Zoho Marketplace is an online store where you can upload the extensions you develop for any of the products of Zoho. You can also use the available extensions in our store for your business. This developer guide will help you build an ...
                                                                                                      • Data Administration

                                                                                                        Check your storage details, import data from other services, or take backup of your portal data. You can view the audit log of all portal activities. Storage Details  Click  in the top navigation panel. Navigate to Data Administration > Storage. View ...
                                                                                                      • Create extensions using cloud editor

                                                                                                        Zoho BugTracker lets you build extensions using a cloud editor eliminating pre-setup and managing the entire development process online. Overview Zoho Marketplace is an online store where you can upload the extensions you develop for any of the ...
                                                                                                      • Do we lose all data in our account if not renewed on time?

                                                                                                        No, you will not lose your data. If the renewal fails, all the projects except one will be deactivated. Once you renew your paid account, you will be able to access the data again.
                                                                                                      • Will the previous project data be retained after I renew my account?

                                                                                                        Yes, the data in Zoho Projects account is retained after renewal. However, if the renewal is for lesser number of users than before, the remaining users will not be able to access the portal.
                                                                                                        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