Zoho FSM | Create Work Orders in Bulk using Zoho Sheets

Create Work Orders in Bulk using Zoho Sheets

Use case: Using Zoho Sheets, import/create multiple work orders at once. Here, taxes have not been considered.
 
Follow the steps below to implement this use case:

Step 1: Prepare a sheet with the work order values

Prepare a sheet with the values you want to create the work orders with. Refer to the attached sheet to know the format in which you need to add the values in the sheet.
 
NoteBecause of Zoho FSM API limits, at a time, include only up to 100 entries in the sheet.

Step 2: Create a custom function

In Zoho FSM, create a function to generate work orders from the sheet.
  1. Navigate to Setup > Automation > Actions. Go to the Deluge Functions tab and click Create Function.
  2. Enter the following details and click Save:
    1. Function Name: CreateBulkWOs
    2. Module: Work Orders
    3. In the Deluge Script Editor, enter the following script:

      bodyMap = Map();
      headerMap = Map();
      headerMap.put("Authorization","Zoho-oauthtoken 1000.XXXXX");
      response = postUrl(url,bodyMap,headerMap);
      response_list = response.get("records").toList();
      for each  response_map in response_list
      {
      createMap = Map();
      billing_id = response_map.get("Billing_Address");
      service_id = response_map.get("Service_Address");
      service_line_items = response_map.get("Service_Line_Items");
      s = 1;
      Service_items_list = list();
      for each  service in service_line_items
      {
      Service_items_ma = Map();
      Service_items_ma.put("Service",service.get("Service"));
      Service_items_ma.put("Quantity",service.get("Quantity"));
      Service_items_ma.put("Sequence",s);
      s = s + 1;
      Service_items_list.add(Service_items_ma);
      }
      p = 1;
      part_line_list = list();
      part_line_items = response_map.get("part_line_items");
      if(!part_line_items.isNull() && !part_line_items.isEmpty())
      {
      for each  parts in part_line_items
      {
      Part_line_resp = Map();
      Part_line_resp.put("Part",parts.get("parts"));
      Part_line_resp.put("Quantity",parts.get("Quantity"));
      Part_line_resp.put("Sequence",p);
      p = p + 1;
      part_line_list.add(Part_line_resp);
      }
      }
      data = Map();
      data.put("Part_Line_Items",part_line_list);
      if(!Service_items_list.isEmpty() && Service_items_list != null)
      {
      for each  service in Service_items_list
      {
      service.putAll(data);
      break;
      }
      }
      // info service_line_items ;
      createMap.put("Territory",response_map.get("Territory"));
      createMap.put("Summary",response_map.get("Summary"));
      createMap.put("Contact",response_map.get("Contact"));
      createMap.put("Company",response_map.get("Company"));
      createMap.put("Type",response_map.get("Type"));
      createMap.put("Email",response_map.get("Email"));
      createMap.put("Phone",response_map.get("Phone"));
      createMap.put("Mobile",response_map.get("Mobile"));
      createMap.put("Due_Date",response_map.get("Appointment Date"));
      createMap.put("Billing_Address",{"id":billing_id});
      createMap.put("Service_Address",{"id":service_id});
      createMap.put("Service_Line_Items",Service_items_list);
      info createMap;
      create_response = zoho.fsm.createRecord("Work_Orders",createMap);
      info create_response;
      }
In the above function, the Zoho Sheet API used to create work orders from the Zoho Sheet values is Fetch records from worksheet.
 
Following are the details on how to fetch the parameter values for this API.
  1. <resource_id>
    The resource_id is the alphanumeric value in the sheet's URL. Refer to the screenshot below.



  2. <worksheet_name>
    Go to the List all worksheets API page. Select your Spreadsheet Name and click Submit. You can find the worksheet_name in the Response. Refer to the screenshot below.



    Here the worksheet_name value is BulkWOs.

  3. <worksheet_id>

    Go to the List all worksheets API page. Select your Spreadsheet Name and click Submit. You can find the worksheet_id in the Response. Refer to the screenshot below.



    Here the value of worksheet_id is 0#.
To fetch the Zoho-oauthtoken:
  1. Click Generate Access Token.



  2. The Zoho-oauthtoken value will be displayed as shown in the screenshot below.

Testing the usecase

  1. Navigate to Setup > Automation > Actions. Go to the Deluge Functions tab and click on the function CreateBulkWOs.
  2. In the Deluge Script Editor, click Save & Execute.
  3. In the Execute Function pop-up, enter a Request record ID or click Click here to get the list to obtain the list of available Request IDs.
  4. Select a Request ID and click Execute.

The created work orders can be seen in the Work Orders List page.



      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 FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile 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 FormsFormstack alternativeEncrypted Forms

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


                                                                • Desk Community Learning Series


                                                                • Digest


                                                                • Functions


                                                                • Meetups


                                                                • Kbase


                                                                • Resources


                                                                • Glossary


                                                                • Desk Marketplace


                                                                • MVP Corner


                                                                • Word of the Day


                                                                • Ask the Experts


                                                                  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

                                                                                                                          • Work Orders

                                                                                                                            A work order is a record created for executing a contact service request. Available in Editions: All Editions Create Work Orders Permission Required: Work Orders A Work Order can be created in one of the following ways: From Requests: Use the Convert ...
                                                                                                                          • Job Sheets

                                                                                                                            Job Sheets are customizable, reusable forms that serve as a checklist for the services that technicians need to carry out and as a tool for data collection. While on location, the checklists and instructions within the job sheet guarantee that the ...
                                                                                                                          • Can I convert multiple Requests into Work Orders in bulk in Zoho FSM?

                                                                                                                            No. In Zoho FSM, Requests cannot be converted into Work Orders in bulk. Each Request must be opened and converted into a Work Order individually.
                                                                                                                          • Create a Work Order in Zoho FSM from a Sales Order in Zoho Books

                                                                                                                            Use case: Whenever a Sales Order is created in Zoho Books, create a Work Order for it in Zoho FSM. Follow the steps below to implement this use case: Step 1: Create a connection for Zoho FSM in Zoho Books Step 2: Create a custom function in Zoho ...
                                                                                                                          • Tips - Work Orders

                                                                                                                            What is the Type field in a work order used for? Is this field customizable? The Type field is used to indicate the nature of the service the work order is being created for. E.g. Service (for providing among others, repair, installation, or ...
                                                                                                                            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