Retrieving Zoho Inventory records by Category

Retrieving Zoho Inventory records by Category

We are attempting to get records from Zoho Inventory based on the category but are having some difficulties. Can someone please offer any insight on the following?

We began by attempting to add a query for the category_name field:
  1. query = Map();
  2. ...
  3. query.put("category_name","Accessories");
  4. ...
  5. inventory_response = zoho.inventory.getRecords("Items","12345",query,"zoho_inventory_connection");
This is not filtering the results that come back as there are records with a category_name of "" being returned. These are valid items in Inventory mind so it just appears that the field is not being filtered on.


We also attempted to filter be the category_id, just to see if that made any difference and this did work:
  1. query = Map();
  2. ...
  3. query.put("category_id", "951594000008375055");
  4. ...
  5. inventory_response = zoho.inventory.getRecords("Items","12345",query,"zoho_inventory_connection");
This response did filter to the few items we're looking for so that is a start.


However, we have a variety of Categories that we will want to use in various places and we are attempting to write a function that will simply take the category and do the rest of the work for us to take out a bulk of copy/paste code. As it stands, using the name of the category doesn't work and using the id is not developer friendly.

Can we either:
A) use any methodology to retrieve based on the category_name to maintain readability?
OR
B) find a function that will let us get the id for a category by name so we can translate from the former to the later as a part of the function?
    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ




                              ご検討中の方